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

Style: go to pyproject.toml #53

Merged
merged 16 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
35 changes: 0 additions & 35 deletions .coveragerc

This file was deleted.

4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ insert_final_newline = true
charset = utf-8
end_of_line = lf

[{*.yml,*.yaml}]
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,34 @@ on:
release:
types: [created]
branches:
- 'master'
- master

jobs:
build:
name: "Build docs"
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: "Install runtime dependencies in order to get package metadata"
run: "scripts/install"
- name: "Install deps and build with Sphinx"
run: make docs
- name: "Upload artifacts"
uses: actions/upload-pages-artifact@v1

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Build docs
run: scripts/build-docs.sh

- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
# Upload built docs
path: "./Documentation"
path: "./site"
deploy:
name: "Deploy docs"
name: Deploy docs
if: github.event_name == 'release' && github.event.action == 'published'
needs: build
runs-on: ubuntu-latest
Expand All @@ -42,6 +48,6 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v1
- uses: actions/deploy-pages@v4
id: deployment
name: "Deploy to GitHub Pages"
47 changes: 0 additions & 47 deletions .github/workflows/dist.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Package

on:
# Only run when release is created in the master branch
release:
types: [created]
branches:
- 'master'

jobs:
build:
name: Build distributable files
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout source repository'
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5

- name: Install build dependencies
run: pip install build twine

- name: 'Build package'
run: scripts/build.sh

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
path: 'dist/*'

upload_pypi:
name: Upload packages
needs: ['build']
runs-on: 'ubuntu-latest'
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: '__token__'
password: '${{ secrets.PYPI_API_TOKEN }}'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Run Python tests
name: Python package

on:
push:
Expand All @@ -20,6 +20,7 @@ jobs:
matrix:
python-version:
- "pypy3.9"
- "pypy3.10"
- "3.8"
- "3.9"
- "3.10"
Expand All @@ -39,16 +40,21 @@ jobs:
python-version: "${{ matrix.python-version }}"
cache: "pip"
cache-dependency-path: |
requirements/*.txt
requirements/**/*.txt
- name: "Install dependencies"
run: "scripts/install"
- name: "Run linting checks"
run: "scripts/check"
- name: "Run tests"
run: "scripts/tests"
- name: "Enforce coverage"
uses: codecov/codecov-action@v3
requirements-docs.txt
requirements-tests.txt
pyproject.toml

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run linting checks
run: scripts/lint.sh

- name: Run tests
run: scripts/tests.sh

- name: Enforce coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Session.vim
tags
.pytest_cache/
.ipython/
.ruff_cache/

### PyCharm
.idea
Expand Down
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ repos:
- id: check-yaml
- id: check-toml
- id: check-added-large-files

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.18.0
hooks:
- id: commitizen
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.0
hooks:
Expand Down
6 changes: 0 additions & 6 deletions .pyup.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

## v0.2.0 (2024-03-02)

## 0.1.0 (2023-01-10)
3 changes: 1 addition & 2 deletions CODE_OF_CONDUCT.rst → CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Code of Conduct
===============
# Code of Conduct

Everyone interacting in the project's codebases, issue trackers, chat rooms,
and mailing lists is expected to follow the Mode Code of Conduct.
Expand Down
Loading
Loading