Skip to content

Split Azure Pipelines configuration into multiple files - #1481

Merged
santisoler merged 80 commits into
mainfrom
split-deploy-docs-pypi
Jun 18, 2024
Merged

Split Azure Pipelines configuration into multiple files#1481
santisoler merged 80 commits into
mainfrom
split-deploy-docs-pypi

Conversation

@santisoler

@santisoler santisoler commented Jun 7, 2024

Copy link
Copy Markdown
Member

Split the stages from azure-pipelines.yml into multiple files under the .ci/azure directory. Strip deployment to PyPI from the deployment of the docs into different stages. Add new job to upload each version merged to main to TestPyPI. Configure the setuptools_scm local version scheme so we can modify it before building the wheels for TestPyPI. Refactor the new docs pipeline: have a single build job and two jobs for deploying the docs to simpeg-doctest, one after a release and one for nightly builds. While building the sdist (before pushing to PyPI), rely on build to install build dependencies listed in pyproject.toml in isolation.

@santisoler
santisoler marked this pull request as draft June 7, 2024 23:23
@santisoler santisoler changed the title split deploy docs pypi Split Azure Pipelines configuration into multiple files Jun 7, 2024
@codecov

codecov Bot commented Jun 7, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.18%. Comparing base (eee9ce4) to head (3d00eb6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1481      +/-   ##
==========================================
- Coverage   86.19%   86.18%   -0.01%     
==========================================
  Files         394      394              
  Lines       50299    50299              
  Branches     5309     5309              
==========================================
- Hits        43353    43351       -2     
- Misses       5493     5494       +1     
- Partials     1453     1454       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jcapriot jcapriot mentioned this pull request Jun 10, 2024
6 tasks
@santisoler santisoler added this to the 0.22.0 milestone Jun 14, 2024
Also, replace `setup.py` for `pyproject.toml` when updating the
`local_scheme` configuration for `setuptools_scm`.
Update docs.yml so now it makes use of the setup scripts in `.ci`.
Comment thread .ci/azure/pypi.yml Outdated
Also bump minimum versions for setuptools and setuptools_scm, according
to the ones used in pyproject.toml.
Install only build and twine for building simpeg, since the build
requirements will be installed in an isolated environment. By removing
the `--skip-isolation` option we solve the issue of not getting the
proper version in the built package.
@santisoler
santisoler requested a review from jcapriot June 18, 2024 19:22
@santisoler

Copy link
Copy Markdown
Member Author

@jcapriot, I think this is ready to be merged. Would you take a second look at it?

Comment thread .ci/azure/pypi.yml
displayName: "Configure local_scheme (except on release)"

- bash: |
python -m build --sdist .

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The biggest change I made after updating this branch once the pyproject.toml was merged was to change how we build the sdist. Instead of installing the build dependencies (and pin the versions here in the yml), I just install build and let it install the required build dependencies in isolation. This also solved an issue I saw when trying to push to TestPyPI, where the sdist didn't have the right simpeg version. I think it was related to incompatible versions of setuptools and setuptools_scm.

@jcapriot jcapriot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little bit more cleanup.

Comment thread .ci/azure/old-docs.yml Outdated
- bash: .ci/azure/setup_env.sh
displayName: Setup SimPEG environment

- script: |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remove this step since it uploads to pypi in the other file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! I forgot to update the new version of the old-docs.yml as well 🤦🏼‍♂️

@santisoler
santisoler merged commit 3eb16c0 into main Jun 18, 2024
@santisoler
santisoler deleted the split-deploy-docs-pypi branch June 18, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants