-
Notifications
You must be signed in to change notification settings - Fork 0
Improvements to package workflow and documentation #29
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
Open
jkanche
wants to merge
11
commits into
master
Choose a base branch
from
eol_eoy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7a9a84f
minor changes
jkanche ef1ca96
update actions
jkanche 43775ea
minor docstring updates
jkanche 591af1f
missing import
jkanche ffaa870
Merge branch 'master' into eol_eoy
jkanche 21b8bfc
renaming to follow pep guidelines
jkanche dea3483
rename files
jkanche 5692f35
remove 3.9 from actions
jkanche 31bb627
export biocobject
jkanche c8aa740
NamedList() refer to use from_dict instead
jkanche cd0fa74
switch to classmethod
jkanche 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,52 @@ | ||
| name: Publish to PyPI | ||
|
|
||
| on: | ||
| push: | ||
| tags: "*" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| repository-projects: write | ||
| contents: write | ||
| pages: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.12 | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install tox | ||
|
|
||
| - name: Test with tox | ||
| run: | | ||
| tox | ||
|
|
||
| - name: Build Project and Publish | ||
| run: | | ||
| python -m tox -e clean,build | ||
|
|
||
| # This uses the trusted publisher workflow so no token is required. | ||
| - name: Publish to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
|
||
| - name: Build docs | ||
| run: | | ||
| tox -e docs | ||
|
|
||
| - run: touch ./docs/_build/html/.nojekyll | ||
|
|
||
| - name: GH Pages Deployment | ||
| uses: JamesIves/github-pages-deploy-action@v4 | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Publish to PyPI' step
Uses Step Error loading related location Loading |
||
| with: | ||
| branch: gh-pages # The branch the action should deploy to. | ||
| folder: ./docs/_build/html | ||
| clean: true # Automatically remove deleted files from the deploy branch | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,73 @@ | ||
| name: Test the library | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master # for legacy repos | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - master # for legacy repos | ||
| - main | ||
| workflow_dispatch: # Allow manually triggering the workflow | ||
| schedule: | ||
| # Run roughly every 15 days at 00:00 UTC | ||
| # (useful to check if updates on dependencies break the package) | ||
| - cron: "0 0 1,16 * *" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: >- | ||
| ${{ github.workflow }}-${{ github.ref_type }}- | ||
| ${{ github.event.pull_request.number || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| strategy: | ||
| matrix: | ||
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| platform: | ||
| - ubuntu-latest | ||
| - macos-latest | ||
| - windows-latest | ||
| runs-on: ${{ matrix.platform }} | ||
| name: Python ${{ matrix.python }}, ${{ matrix.platform }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| id: setup-python | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install tox coverage | ||
|
|
||
| - name: Run tests | ||
| run: >- | ||
| pipx run --python '${{ steps.setup-python.outputs.python-path }}' | ||
| tox | ||
| -- -rFEx --durations 10 --color yes --cov --cov-branch --cov-report=xml # pytest args | ||
|
|
||
| - name: Check for codecov token availability | ||
| id: codecov-check | ||
| shell: bash | ||
| run: | | ||
| if [ ${{ secrets.CODECOV_TOKEN }} != '' ]; then | ||
| echo "codecov=true" >> $GITHUB_OUTPUT; | ||
| else | ||
| echo "codecov=false" >> $GITHUB_OUTPUT; | ||
| fi | ||
|
|
||
| - name: Upload coverage reports to Codecov with GitHub Action | ||
| uses: codecov/codecov-action@v5 | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action in workflow Medium
Unpinned 3rd party Action 'Test the library' step
Uses Step Error loading related location Loading |
||
| if: ${{ steps.codecov-check.outputs.codecov == 'true' }} | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
| slug: ${{ github.repository }} | ||
| flags: ${{ matrix.platform }} - py${{ matrix.python }} | ||
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
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
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.
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.
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium