-
Notifications
You must be signed in to change notification settings - Fork 1
auto publish to pypi on tagged commit #23
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
81390b1
remove testing file
PolarBean 4358d7b
auto publish to pypi on release
PolarBean d3845c3
update yml file and python versions
PolarBean 01f922a
remove scheduled deploy
PolarBean 690b392
remove twine api key as we can instead set the repo to be a trusted p…
PolarBean 81a5a94
run black linter
PolarBean 1534156
enforce line lengths
PolarBean e7ef967
enforce 79 char line length
PolarBean 88d03d3
exclude files that will not be included in pypi
PolarBean 73f9b8a
remove line length from ruff as its failing test (its still specified…
PolarBean fc84555
fix issue with test
PolarBean 423fbde
update license file to avoid spdx warning
PolarBean cd98cdf
ruff fixes
PolarBean 56cb5e4
correct line incorrectly removed from ingestion script and caught by …
PolarBean e9edb2a
remove unused variable caught by precommit
PolarBean 3131485
make ruff happy
PolarBean fca46ec
ruff reformat
PolarBean db9f4ba
exclude utilities
PolarBean cfb61c4
precommit passed locally but failed remotely, updating reqs and license
PolarBean 352bca9
move docstring to beginning of file
PolarBean bbcc26c
tests failing bc of triple quoted comments
PolarBean 013347b
ruff reformat
PolarBean 6f800d6
test off by 0.5 voxels...
PolarBean 179fd2a
rename test case
PolarBean 6b70855
revert test value
PolarBean 7849626
fix empty last line
PolarBean e0671fb
autofix files precommit
PolarBean 6f7beca
Auto detect same space atlases (#26)
PolarBean 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,63 @@ | ||
| name: tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| tags: | ||
| - "v**" | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| linting: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: neuroinformatics-unit/actions/lint@v2 | ||
|
|
||
| manifest: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: neuroinformatics-unit/actions/check_manifest@v2 | ||
|
|
||
| test: | ||
| needs: [linting, manifest] | ||
| name: ${{ matrix.os }} py${{ matrix.python-version }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| python-version: ["3.11", "3.12", "3.13"] | ||
| include: | ||
| - os: macos-latest | ||
| python-version: "3.11" | ||
| - os: windows-latest | ||
| python-version: "3.11" | ||
|
|
||
| steps: | ||
| - uses: neuroinformatics-unit/actions/test@v2 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| secret-codecov-token: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| build_sdist_wheels: | ||
| name: Build source distribution and wheel | ||
| needs: [test] | ||
| if: github.event_name == 'push' && github.ref_type == 'tag' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: neuroinformatics-unit/actions/build_sdist_wheels@v2 | ||
|
|
||
| upload_all: | ||
| name: Publish build distributions | ||
| needs: [build_sdist_wheels] | ||
| if: github.event_name == 'push' && github.ref_type == 'tag' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: artifact | ||
| path: dist | ||
| - uses: pypa/gh-action-pypi-publish@release/v1 | ||
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
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this file necessary? The instructions can be found https://brainglobe.info/community/developers/new_releases.html |
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,8 +1,19 @@ | ||
| to deploy the package to PyPi | ||
| # Deploying to PyPI | ||
|
|
||
| ## Automatic Deployment (Recommended) | ||
|
|
||
| The package is automatically published to PyPI when you push a version tag: | ||
|
|
||
| 1. Update your version as needed | ||
| 2. Create and push a tag: `git tag v0.1.0 && git push --tags` | ||
| 3. The GitHub Action will run tests, build, and upload to PyPI | ||
|
|
||
| **Note:** You need to add a `TWINE_API_KEY` secret to your repository with your PyPI API token. | ||
|
|
||
| ## Manual Deployment | ||
|
|
||
| ```bash | ||
| pip install build twine | ||
| pip install build twine | ||
| python -m build | ||
| twine upload dist/* | ||
| ``` | ||
| ``` |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We typically have these set to
3.13(or the latest compatible version of Python being tested)