-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing CI/CD, documentation and licensing
- Loading branch information
Showing
47 changed files
with
438 additions
and
105 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -133,7 +133,7 @@ jobs: | |
run: nox -t lint | ||
|
||
test: | ||
name: Test Python ${{ matrix.py }} - ${{ matrix.os }}(${{ github.event_name }}) | ||
name: Test Python ${{ matrix.py }} - ${{ matrix.os }} (${{ github.event_name }}) | ||
runs-on: ${{ matrix.os }}-latest | ||
needs: | ||
- changes | ||
|
@@ -253,7 +253,10 @@ jobs: | |
(github.event_name == 'pull_request' ) || | ||
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || contains(github.ref, 'main'))) || | ||
(github.event_name == 'release') | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -277,8 +280,6 @@ jobs: | |
(github.event_name == 'pull_request' && contains(github.base_ref, 'main')) || | ||
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || contains(github.ref, 'main'))) || | ||
(github.event_name == 'release') | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -311,9 +312,11 @@ jobs: | |
(github.event_name == 'pull_request' && contains(github.base_ref, 'main')) || | ||
(github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || contains(github.ref, 'main'))) || | ||
(github.event_name == 'release') | ||
runs-on: ubuntus-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -323,18 +326,25 @@ jobs: | |
python -m pip install --upgrade pip | ||
pip install nox | ||
- name: Configure Git | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Build docs | ||
id: build_docs | ||
run: nox -t docs | ||
env: | ||
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Store build artifact | ||
- name: Select Branch | ||
run: git checkout ${{ steps.build_docs.outputs.branch_name}} | ||
|
||
- name: Store Docs Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs | ||
path: | | ||
docs/html/* | ||
!docs/html/.doctrees/* | ||
. | ||
test-build: | ||
name: Test Build Python ${{ matrix.py }} - ${{ matrix.os }} (${{ github.event_name }}) | ||
|
@@ -395,27 +405,25 @@ jobs: | |
if: > | ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && !contains(github.ref, 'dev-')) || | ||
github.event_name == 'release' | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/nskit | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.py }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Download build | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: dist | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U twine | ||
- name: Upload Packages | ||
run: | | ||
twine upload dist/*.whl --verbose --skip-existing | ||
twine upload dist/*.tar.gz --verbose --skip-existing | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
if: startsWith(github.ref, 'refs/tags') | ||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
|
||
publish-docs: | ||
name: Publish Docs | ||
|
@@ -429,16 +437,24 @@ jobs: | |
startsWith(github.ref, 'refs/tags') && !(contains(github.ref, 'gh-pages') || contains(github.ref, 'docs') || contains(github.ref, 'dev-')) | ||
) | ||
steps: | ||
- name: Download docs | ||
uses: actions/download-artifact@v4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
name: docs | ||
path: ./docs/html | ||
fetch-depth: 0 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Get Version | ||
id: get_version | ||
run: | | ||
tag_name=$(echo ${{github.ref}} | cut -d/ -f3) | ||
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT | ||
major=$(echo $tag_name | cut -d. -f0) | ||
echo "major=$major" >> $GITHUB_OUTPUT | ||
minor=$(echo $tag_name | cut -d. -f1) | ||
echo "minor=$minor" >> $GITHUB_OUTPUT | ||
patch=$(echo $tag_name | cut -d. -f2) | ||
echo "patch=$patch" >> $GITHUB_OUTPUT | ||
- name: Check Tag doesn't exist | ||
id: check_tag | ||
run: | | ||
|
@@ -449,10 +465,12 @@ jobs: | |
echo "tag_exists=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: steps.check_tag.outputs.tag_exists == false | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/html | ||
tag_name: docs-${{ steps.get_version.outputs.tag_name }} | ||
tag_message: 'Docs ${{ steps.get_version.outputs.tag_name }}' | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
mike set-default latest --config-file docs/mkdocs.yml | ||
mike deploy -u "${{ steps.get_version.outputs.major }}.${{ steps.get_version.outputs.minor}}" latest --config-file docs/mkdocs.yml -p | ||
git checkout gh-pages | ||
git pull origin | ||
git tag docs-${{ steps.get_version.outputs.tag_name }} | ||
git push origin |
This file contains 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 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 |
---|---|---|
|
@@ -10,6 +10,9 @@ on: | |
jobs: | ||
update_draft_release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
steps: | ||
# Drafts your next Release notes as Pull Requests are merged into "master" | ||
- uses: toolmantim/[email protected] | ||
|
This file contains 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 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 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,20 @@ | ||
Copyright (c) 2020-202x The nskit developers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains 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,16 @@ | ||
# NSkit | ||
|
||
``nskit`` is a python package that provides useful utilities and implementations for creating and managing a namespaced codebase for python and other programming languages. | ||
|
||
Please see the documentation at https://djpugh.github.io/nskit for more information (the contribution guidelines can also be found at [docs/developing.md](docs/developing.md)) | ||
|
||
|
||
|
||
# ToDo: | ||
|
||
- [*] Testspace configuration | ||
- [*] future annotations? | ||
- [*] Sonar coverage | ||
- [*] FOSSA API | ||
- [*] CodeQL | ||
- [*] Build docs |
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<browserconfig> | ||
<msapplication> | ||
<tile> | ||
<square150x150logo src="/mstile-150x150.png"/> | ||
<TileColor>#da532c</TileColor> | ||
</tile> | ||
</msapplication> | ||
</browserconfig> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,14 @@ | ||
{ | ||
"name": "", | ||
"short_name": "", | ||
"icons": [ | ||
{ | ||
"src": "/android-chrome-72x72.png", | ||
"sizes": "72x72", | ||
"type": "image/png" | ||
} | ||
], | ||
"theme_color": "#ffffff", | ||
"background_color": "#ffffff", | ||
"display": "standalone" | ||
} |
This file contains 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.