Skip to content

Conversation

@maraxen
Copy link

@maraxen maraxen commented Oct 30, 2025

Introduces several modern development practices to improve code quality, enforce style consistency, and streamline testing and deployment. Feel free to cherry pick out what you want in the main repo.

The changes primarily focus on adopting industry best practices for a Python package, enhancing the developer experience (DX), and providing a quick-start example and API docs reference for users beyond the README.

✨ Key Enhancements

🚀 Continuous Integration (CI/CD)

  • Added GitHub Actions for CI:
    • ci.yml: Runs quality checks and tests on pushes and pull requests to ensure code health across different Python versions.
    • publish-to-pypi.yml: Sets up an automated workflow for publishing the package to PyPI upon a release tag, streamlining the deployment process.
  • Modernized Packaging: Migrated to pyproject.toml for project configuration and dependency management, replacing older setup.py formats.

💻 Developer Experience (DX) & Code Quality

  • Integrated Pre-commit Hooks: Added a .pre-commit-config.yaml to automatically run quality checks before commits are made. This ensures consistent code style across all contributors.
  • Initial Unit Testing: Included a basic test file (tests/test_viewer.py) and configured the CI to run tests using pytest.
  • Configuration Files: Added .gitignore, .vscode/settings.json, and uv.lock for better environment and editor consistency.

📚 Documentation & Examples

  • Example Colab Notebook: Added a ready-to-use example/example.ipynb notebook to showcase the main functionalities of py2dmol, making it easier for new users to get started. This can be accessed with a badge on the README.
  • Updated README.md: Incorporated new badges (CI status, PyPI version, code coverage, Colab link) and updated the structure to reflect the new documentation and examples.
  • Initial Documentation Structure: Added a docs/ folder with Sphinx/RST files (index.rst, api.rst, installation.rst, etc.) for potential future detailed documentation generation. This will need to be setup with actual github pages to host the docs.

These changes should make the repository easier to maintain, contribute to, and use.

Some points to clarify:

  • range of python versions to support (from future should cover many issues if we want to support older python versions not typically used in colab)

google-labs-jules bot and others added 14 commits October 30, 2025 16:06
…e with the correct metadata, and removed the old `setup.py` file.

I have successfully added `ruff` as a dependency and configured it in `pyproject.toml`.

I have successfully cleared the codebase of all linting errors, except for the `N999` errors which I am ignoring. I am now ready to move on to the next step.

I'm satisfied with this level of coverage and am ready to move on to the next step.

This step is now complete.

I have replaced `pyright` with `basedpyright` and configured it in `pyproject.toml`. This step is now complete.
Modernize development to include CI pipelines, linting, etc.
Updates the CI to support Python 3.12+ and more closely align with the new ci.yml structure.

- Splits the CI into `quality-checks`, `unit-tests`, and `build-and-deploy-docs` jobs.
- Uses `uv` for dependency management.
- Adds Python 3.11, 3.12 and 3.13 to the test matrix.
- Sets Python 3.13 as the version for quality checks.
- Adds optional dependencies to `pyproject.toml`.
- Ignores `*.egg-info` directories.
Update CI to support Python 3.12+ and new structure
…ntific computing and molecular biology. Addressed linting and static type checking issues
…ements in examples

refactor: Change package name from py2Dmol to py2dmol in code examples. this renaming aligns with python standards recommended by PEP8.
chore: Update uv.lock to streamline development dependencies
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.

1 participant