Conda releases of featuretools rely on PyPI's hosted featuretools packages. Since we cannot reupload featuretools to PyPI using the same version number, it is important ensure the version we upload works with conda so that we don't have to immediately release a new version of featuretools or skip supporting conda for one release cycle. We can test if a featuretools release will run on conda by uploading a release candidate version of featuretools to PyPI's test server and building a conda version of featuretools based on the test servers' featuretools package.
Branches on the conda-forge featuretools repo are automatically built and the package uploaded to conda-forge, so to test a release without uploading to conda-forge we need to fork into a separate repo and develop there.
- Fork conda-forge/featuretools-feedstock: visit https://github.com/conda-forge/featuretools-feedstock and click fork
- Clone forked repo locally
- Add conda-forge repo as the 'upstream' repository
git remote add upstream https://github.com/conda-forge/featuretools-feedstock.git
- If your made the fork previously and its master branch is missing commits, update it with any changes from upstream
git fetch upstream git checkout master git merge upstream/master git push origin master
- Make a branch with the version you want to release
git checkout -b new-featuretools-version
Before we can update the conda recipe we need an uploaded package for the recipe to use
- Make a new release candidate branch on featuretools (in this example we'll use version 0.7.0)
git checkout -b v0.7.0rc
- Update version number in
setup.py
,featuretools/version.py
,featuretools/tests/test_version.py
to v0.7.0rc1 and push branch to repo - Upload release candidate to test.pypi.org
docker run \ --rm \ -it \ -v /path/to/upload.sh:/home/circleci/upload.sh \ circleci/python:3 /bin/bash -c "bash /home/circleci/upload.sh v0.7.0rc testpypi"
Fields to update in recipe/meta.yaml
of feedstock repo:
- Set the new release number (e.g. v0.7.0rc1)
{% set version = "0.7.0rc1" %}
- Source fields
- url - visit https://test.pypi.org/project/featuretools/, find correct release, go to download files page, and copy link location of the tar.gz file
- sha256 - click on SHA256 link next to tar.gz to copy it
source: url: https://test-files.pythonhosted.org/packages/e9/79/4fc79465159f6700c1f7b9cf7403b9e455b40e659f3c979ce282f2eb9bf2/featuretools-0.7.1rc1.tar.gz sha256: d9d542172d50b00c6a7154577b8a0ba5f1f500e3f940d83c9e46b4d4a36bf57a
- setup-requirements.txt dependencies go here
requirements: host: - pip - python
- requirements.txt dependencies go here
requirements: run: - click - cloupickle
- test-requirements.txt dependencies go here
test: requires: - fastparquet - mock
- Install conda
- If using pyenv,
pyenv install miniconda3-latest
- Otherwise follow instructions in conda docs
- If using pyenv,
- Install conda-build package
conda install conda-build
- Build featuretools package
conda-build /path/to/recipe/dir
- Install conda-smithy (conda-forge tool to update boilerplate in repo)
conda install -n root -c conda-forge conda-smithy
- Run conda-smithy on feedstock
cd /path/to/feedstock/repo conda-smithy rerender --commit auto
- Make a PR on conda-forge/featuretools-feedstock from the forked repo and let CI tests run - indicate that this pr should not be merged
- After the tests pass, close the PR without merging
- Branch off of master and name the branch the release version number (e.g. v0.7.1)
- Bump verison number in
setup.py
,featuretools/version.py
, andfeaturetools/tests/test_version.py
.
- Grab commit history since last release
Which displays something like
git log --pretty=oneline --abbrev-commit
40298ad Automatically generate name for controllable primitives (#481) 23dc0b1 Check for duplicates Fix (#479) cf98910 Update how standard primitives are imported internally (#482) c30d842 v0.7.0 (#477)
- Copy all the commits since the past release into a new entry in
docs/source/changelog.rst
In order for the documentation to build with proper links, we need to use special syntax to link to github users and pull requests.**v0.7.1** Apr 12, 2019 * Automatically generate name for controllable primitives (#481) * Check for duplicates Fix (#479) * Update how standard primitives are imported internally (#482)
Confusing commit descriptions should be updated and commits related to the same feature can be grouped together. Testing updates and documentation updates can be simplified into one commit each, unless a change deserves its own description.* Automatically generate name for controllable primitives (:pr:`481`) Thanks to :user:`kmax12` for contributing to this release
- Thank each github user who contributed to the updates in this release
**v0.7.1** Apr 12, 2019 * Automatically generate name for controllable primitives (#481) Thanks to the following people for contributing to this release: :user:`user1`, :user:`user2`, :user:`user3`
A release pr should have the version number as the title and the changelog updates as the PR body text. The contributors line is not necessary. The special docs syntax needs to be reverted back to #547
style for PR links.
After the release pull request has been merged into the master branch, it is time draft the github release. Example release
- The target should be the master branch
- The tag should be the version number with a v prefix (e.g. v0.7.1)
- Release title is the same as the tag
- Release description should be the full changelog updates for the release, including the line thanking contributors.
- Update circleci's python3 image
docker pull circleci/python:3
- Run upload script
- Replace
/absolute/path/to/upload.sh
with the actual path - Replace the "release_tag" part of
tags/release_tag
with the actual tag
docker run \ --rm \ -it \ -v /absolute/path/to/upload.sh:/home/circleci/upload.sh \ circleci/python:3 \ /bin/bash -c "bash /home/circleci/upload.sh tags/release_tag"
- Replace
From root
cd docs
python source/upload.py --root
- Release featuretools on PyPI
- Wait for bot to create new PR in conda-forge/featuretools-feedstock
- Update requirements in
recipe/meta.yaml
(bot should have handled version and source links on its own) - After tests pass, merge the PR