diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00c6f85..9006f5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,29 +14,26 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version}} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Poetry + - name: Install Rye run: | - curl -sSL https://install.python-poetry.org | python3 - - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install Dependencies - run: poetry install -n + curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH - - name: Run black format check - run: poetry run black src tests --check --diff --verbose + - name: Setup Python ${{matrix.python-version}} & Dependencies + run: | + rye pin ${{ matrix.python-version }} + rye sync --update-all --all-features - name: Run ruff lint check - run: poetry run ruff . + run: rye run ruff check --diff + + - name: Run ruff format check + run: rye run ruff format --check --diff - name: Run pytest - run: poetry run pytest tests --tb=line --cov=src --cov-report=xml --cov-report=term + run: rye run pytest diff --git a/.github/workflows/publish_mkdocs.yml b/.github/workflows/publish_mkdocs.yml index 8a32563..2399819 100644 --- a/.github/workflows/publish_mkdocs.yml +++ b/.github/workflows/publish_mkdocs.yml @@ -10,17 +10,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Setup Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - - name: Install MkDocs & Plugins + - name: Install Rye run: | - pip install . - pip install mkdocs mkdocs-material mkdocs-jupyter mkdocstrings[python] black + curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + + - name: Install Python & MkDocs & Plugins + run: rye sync - name: Publish document - run: mkdocs gh-deploy --force + run: rye run mkdocs gh-deploy --force diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index e92750e..24e3ab7 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -13,20 +13,15 @@ jobs: PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Setup Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: 3.9 - - - name: Install Poetry + - name: Install Rye run: | - curl -sSL https://install.python-poetry.org | python3 - - echo "$HOME/.local/bin" >> $GITHUB_PATH + curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH - name: Build - run: poetry build + run: rye build - name: Publish - run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD + run: rye publish -u $PYPI_USERNAME --token $PYPI_PASSWORD -y