Skip to content

Gp/update python#16

Merged
iparask merged 4 commits into
masterfrom
gp/update_python
Jul 8, 2026
Merged

Gp/update python#16
iparask merged 4 commits into
masterfrom
gp/update_python

Conversation

@iparask

@iparask iparask commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@iparask iparask requested review from JBorrow and mhasself July 6, 2026 16:03

@mhasself mhasself left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks -- a few notes, but press forward!

Comment thread source/python.rst Outdated
the cost of maintaining and sharing code.

For these reasons, it is the language SO will use the most for its codebase. Any
other language choise should be either for a very specific use case, or for

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

choice

Comment thread source/python.rst Outdated
Overview
========

Python is a high-level laanguage that is widely used in the scientific computing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

language

Comment thread source/python.rst Outdated
libraries. It is also highly portable and readable which significantly reduces
the cost of maintaining and sharing code.

For these reasons, it is the language SO will use the most for its codebase. Any

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restate "+data analysis+ codebase" or "+scientific computing+ codebase". For web front-end, e.g., we obviously don't insist on python.

Comment thread source/python.rst Outdated
2. Function names should be in camelCase, e.g. `myFunction`.
3. Variable names should be in snake_case, e.g. `my_variable`.
4. Constants should be in ALL_CAPS with underscores, e.g. `MAX_SIZE`.
5. Namespaces should be in snake_case, e.g. `my_namespace`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of namespace, put module / submodule, here?

Comment thread source/python.rst Outdated
@@ -69,15 +150,12 @@ We will accept any standard that meets the following criteria:
- nicely formatted text in auto-generated documentation using Sphinx

We strongly recommended that SO codes use either the `numpy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "either"

Comment thread source/python.rst Outdated

We strongly recommended that SO codes use either the `numpy
style`_ or the `google style`_ for docstrings. These two styles are
style`_ as it is widely used to scientific Python packages, from numpy to astropy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used in scientific

Comment thread source/python.rst
The CI check must pass before a pull request can be merged. Similarly, you can
set the CI to run linter check to verify that the code is formatted according
to the style guide.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that running CI on private repos costs money; another reason to keep code public / keep tests fast...

@iparask iparask merged commit 87f782e into master Jul 8, 2026
1 check passed
@iparask iparask deleted the gp/update_python branch July 8, 2026 14:46

@BrianJKoopman BrianJKoopman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I wasn't requested to review, and it already got merged, but I gave it a quick read and noticed a couple of things I wanted to comment on.

Comment thread source/common.rst
developers confidence that individual components are correct before
combining them.

All codeabases regardless of programming language should include unit tests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
All codeabases regardless of programming language should include unit tests.
All codebases regardless of programming language should include unit tests.

Comment thread source/python.rst

We will utilize the following naming conventions:
#. Class and struct names should be in PascalCase, e.g. `MyClass`.
#. Function names should be in camelCase, e.g. `myFunction`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 is for function names to use snake_case, no? camelCase in places where it's used already. Maybe we have a mix of uses -- ocs/socs use snake_case.

Comment thread source/python.rst
Comment thread source/python.rst

There are several tools and methods to automatically generate version numbers
for Python packages. Three of the most popular are `versioneer`_,
`setuptools_scm`_ and `hatchling`_.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably instead link directly to hatch-vcs -- hatchling is the build backend, and doesn't natively do automatic versioning.

@iparask

iparask commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

@BrianJKoopman thank you, I'll make the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants