Skip to content

Commit

Permalink
Release candidate 2.0.0rc3 (#35)
Browse files Browse the repository at this point in the history
- Added changelog content
- Fixed outdated README.md examples (#34)
- Added `get_image()` method to `Rasterized2DRenderingResult` and
`Rasterized2DResultHandle` objects
- Added CI
  • Loading branch information
Argmaster authored Sep 3, 2023
2 parents be676c2 + 38db48e commit 9a0ec25
Show file tree
Hide file tree
Showing 47 changed files with 868 additions and 31 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

target-branch: "main"

labels:
- "dependencies"

assignees:
- "Argmaster"

reviewers:
- "Argmaster"
42 changes: 42 additions & 0 deletions .github/workflows/build_n_deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Build & Deploy Docs

on:
push:
branches:
- main

workflow_dispatch:

concurrency:
group: ${{ github.action_path }}-${{ github.ref }}-build-n-deploy-docs
cancel-in-progress: false

jobs:
run-build-n-deploy-docs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8"]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1

- name: Install dependencies
run: poetry install --with=docs --no-cache --sync

- name: Run build & deploy documentation
run: poetry run poe run-build-n-deploy-docs
64 changes: 64 additions & 0 deletions .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Code Quality

on:
push:
branches:
- main
- dev
- fix/**
- hotfix/**
- feature/**
- release/**
- dependabot/**

pull_request:
branches:
- main
- dev
- fix/**
- hotfix/**
- feature/**
- release/**
- dependabot/**
types:
- opened
- reopened

schedule:
- cron: 0 12 * * 6

workflow_dispatch:

concurrency:
group: ${{ github.action_path }}-${{ github.ref }}-code-quality
cancel-in-progress: false

jobs:
run-code-quality-checks:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.11"]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1

- name: Install dependencies
run: poetry install --no-cache --sync

- name: Run code quality checks with pre-commit
run: poetry run poe run-code-quality-checks
44 changes: 44 additions & 0 deletions .github/workflows/release_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Publish 📦 to PyPI

on:
push:
tags:
- "^v.*$"

jobs:
deploy-to-pypi:
if: github.repository_owner == 'Argmaster'
name: Deploy 📦
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.8
uses: actions/[email protected]
with:
python-version: "3.8"
architecture: "x64"

- name: Install Poetry 📜
run: pip install poetry==1.5.1

- name: Install dependencies 🗄️
run: poetry install --no-cache --sync

- name: Build distribution 📦
run: poetry run poe build

- name: Detect Version of project
id: project-version
run: |
echo "version=$(poetry version | awk '{ print $2 }')" >> $GITHUB_OUTPUT
- name: Publish distribution 📦 to PyPI
# Executed only for version tag push event
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/release_to_test_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Publish 📦 to Test PyPI

on:
push:
branches:
- dev
- release/**

jobs:
deploy-to-pypi:
if: github.repository_owner == 'Argmaster'
name: Test deploy 📦
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python 3.8
uses: actions/[email protected]
with:
python-version: "3.8"
architecture: "x64"

- name: Install Poetry 📜
run: pip install poetry==1.5.1

- name: Install dependencies 🗄️
run: poetry install --no-cache --sync

- name: Bump Version for development 🔨 release
run: |
poetry version patch &&
version=$(poetry version | awk '{ print $2 }') &&
poetry version "$version".dev"$(date +%s)"
- name: Build distribution 📦
run: poetry build

- name: Detect Version of project
id: project-version
run: |
echo "version=$(poetry version | awk '{ print $2 }')" >> $GITHUB_OUTPUT
- name: Publish distribution 📦 to Test PyPI
# Executed always
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
64 changes: 64 additions & 0 deletions .github/workflows/type_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: Type Checks

on:
push:
branches:
- main
- dev
- fix/**
- hotfix/**
- feature/**
- release/**
- dependabot/**

pull_request:
branches:
- main
- dev
- fix/**
- hotfix/**
- feature/**
- release/**
- dependabot/**
types:
- opened
- reopened

schedule:
- cron: 0 12 * * 6

workflow_dispatch:

concurrency:
group: ${{ github.action_path }}-${{ github.ref }}-type-checks
cancel-in-progress: false

jobs:
run-type-checks:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.11"]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1

- name: Install dependencies
run: poetry install --no-cache --sync

- name: Run type checks with mypy
run: poetry run poe run-type-checks
80 changes: 80 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: Unit Tests

on:
push:
branches:
- main
- dev
- fix/**
- hotfix/**
- feature/**
- release/**
- dependabot/**

pull_request:
branches:
- main
- dev
- fix/**
- hotfix/**
- feature/**
- release/**
- dependabot/**
types:
- opened
- reopened

schedule:
- cron: 0 12 * * 6

workflow_dispatch:

concurrency:
group: ${{ github.action_path }}-${{ github.ref }}-unit-tests
cancel-in-progress: false

jobs:
run-unit-tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1

- name: Install dependencies
run: poetry install --no-cache --sync

- name: Run unit tests
run: poetry run poe run-unit-tests

- name: Dump coverage
run: poetry run coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
flags: unittests
files: ./coverage.xml
verbose: true
Loading

0 comments on commit 9a0ec25

Please sign in to comment.