This guide outlines the steps for version management, building, and deploying the starrydata package to both the PyPI Test and Production repositories using automated scripts.
- Python 3.9 or higher
bumpversionfor version managementbuildfor building the packagetwinefor uploading the package to PyPI
First, ensure you have the necessary tools installed:
pip install bumpversion build twineTo deploy a new version of the starrydata package, run the publish.sh script with the appropriate version bump argument and optionally specify --test to deploy to the PyPI Test repository:
-
For a patch version update (e.g., 0.0.8 → 0.0.9):
./publish.sh patch
-
For a minor version update (e.g., 0.0.8 → 0.1.0):
./publish.sh minor
-
For a major version update (e.g., 0.0.8 → 1.0.0):
./publish.sh major
To deploy to the PyPI Test repository, add the --test flag:
./publish.sh patch --testThis script will:
- Update the version using
bumpversionand commit the changes. - Clean the
distdirectory. - Build the package using
python -m build. - Upload the built package to the specified PyPI repository (Test or Production) using
twine.
You can install Starrydata from PyPI using the following command:
pip install starrydataIf you want to install from the PyPI test repository for testing purposes, use the following command:
pip install --index-url https://test.pypi.org/simple/ --no-deps starrydata- Ensure that your
TEST_PYPI_API_TOKENandPYPI_API_TOKENenvironment variables are set with your Test PyPI and Production PyPI API tokens, respectively. - The
.bumpversion.cfgfile should be adjusted if additional files or specific configurations are needed.
By following this guide, maintainers can streamline the deployment process of the starrydata package, making it more efficient and less error-prone.