Skip to content

Commit

Permalink
fix: Change rich lower bound pin to >=10.11.0 (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab authored May 7, 2024
1 parent 10abf3c commit eaa9a55
Show file tree
Hide file tree
Showing 21 changed files with 1,029 additions and 939 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Documentation

on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/dev.yaml
channels: conda-forge,nodefaults
activate-environment: sugar
auto-update-conda: true
conda-solver: libmamba
python-version: "3.8"

- name: Install deps
run: |
poetry config virtualenvs.create false
poetry install
- name: Generate documentation with changes from semantic-release
run: makim --verbose docs.build

- name: GitHub Pages action
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/
16 changes: 5 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
fetch-depth: 0
Expand All @@ -29,7 +29,6 @@ jobs:
pr_sha: ${{ github.event.pull_request.head.sha }}

tests:
needs: check-branch
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -40,7 +39,7 @@ jobs:
strategy:
matrix:
python_version:
- "3.8.1"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand All @@ -54,12 +53,7 @@ jobs:
KXGR_PROJECT_NAME: ${{ github.run_id }}-${{ github.sha }}

steps:
- uses: actions/checkout@v3

- name: Prepare conda environment
run: |
sed -i s/python\ 3\.8\.1/python\ ${{ matrix.python_version }}/ conda/dev.yaml
cat conda/dev.yaml
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -70,6 +64,7 @@ jobs:
activate-environment: sugar
auto-update-conda: true
conda-solver: libmamba
python-version: "${{ matrix.python_version }}"

- name: check poetry lock
run: poetry check
Expand All @@ -88,7 +83,6 @@ jobs:
uses: mxschmitt/action-tmate@v3

linter:
needs: check-branch
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -101,7 +95,7 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
Expand All @@ -33,40 +33,21 @@ jobs:
activate-environment: sugar
auto-update-conda: true
conda-solver: libmamba
python-version: "3.10"

- name: Install deps
run: |
poetry install --verbose
- name: Run semantic release (for tests)
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
npx --yes \
-p semantic-release \
-p "@semantic-release/commit-analyzer" \
-p "@semantic-release/release-notes-generator" \
-p "@semantic-release/changelog" \
-p "@semantic-release/exec" \
-p "@semantic-release/github" \
-p "@semantic-release/git" \
-p "@google/semantic-release-replace-plugin" \
semantic-release --dry-run
run: makim release.dry

- name: Run semantic release
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
poetry config pypi-token.pypi ${PYPI_TOKEN}
npx --yes \
-p semantic-release \
-p "@semantic-release/commit-analyzer" \
-p "@semantic-release/release-notes-generator" \
-p "@semantic-release/changelog" \
-p "@semantic-release/exec" \
-p "@semantic-release/github" \
-p "@semantic-release/git" \
-p "@google/semantic-release-replace-plugin" \
semantic-release --ci
run: makim release.ci
# added for documentation
- name: Generate documentation with changes from semantic-release
Expand Down
79 changes: 53 additions & 26 deletions .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,47 @@ shell: bash
groups:
clean:
env-file: .env
targets:
tasks:
all:
help: Remove build artifacts, compiled files, and cache
run: |
rm -f .coverage
rm -fr build/
rm -fr dist/
rm -fr .eggs/
rm -fr htmlcov/
rm -fr .pytest_cache
rm -fr .ruff_cache
rm -fr .mypy_cache
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '*~' -exec rm -f {} +
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
docs:
help: Commands for building and previewing the documentation
targets:
tasks:
build:
help: Build the documentation
run: mkdocs build --config-file mkdocs.yaml

preview:
help: Preview the documentation
dependencies:
- target: docs.build
- task: docs.build
run: mkdocs serve --watch docs --config-file mkdocs.yaml

package:
help: helper commands for handling the package
targets:
tasks:
build:
help: Build the project
run: poetry build

tests:
help: Test commands
targets:
tasks:
linter:
help: Run lint checks
run: |
Expand All @@ -55,12 +57,12 @@ groups:
help: Extra parameters for pytest
type: str
default: "-vv"
run: pytest -s {{ args.params }} tests
run: pytest -s ${{ args.params }} tests

smoke-1:
help: Run smoke tests for group 1
dependencies:
- target: docker.killall
- task: docker.killall
run: |
sugar build --verbose
sugar build --verbose --group group1 --all
Expand All @@ -79,7 +81,7 @@ groups:
smoke-2:
help: Run smoke tests for group 2
dependencies:
- target: docker.killall
- task: docker.killall
run: |
sugar build --verbose --group group2 --all
sugar build --verbose --group group2
Expand All @@ -96,14 +98,14 @@ groups:
smoke-services:
help:
dependencies:
- target: docker.killall
- task: docker.killall
run: |
sugar build --verbose --config-file tests/containers/.services.sugar.yaml
smoke-mix:
help: Run smoke tests for group mix
dependencies:
- target: docker.killall
- task: docker.killall
run: |
sugar build --verbose --group group-mix --all
sugar build --verbose --group group-mix
Expand All @@ -121,7 +123,7 @@ groups:
smoke-main:
help: Run smoke tests for group main
dependencies:
- target: docker.killall
- task: docker.killall
run: |
# general tests main profile/plugins
sugar build --verbose --group group1
Expand All @@ -147,7 +149,7 @@ groups:
smoke-defaults:
help: Run smoke tests for group defaults
dependencies:
- target: docker.killall
- task: docker.killall
run: |
export KXGR_PROJECT_NAME="test-`python -c 'from uuid import uuid4; print(uuid4().hex[:7])'`"
echo $KXGR_PROJECT_NAME
Expand All @@ -160,7 +162,7 @@ groups:
smoke-final:
help: Run final smoke tests
dependencies:
- target: docker.killall
- task: docker.killall
run: |
sugar ext restart --verbose --group group-defaults --options -d
sugar pause --verbose --group group1
Expand All @@ -173,21 +175,46 @@ groups:
smoke:
help: Run final smoke tests
dependencies:
- target: docker.killall
- target: tests.smoke-1
- target: tests.smoke-2
- target: tests.smoke-mix
- target: tests.smoke-main
- target: tests.smoke-defaults
- target: tests.smoke-final
- target: tests.smoke-services
- task: docker.killall
- task: tests.smoke-1
- task: tests.smoke-2
- task: tests.smoke-mix
- task: tests.smoke-main
- task: tests.smoke-defaults
- task: tests.smoke-final
- task: tests.smoke-services
run: |
sugar --help
sugar --version
docker:
help: Commands for docker
targets:
tasks:
killall:
help: Kill all running Docker containers
run: docker kill `docker ps -q` || true

release:
vars:
app: |
npx --yes \
-p semantic-release \
-p conventional-changelog-conventionalcommits@7.0.2 \
-p "@semantic-release/commit-analyzer" \
-p "@semantic-release/release-notes-generator" \
-p "@semantic-release/changelog" \
-p "@semantic-release/exec" \
-p "@semantic-release/github" \
-p "@semantic-release/git" \
-p "semantic-release-replace-plugin" \
semantic-release
tasks:
ci:
help: Run semantic-release on CI
run: |
${{ vars.app }} --ci
dry:
help: Run semantic-release on CI
run: |
${{ vars.app }} --dry-run
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.makim.yaml
docs/changelog.md
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"plugins": [
"@semantic-release/commit-analyzer",
[
"@google/semantic-release-replace-plugin",
"semantic-release-replace-plugin",
{
"replacements": [
{
Expand Down
7 changes: 4 additions & 3 deletions conda/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ channels:
- conda-forge
dependencies:
- pip
- python 3.8.1
- poetry
- python
- poetry >=1.5
- pip:
- paginate >=0.5 # tries to fix the distlib issue
# fix the distlib issue
- paginate >=0.5
7 changes: 4 additions & 3 deletions conda/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ channels:
- nodefaults
- conda-forge
dependencies:
- python 3.10.* # min version supported
- poetry
- python
- poetry >=1.5
- nodejs >=18.17 # used by semantic-release
- pip:
- paginate >=0.5 # tries to fix the distlib issue
# fix the distlib issue
- paginate >=0.5
Loading

0 comments on commit eaa9a55

Please sign in to comment.