Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: Use cibuildwheel to build and deploy to PyPI #346

merged 18 commits into from Jun 3, 2021


Copy link

@bocklund bocklund commented Jun 3, 2021


  • Use PyPA/cibuildwheel to build wheels (and source) distributions and deploy them to PyPI.
  • The builds are run and artifacts are uploaded to GitHub on every push and pull request. The artifacts are only deployed to PyPI if the workflow is triggered by a GitHub Release event.
  • Drops Python 3.6 following (NEP 29 recommendation)
  • Pin to pyparsing v2 because v3 seemed to result in some breakages (it's still in pre-release stage, I did not investigate the error)
  • Update RELEASING document with the new steps for creating a release to trigger CI. Make the steps more bulletproof. Build the document into the new "Developer" section on the docs website.

Try out the package

I made some test alpha releases on (most up-to-date is 0.9.0a1.post2). This is just on We can wipe it clean after merging this PR. The pre-releases can be installed with

  • pip install --pre --extra-index-url "pycalphad>0.8.5"
  • pytest --pyargs pycalphad

Testing the artifacts in CI

Because the cibuildwheel process is already long running relative to our platform build matrix tests, I opted to not use the cibuildwheel testing feature. Since releasing is so rare and we want to be sure we get it right, I'm open to trying it out.

Using the GitHub uploaded artifacts

Since the build artifacts are uploaded to GitHub, we could manually pull them down for local testing or have a job step to put them on an S3 bucket at some point. Not implemented here at this time.

Copy link
Collaborator Author

bocklund commented Jun 3, 2021

The 0.9.0a1.post2 build is still in progress:

0.9.0a1 "works", but pulls down a pre-release of pyparsing v3. Installing our pre-release of 0.9.0a1, then uninstalling pyparsing v3 in favor of a v2 gave working tests.

0.9.0a1.post2 is available.

Copy link

codecov bot commented Jun 3, 2021

Codecov Report

Merging #346 (cf57246) into develop (373d121) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #346   +/-   ##
  Coverage    89.75%   89.75%           
  Files           44       44           
  Lines         4275     4275           
  Hits          3837     3837           
  Misses         438      438           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 373d121...cf57246. Read the comment docs.

Copy link
Collaborator Author

bocklund commented Jun 3, 2021

I made some changes to the RELEASING doc that outlines the new release and deployment steps. I also included the steps in a new "Developer" toctree in the docs, so it will be on the website now. Hopefully it'll be a lot easier to follow and copy-paste steps this way.

Screenshots of the changes to the docs:

New sidebar while on the main page

Screen Shot 2021-06-03 at 3 38 13 PM

Releasing page with expanded sidebar

Screen Shot 2021-06-03 at 3 38 01 PM

@bocklund bocklund requested a review from richardotis June 3, 2021 20:36
Copy link
Collaborator Author

bocklund commented Jun 3, 2021

For reference, the archive can be downloaded from
Screen Shot 2021-06-03 at 4 34 05 PM

.github/workflows/deploy.yaml Show resolved Hide resolved
.github/workflows/deploy.yaml Show resolved Hide resolved
RELEASING.rst Show resolved Hide resolved
environment-dev.yml Show resolved Hide resolved
@bocklund bocklund merged commit 2e79f0f into pycalphad:develop Jun 3, 2021
@bocklund bocklund deleted the cibuildwheel branch June 3, 2021 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants