scikit-learn / scikit-learn/scikit-learn-release
Copy check_version from numpy to make sure we build from a tag when we upload to PyPI
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 2
- Forks
- 4
- Avg merge
- 7h 51m
- Merged PRs (30d)
- 5
Description
This seems useful:
https://github.com/numpy/numpy-release/blob/ff6643cbdf5bcd6f5ef5430682d2cb1b385a2e72/.github/workflows/wheels.yml#L240-L256
check_version:
name: Ensure commit is tag before upload to PyPi
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi'
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- name: Checkout numpy
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: numpy/numpy
ref: ${{ env.SOURCE_REF_TO_BUILD }}
path: numpy-src
fetch-depth: 0
fetch-tags: true
submodules: false
persist-credentials: false
- name: Examine git commit
run: |
cd numpy-src
hash=$(git describe HEAD)
echo $hash
if [[ $hash == *"-"*"-"* ]]; then
echo "SOURCE_REF_TO_BUILD is not a tag"
exit 1
else
echo "SOURCE_REF_TO_BUILD is a tag"
fi;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the GitHub Actions workflow that builds and uploads release artifacts, then compare its PyPI path with the linked numpy workflow. Add a check for the source commit before upload so a non-tagged build fails, and verify the workflow still permits tagged PyPI releases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github-actions, shell
- Domain
- ci-cd, release
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100