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
#15 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.