Contributing#
Note
This is a non-exhaustive list of best practices for contributing code, based on industry standards and our team’s experience.
As you code#
Reduce cognitive overhead:
Pick meaningful, descriptive variable names.
Write docstrings (leverage AI!) and comments. To be used in the API documentation the docstring should follow the Google style guide: Google Python Style Guide.
Follow the Python Zen – explicit is better than implicit, etc.
Write tests.
As you commit#
Keep commits as “one logical unit”. This means that each commit should be a set of related changes that accomplish one task, fix one bug, or implement one feature. Using an editor like VS Code or using GitHub Desktop can help you stage related changes together.
Adhere to semantic commit conventions.
Format & lint your code (
make format).Submit a draft PR so people know you are working on this & can provide advice/feedback early on.
As you finalize a PR#
Target production for the AtomWorks 3.0 release.
Keep overall PR under <400 LOC (lines of code) (Rule of thumb: 500 LOC takes about 1h to review).
Read and fill out the PR checklist.
As you review#
Foster a positive review culture – we want to learn from each other. Be critical but kind.
Practice light-weight code reviews. Submit something small to atomworks.io/atomworks.ml that fixes a bug / improves documentation / adds a tiny feature to practice this within the next 24h. (Can be less than 30min)
Keep review time <1h and <500 LOC for focus.
Contributing to the documentation#
The external AtomWorks documentation is built using Sphinx and hosted on GitHub Pages. Aside from having AtomWorks and its dependencies installed, to build the documentation locally, you will need to install the documentation requirements:
uv pip install -e ".[docs]" -r docs/docs_requirements.txt
To build the documentation, navigate to the docs directory and run:
make html
If you are new to Sphinx, please refer to the Sphinx documentation for guidance on writing and formatting documentation. All of the documentation is written in reStructuredText (reST) format. For more information on reST, see the reStructuredText Primer.
Other Resources#
PR Hygiene#
When contributing to this repository, please follow these steps:
Clone the repository
Create the development environment (see the Installation guide).
Create a new branch for your changes. - Use the following convention to name your branch:
<category>/<description>. Categories:feat,fix,hotfix,refactor,docs,perf. - Example:feat/support-rdkit-small-moleculeMake and commit your changes on your new branch. - Run autoformatting tools (
make format) before committing. - Use commit messages like<type>: <description>. Types:feat,fix,refactor,docs,chore,wip. - Example:git commit -m "docs: add contributing guidelines"Open a pull request to
productionand describe your changes.Wait for review and merge your changes.
Internal releases and documentation#
The internal repository does not publish packages to PyPI. Public package releases are managed in RosettaCommons/atomworks.
To rebuild the internal documentation, run Internal release and docs from
the Actions tab with the dev branch selected. The workflow builds the docs
and updates the version directory and latest/ on the existing gh-pages
branch, preserving older versions. It refuses to deploy unless GitHub Pages
visibility is private.
Enable create_release to also create an internal GitHub release using the
version in pyproject.toml. Existing releases are left unchanged. Leave it
disabled for a documentation-only rebuild.