-
Notifications
You must be signed in to change notification settings - Fork 3
feat: parse project toml files manually #5
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
Closed
+639
−88
Closed
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
ba3ce17
feat: release_schedule workflow
savente93 30e7fa7
feat: have action.yml update pixi environments
savente93 0cdba7a
docs: Update README
savente93 2a2b9c0
fix: remove now defunct test_action.yaml
savente93 e6912aa
feat: add python module with helper functions and tests
savente93 7fee19f
feat: add main update script
savente93 62b17f2
feat: add workflow to run tests of python code
savente93 7ae79dc
fix: update release_schedule.yaml to use new env setup
savente93 9cc5d79
fix: update action.yaml to use new python code
savente93 190e210
doc: Update README.md
savente93 8319244
fix: update lockfile
savente93 a5894a9
fix: allow dependency groups in pep dependencies
savente93 221ece3
fix: use actual input variable
savente93 f027d82
fix: don't commit schedule.json
savente93 2b3570f
fix: test pep dependency with extras
savente93 52acc1b
fix: rename to spec0-action
savente93 4cf09ab
fix: fix pyproject.toml
savente93 890e1fa
fix: readme typo
savente93 fd06db1
Merge branch 'main' into feat/python
savente93 0e0cad5
fix: rename imports
savente93 17d74fa
fix: name issue in workflow
savente93 943e9a0
feat: make action test itself
savente93 8359b1f
fix: make schedule_path configurable so we can test it
savente93 533ecca
fix: import
savente93 4885cc3
fix: pass schedule_path to script
savente93 a103c2f
fix: fix pr step conditional
savente93 5764a23
Merge branch 'main' into feat/python
savente93 11f4297
Apply suggestions from code review
savente93 1edb4ec
fix: update authors
savente93 30042b8
fix: release packaging upper pin
savente93 fa31983
fix: use SP bot as git name
savente93 cad5872
fix: remove pixi.lock
savente93 999a1f3
fix: rename udpate script
savente93 d3f3bb6
fix: revert rename of versions script
savente93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # SCM syntax highlighting & preventing 3-way merges | ||
| pixi.lock merge=binary linguist-language=YAML linguist-generated=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Generate release schedule artifacts | ||
| on: | ||
| schedule: | ||
| # At 00:00 on day-of-month 1 in every 3rd month. (i.e. every quarter) | ||
| - cron: "0 0 1 */3 *" | ||
| # on demand | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| create-artifacts: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| # We're going to make a tag that we can we release so we'll need the full history for that | ||
| fetch-depth: 0 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
|
|
||
| - uses: prefix-dev/[email protected] | ||
| with: | ||
| pixi-version: "v0.49.0" | ||
| environments: schedule | ||
| - name: Run spec_zero_versions.py | ||
| run: | | ||
| pixi run -e schedule generate_schedule | ||
| - name: setup git | ||
| run: | | ||
| # git will complain if we don't do this first | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| - name: determine tag name | ||
| id: tag_name | ||
| run: | | ||
| echo "TAG_NAME=$(date '+%Y-Q%q')" >> "$GITHUB_OUTPUT" | ||
| - name: Publish github release | ||
| uses: softprops/action-gh-release@v2 | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| generate_release_notes: true | ||
| tag_name: ${{ steps.tag_name.outputs.TAG_NAME }} | ||
| make_latest: true | ||
| files: | | ||
| schedule.md | ||
| chart.md | ||
| schedule.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Run the update test suite | ||
| on: | ||
| push: | ||
| branches: main | ||
| pull_request: | ||
| branches: main | ||
| # on demand | ||
savente93 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| run-tests: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - uses: prefix-dev/[email protected] | ||
| with: | ||
| pixi-version: "v0.49.0" | ||
| environments: dev | ||
| - run: | | ||
| pixi run test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| .history | ||
| chart.md | ||
| schedule.md | ||
| schedule.json | ||
| # pixi environments | ||
| .pixi/* | ||
| !.pixi/config.toml | ||
| __pycache__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,74 @@ | ||
| name: "Generate SPEC-0000 Data" | ||
| description: "Based on the current SPEC 0 schedule, generate a tarball with the latest versions of all packages." | ||
| author: Sam Vente | ||
savente93 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| inputs: | ||
| target_branch: | ||
| description: "Target branch for the pull request" | ||
| required: true | ||
| default: "main" | ||
| project_file_name: | ||
| description: "The filename to the project file that lists your dependencies, relative to the repository root. Defaults to 'pyproject.toml' Curretnly only pyproject.toml is supported but others may be added." | ||
| required: true | ||
| default: "pyproject.toml" | ||
| create_pr: | ||
| description: "Whether the action should open a PR or not. If this is set to false, this action should have no effect. This is mainly useful for testing" | ||
| required: true | ||
| default: true | ||
| schedule_path: | ||
| description: "Path to the schedule.json file. If it does not exist yet, it will be downloaded from the spec0-action repository latest release" | ||
| default: schedule.json | ||
| token: | ||
| description: "GitHub token with repo permissions to create pull requests" | ||
| required: true | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| python-version: "3.13" | ||
| - name: Install dependencies | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Git | ||
| shell: bash | ||
| run: | | ||
| pip install -r requirements.txt | ||
| - name: Run spec_zero_versions.py | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
savente93 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - name: Download schedule artifact | ||
| shell: bash | ||
| env: | ||
| SCHEDULE_FILE: ${{ inputs.schedule_path }} | ||
| run: | | ||
| python spec_zero_versions.py | ||
| - name: Upload files as an artifact | ||
| uses: actions/upload-artifact@v4 | ||
| if [ ! -f "$SCHEDULE_FILE" ]; then | ||
| gh release download -R "scientific-python/spec0-action" --pattern schedule.json -O "$SCHEDULE_FILE" | ||
| fi | ||
| # make user pixi is available | ||
savente93 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - uses: prefix-dev/[email protected] | ||
| name: Setup pixi | ||
| with: | ||
| environments: >- | ||
| update | ||
| activate-environment: update | ||
| pixi-version: v0.49.0 | ||
| manifest-path: ${{github.action_path}}/pyproject.toml | ||
|
|
||
| - name: Run Update script | ||
| shell: bash | ||
| run: | | ||
| python ${{github.action_path}}/update.py "${{github.workspace}}/${{inputs.project_file_name}}" "${{inputs.schedule_path}}" | ||
| # let's cleanup after ourselves so it doesn't end up in the PR | ||
| rm "${{inputs.schedule_path}}" | ||
savente93 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - name: Create Pull Request | ||
| if: ${{ inputs.create_pr == 'true' }} | ||
| uses: peter-evans/create-pull-request@v6 | ||
| with: | ||
| name: spec-zero-versions | ||
| path: | | ||
| schedule.json | ||
| schedule.md | ||
| chart.md | ||
| token: ${{ inputs.token }} | ||
| commit-message: "chore: Drop support for unsupported packages conform SPEC 0" | ||
| title: "Drop support for unsupported packages conform SPEC 0" | ||
| body: "This PR was created automatically" | ||
| base: ${{ inputs.target_branch }} | ||
| branch: update-spec-0-dependencies-${{ github.run_id }} | ||
savente93 marked this conversation as resolved.
Show resolved
Hide resolved
|
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.