docs: update software style based on WG agreement#90
Conversation
| We use [ruff](https://docs.astral.sh/ruff/) to enforce [PEP 8](https://peps.python.org/pep-0008/) standards with [docstrings](https://peps.python.org/pep-0257/) in [NUMPY](https://numpydoc.readthedocs.io/en/latest/format.html) format. Use `ruff check` and `ruff check --fix`. Line lengths should have a maximum of **100** characters, or more. | ||
|
|
||
| We use [semver](https://semver.org/) major.minor.patch versions, these are automatically incremented when you use the `aind-library-template`. Note that for major versions you need to put the exact string "BREAKING CHANGE" in the commit *comment* (not the title). | ||
| Releases should follow [semantic versioning](https://semver.org/) with `major.minor.patch` versions. Only external-facing packages should be published to [pypi](https://pypi.org/), internal packages should be installed from github releases. Use the following prefixes to trigger version updates automatically after merges to main: |
There was a problem hiding this comment.
... via automated github action <link to .github workflow for semantic version bump>
There was a problem hiding this comment.
Looks like we don't have a standardized bump template yet https://github.com/AllenNeuralDynamics/.github/tree/main/workflow-templates, maybe that's something we can add to the action items coming out of this group?
There was a problem hiding this comment.
It's here: https://github.com/AllenNeuralDynamics/.github/tree/main/.github/workflows
I think the other folder is legacy?
There was a problem hiding this comment.
Double-checking that this is now outdated?
There was a problem hiding this comment.
I added the correct link, should be visible in the PR now
| ### Style | ||
|
|
||
| At least one other software developer needs to approve a pull request in order for it to be merged. Please be courteous when providing feedback. The team lead can resolve any conflicts. | ||
| These standards are maintained by the [aind-library-template](https://github.com/AllenNeuralDynamics/aind-library-template). Use the template when creating new packages. Our maintained templates are: |
There was a problem hiding this comment.
I recommend we expand on our intention for how 'serious' to take these standards/defaults. Something like:
All projects 'must' follow these styling recommendations unless the manager/team justifies differences on a per-repo basis (eg. using different styling tools/settings, decisions about enabled github actions)
There was a problem hiding this comment.
I added
The decision to deviate from these style standards must be made in consultation with an entire team and be manager-approved. Deviations must be implemented by modifying the
pyproject.toml.
Does that seem right?
…ndividual sections, add commit message requirement
| Package management should be handled by [uv](https://docs.astral.sh/uv/). | ||
|
|
||
| We use `black`, `flake8`, and `interrogate` to enforce [PEP 8](https://peps.python.org/pep-0008/) standards with [docstrings](https://peps.python.org/pep-0257/) in [NUMPY](https://numpydoc.readthedocs.io/en/latest/format.html) format. | ||
| We use [ruff](https://docs.astral.sh/ruff/) to enforce [PEP 8](https://peps.python.org/pep-0008/) standards with [docstrings](https://peps.python.org/pep-0257/) in [NUMPY](https://numpydoc.readthedocs.io/en/latest/format.html) format. Use `ruff check` and `ruff check --fix`. Line lengths should have a maximum of **100** characters. |
There was a problem hiding this comment.
Can we also mention precommit hooks? Something like:
ruff-pre-commit can be used to run ruff via pre-commit hooks.
No description provided.