Steps to release a new version:
-
Ensure all regression tests are passing on all supported versions of Python and Pandas. The current versions are:
- Python: 3.6, 3.7, 3.8
- Pandas: 1.0.x, 1.1.x, 1.2.x, 1.3.x
It is not necessary to test all combinations; just make sure that you test each Python version and each Pandas version at least once.
To install the latest Pandas on the 1.0.x branch, use the command:
pip install --upgrade --force "pandas>=1.0,<1.1"
-
Ensure Watson NLU service API tests are enabled and passing by setting IBM_API_KEY and IBM_SERVICE_URL, then running unit tests with pytest.
-
Activate your Text Extensions for Pandas build environment (usually called
pd
) -
Ensure that all the notebooks under the
notebooks
directory run and produce substantially the same output as before. This step only needs to be done with our primary versions of Python and Pandas at the time of the release. -
Ensure that all the notebooks under the
tutorials
directory run and produce substantially the same output as before. Note that some of these notebooks need to run overnight. -
Ensure that the API docs generate without errors or warnings.
-
Increment the version number in
setup.py
. -
Create and merge a pull request against master that increments the version number.
-
Remove the
dist
directory if present and runpython setup.py sdist bdist_wheel
-
Inspect the contents of the
dist
directory. It should look something like this:(pd) freiss@fuzzy:~/pd/tep-alpha2$ ls dist text_extensions_for_pandas-0.1a2-py3-none-any.whl text_extensions_for_pandas-0.1a2.tar.gz (pd) freiss@fuzzy:~/pd/tep-alpha2$
-
Create a new Anaconda environment and install JupyterLab and the
.whl
file you just created into the new environment:conda deactivate conda create --prefix testenv python=3.8 pip jupyterlab conda activate ./testenv pip install dist/text_extensions_for_pandas*.whl
-
Activate your new environment, start up JupyterLab, and verify that the notebooks under
notebooks
still run. -
(optional): Do a test upload to TestPyPI by running:
python -m twine upload --repository testpypi dist/*
-
Upload to PyPI by running:
python -m twine upload dist/*
-
Tag and create a new release using the Github web UI.
These steps are from the general process described in https://conda-forge.org/docs/maintainer/updating_pkgs.html
A. Setup local repo and branch for the update
- Fork repo https://github.com/conda-forge/text_extensions_for_pandas-feedstock
- Clone fork as origin and add upstream remote
- Fetch and rebase local master with upstream/master
- Make branch e.g. update_0_1_b3
B. Edit and test the recipe file
- Edit recipe/meta.yaml
- Update version string
- Download source code tar.gz file (link with "archive" ~ 23MB)from github release and run: openssl sha256 path/to/text_extensions_for_pandas-0.1b3.tar.gz update source/sha256 hash string in recipe
- Update dependency info to match requirements.txt
- Bump the build number if version is unchanged, reset build number to 0 if version is changed
- Test changes locally with "python build-locally.py" (requires Docker)
C. Push changes to the forked repo and make a PR
- Follow instructions and checklist in PR
- Wait for checks to pass
- Merge PR to master branch, using Github interface is fine
- Once merged, the conda package will be created automatically