Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #454

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into windows
  • Loading branch information
fizyk committed Oct 11, 2024
commit cd52da656131e74c2be88cc492119e38e97e0fd7
17 changes: 0 additions & 17 deletions .bumpversion.cfg

This file was deleted.

4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
include =
mirakuru/*
tests/*
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -5,4 +5,10 @@ updates:
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 1
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
time: "04:00"
open-pull-requests-limit: 1
48 changes: 13 additions & 35 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,19 @@
name: Automerge Pull Requests
name: Merge me test dependencies!

on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
workflow_run:
types:
- completed
status: {}
workflows:
# List all required workflow names here.
- 'Run linters'
- 'Run tests'
- 'Run tests on macos'
- 'Test build package'

jobs:
automerge:
name: Automerge Dependabot
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
steps:
- name: 'Wait for status checks'
id: waitforstatuschecks
uses: "WyriHaximus/github-action-wait-for-status@v1.3"
with:
ignoreActions: Automerge Dependabot
checkInterval: 13
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Merge pull requests
uses: pascalgn/automerge-action@v0.13.1
if: steps.waitforstatuschecks.outputs.status == 'success'
env:
MERGE_METHOD: "squash"
MERGE_LABELS: ""
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
uses: fizyk/actions-reuse/.github/workflows/automerge-shared.yml@v2.4.8
secrets:
app_id: ${{ secrets.MERGE_APP_ID }}
private_key: ${{ secrets.MERGE_APP_PRIVATE_KEY }}
21 changes: 3 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -2,25 +2,10 @@ name: Test build package

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

jobs:
build:
name: Build Python 🐍 distributions 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install build tools
run: pip install pep517
- name: Build a wheel package
run: python -m pep517.build .
- name: Install twine to check the package
run: pip install twine
- name: Check the package
run: twine check dist/*
uses: fizyk/actions-reuse/.github/workflows/pypi.yml@v2.4.8
100 changes: 9 additions & 91 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -2,98 +2,16 @@ name: Run linters

on:
push:
branches: [ master ]
paths:
- '**.py'
- .github/workflows/linters.yml
- requirements-lint.txt
branches: [ main ]
pull_request:
branches: [ master ]
paths:
- '**.py'
- .github/workflows/linters.yml
- requirements-lint.txt
branches: [ main ]

jobs:
pydocstyle:
runs-on: ubuntu-latest
strategy:
fail-fast: false
lint:
uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v2.4.8
with:
mypy: true
rst: true
black: true
ruff: true

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run pydocstyle
run: |
pydocstyle src/ tests/

pycodestyle:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run pydocstyle
run: |
pycodestyle src/ tests/

mypy:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run mypy check
run: |
mypy src tests

rst:
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Run rst checks
run: |
rst-lint *.rst

black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@main
25 changes: 25 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run test commands

on:
pull_request:
branches: [ main ]

jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: fizyk/actions-reuse/.github/actions/pipenv@v2.4.8
with:
python-version: "3.13"
command: tbump --dry-run --only-patch $(pipenv run tbump current-version)"-x"
towncrier:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- uses: fizyk/actions-reuse/.github/actions/pipenv@v2.4.8
with:
python-version: "3.13"
command: towncrier check --compare-with origin/main
fetch-depth: 0
32 changes: 9 additions & 23 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -3,27 +3,13 @@ on:
push:
tags:
- v*



jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install build tools
run: pip install pep517
- name: Build a wheel package
run: python -m pep517.build .
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.test_pypi_password }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
verbose: true
build:
uses: fizyk/actions-reuse/.github/workflows/pypi.yml@v2.4.8
with:
publish: true
secrets:
pypi_token: ${{ secrets.pypi_password }}
47 changes: 0 additions & 47 deletions .github/workflows/tests-macos.yml

This file was deleted.

50 changes: 15 additions & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -2,42 +2,22 @@ name: Run tests

on:
push:
branches: [ master ]
paths:
- '**.py'
- .github/workflows/tests.yml
- requirements-testtxt
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, pypy-3.7-v7.3.3]
env:
OS: ubuntu-latest
PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
- name: Run test
run: |
py.test --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: linux
env_vars: OS, PYTHON
fail_ci_if_error: true
uses: fizyk/actions-reuse/.github/workflows/tests-pytests.yml@v2.4.8
with:
python-versions: '["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.10"]'
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
macostests:
uses: fizyk/actions-reuse/.github/workflows/tests-pytests.yml@v2.4.8
needs: [tests]
with:
python-versions: '["3.11", "3.12", "3.13", "pypy-3.10"]'
os: macos-latest
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
Loading
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.