-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Replace Poetry with Rye * misc: switch from pyright to basedpyright * misc: remove unused dependencies * misc: default to latest Python 3.12 version * misc: replace poetry based workflows with rye * feat(changelog): Replace towncrier to git-cliff (still needs CI and docs) * feat: make docs and changelog work with rye * feat: add readthedocs support for rye * feat: add readthedocs support for rye * feat: add readthedocs support for rye * feat: Replace Poetry with Rye * misc: switch from pyright to basedpyright * misc: remove unused dependencies * feat(changelog): Replace towncrier to git-cliff (still needs CI and docs) * feat: make docs and changelog work with rye * feat: add readthedocs support for rye * feat: add readthedocs support for rye * feat: add readthedocs support for rye * misc(pyproject): remove unneeded commented out config * fix(poetry): remove poetry lock * fix(ci): use correct path when enabling the venv fro building the docs * fix(ci): run `rye test` instead of `poetry run pytest` * fix(ci): typo in release workflow regarding latest changelog file
- Loading branch information
1 parent
0691547
commit 7f6de82
Showing
139 changed files
with
2,085 additions
and
2,375 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 |
---|---|---|
|
@@ -18,50 +18,47 @@ name: Python CI | |
|
||
on: | ||
push: | ||
branches: [ master ] | ||
branches: [master] | ||
pull_request: | ||
branches: [ master, develop ] | ||
branches: [master, develop] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python 3.11 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
- name: Set up Python 3.12 | ||
uses: actions/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
python-version: "3.12" | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4.1.0 | ||
- name: Setup Rye | ||
id: setup-rye | ||
uses: eifinger/setup-rye@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
version: "0.41.0" | ||
enable-cache: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install Project Dependencies | ||
run: poetry install --with docs | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: rye sync --all-features | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
|
||
- name: Run pre-commit | ||
run: | | ||
source .venv/bin/activate | ||
. .venv/bin/activate | ||
pre-commit run --all-files | ||
- name: Sphinx Build | ||
working-directory: ./docs | ||
run: | | ||
source ../.venv/bin/activate | ||
. ../.venv/bin/activate | ||
make html | ||
- name: Test with pytest | ||
run: | | ||
source .venv/bin/activate | ||
poetry run pytest | ||
. .venv/bin/activate | ||
rye test |
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 |
---|---|---|
|
@@ -28,28 +28,23 @@ jobs: | |
working-directory: ./docs | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Set up Python 3.10 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.10" | ||
uses: actions/[email protected] | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
- name: Set up Python 3.12 | ||
uses: actions/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
python-version: "3.12" | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4.1.0 | ||
- name: Setup Rye | ||
id: setup-rye | ||
uses: eifinger/setup-rye@v4 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
enable-cache: true | ||
version: "0.41.0" | ||
|
||
- name: Install Project Dependencies | ||
run: poetry install -E docs | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: rye sync --all-features | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
|
||
- name: Make docs | ||
working-directory: ${{env.working-directory}} | ||
|
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 |
---|---|---|
|
@@ -27,43 +27,33 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
- name: Set up Python 3.10 | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.10" | ||
python-version: "3.12" | ||
|
||
- name: Install Poetry | ||
uses: snok/[email protected] | ||
- name: Setup Rye | ||
id: setup-rye | ||
uses: eifinger/setup-rye@v4 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
version: "0.41.0" | ||
enable-cache: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/[email protected] | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install Project Dependencies | ||
run: rye sync --all-features | ||
if: steps.setup-rye.outputs.cache-hit != 'true' | ||
|
||
- name: Build project | ||
run: poetry build | ||
run: rye build --all --clean | ||
|
||
- name: Zip project | ||
run: zip --junk-paths matrixctl.zip dist/* README.md LICENSE.txt | ||
|
||
- name: Generate changelog_latest.rst from CHANGELOG.rst | ||
run: python scripts/get_latest_release.py | ||
|
||
- name: Convert from changelog_latest.rst to changelog_latest.md | ||
uses: docker://pandoc/core:3.5.0 | ||
with: | ||
args: >- | ||
--output=chagelog_latest.md | ||
--from rst | ||
--to markdown | ||
--markdown-headings=atx | ||
chagelog_latest.rst | ||
- name: Generate changelog_latest.md | ||
run: git cliff --latest > changelog_latest.md | ||
|
||
- name: Get the version | ||
id: get_version | ||
|
@@ -75,20 +65,22 @@ jobs: | |
prerelease: false | ||
draft: false | ||
name: Release ${{ steps.get_version.outputs.VERSION }} | ||
body_path: chagelog_latest.md | ||
body_path: changelog_latest.md | ||
files: matrixctl.zip | ||
|
||
- name: Delete temp files | ||
run: rm -rf matrixctl.zip chagelog_latest.md chagelog_latest.rst | ||
run: rm -rf matrixctl.zip changelog_latest.md | ||
|
||
- name: pypi-publish | ||
uses: pypa/[email protected] | ||
with: | ||
# PyPI user | ||
# user: # optional, default is __token__ | ||
# Password for your PyPI user or an access token | ||
password: ${{ secrets.pypi_token }} | ||
# The repository URL to use | ||
# repository_url: # optional | ||
# The target directory for distribution | ||
# packages_dir: # optional, default is dist | ||
- name: Publish | ||
run: rye publish --token <your_token> --yes --skip-existing | ||
# - name: pypi-publish | ||
# uses: pypa/[email protected] | ||
# with: | ||
# # PyPI user | ||
# # user: # optional, default is __token__ | ||
# # Password for your PyPI user or an access token | ||
# password: ${{ secrets.pypi_token }} | ||
# # The repository URL to use | ||
# # repository_url: # optional | ||
# # The target directory for distribution | ||
# # packages_dir: # optional, default is dist |
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 |
---|---|---|
|
@@ -731,4 +731,3 @@ Trivial Changes | |
.. note:: No significant changes to the Project. | ||
|
||
**Internal Release** | ||
|
Oops, something went wrong.