title: Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions¶
Report Bugs¶
Report bugs at https://github.com/shankarpandala/lazypredict/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Your Python version and virtual environment details.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Fix Bugs¶
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
Implement Features¶
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
Write Documentation¶
Lazy Predict could always use more documentation, whether as part of the official Lazy Predict docs, in docstrings, or even on the web in blog posts, articles, and such.
Submit Feedback¶
The best way to send feedback is to file an issue at https://github.com/shankarpandala/lazypredict/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome.
Get Started!¶
Ready to contribute? Here's how to set up lazypredict for
local development.
-
Fork the
lazypredictrepo on GitHub. -
Clone your fork locally:
-
Install your local copy into a virtual environment:
-
Create a branch for local development:
Now you can make your changes locally.
-
When you're done making changes, check that your changes pass flake8 and the tests:
You can also run the test suite on every supported Python version with tox:
-
Commit your changes and push your branch to GitHub:
-
Submit a pull request through the GitHub website.
Pull Request Guidelines¶
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
- The pull request should work for Python 3.10 through 3.14. GitHub Actions CI will automatically run the tests for all supported Python versions.
Tips¶
To run a subset of tests:
To run tests with coverage:
Releasing¶
Releases are cut from dev and published to PyPI by
.github/workflows/publish.yml, which runs when a GitHub release is
published (pushing a tag on its own does not publish anything).
-
Bump the version.
lazypredict/__init__.pyis the single source of truth (pyproject.tomlreads it);recipe/meta.yaml,CITATION.cffand.bumpversion.cfgmust carry the same string, whichtests/test_version.pyenforces:For a pre-release, pass the exact version instead, e.g.
bump-my-version bump --new-version 0.5.0a1;bump-my-version bump pre_nthen goes to0.5.0a2, and--new-version 0.5.0finalizes it. -
Move the "Unreleased" notes in
HISTORY.mdunder the new version and updatedate-releasedinCITATION.cff. -
Open a pull request into
dev, wait for CI to pass, and merge it. -
On GitHub, draft a new release on the merged commit with tag
v<version>(for examplev0.4.0; tick "Set as a pre-release" fora/b/rcversions) and publish it.
The publish workflow first checks that the tag matches
lazypredict.__version__ and fails before building anything if it does
not, then runs the tests, builds the sdist and wheel, smoke-tests the wheel,
uploads them to PyPI via Trusted Publishing and attaches them to the
GitHub release. If an upload fails for a transient reason, re-run it from
the Actions tab (Publish to PyPI > Run workflow, entering the tag).
Instead of step 4 you can push an annotated tag on the merged commit and run the workflow manually for it:
git tag -a v0.4.0 -m "0.4.0" && git push origin v0.4.0
gh workflow run publish.yml --ref v0.4.0 -f tag=v0.4.0
The workflow then creates the GitHub release, with generated notes, after the upload to PyPI has succeeded.
The conda-forge feedstock picks up new PyPI releases automatically through
the conda-forge autotick bot; recipe/meta.yaml is only used by CI to check
that the package still builds with conda.