Skip to content

Commit ab58416

Browse files
manawaspwbarnha
andauthored
Style: go to pyproject.toml (#53)
* style(pyproject.toml): regroup configuration in pyproject.toml * style(pyproject.toml): regroup configuration in pyproject.toml * docs(mkdocs): setup mkdocs and switch docstring style * style(documentation): switch to mkdocs from sphinx * fix: working on fixing github actions pipeline * build: bump pypy to 3.10 * docs(mkdocs): add file import via snippet * fix: restore install.sh and see if github pipeline pass * fix: rollback install as it changed nothing * fix: rollback github action * Install self in tests.yml and test PyPy 3.9 as well * Revert pip -e invocation in tests.yml lol * fix: restore coveragerc * fix: pytest declare specific dir instead of mean directory * fix: pytest declare specific dir instead of mean directory * fix: pytest declare specific dir instead of mean directory --------- Co-authored-by: William Barnhart <williambbarnhart@gmail.com>
1 parent f5757d6 commit ab58416

File tree

192 files changed

+2196
-3868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+2196
-3868
lines changed

.coveragerc

Lines changed: 0 additions & 35 deletions
This file was deleted.

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@ insert_final_newline = true
1010
charset = utf-8
1111
end_of_line = lf
1212

13+
[{*.yml,*.yaml}]
14+
indent_style = space
15+
indent_size = 2
16+
1317
[Makefile]
1418
indent_style = tab
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,34 @@ on:
88
release:
99
types: [created]
1010
branches:
11-
- 'master'
11+
- master
1212

1313
jobs:
1414
build:
15-
name: "Build docs"
15+
name: Build docs
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/setup-python@v4
19-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
2019
with:
2120
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
22-
- name: "Install runtime dependencies in order to get package metadata"
23-
run: "scripts/install"
24-
- name: "Install deps and build with Sphinx"
25-
run: make docs
26-
- name: "Upload artifacts"
27-
uses: actions/upload-pages-artifact@v1
21+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.12'
25+
26+
- name: Install dependencies
27+
run: pip install -r requirements.txt
28+
29+
- name: Build docs
30+
run: scripts/build-docs.sh
31+
32+
- name: Upload artifacts
33+
uses: actions/upload-pages-artifact@v3
2834
with:
2935
# Upload built docs
30-
path: "./Documentation"
36+
path: "./site"
3137
deploy:
32-
name: "Deploy docs"
38+
name: Deploy docs
3339
if: github.event_name == 'release' && github.event.action == 'published'
3440
needs: build
3541
runs-on: ubuntu-latest
@@ -42,6 +48,6 @@ jobs:
4248
name: github-pages
4349
url: ${{ steps.deployment.outputs.page_url }}
4450
steps:
45-
- uses: actions/deploy-pages@v1
51+
- uses: actions/deploy-pages@v4
4652
id: deployment
4753
name: "Deploy to GitHub Pages"

.github/workflows/dist.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Package
2+
3+
on:
4+
# Only run when release is created in the master branch
5+
release:
6+
types: [created]
7+
branches:
8+
- 'master'
9+
10+
jobs:
11+
build:
12+
name: Build distributable files
13+
runs-on: 'ubuntu-latest'
14+
steps:
15+
- name: 'Checkout source repository'
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- uses: actions/setup-python@v5
21+
22+
- name: Install build dependencies
23+
run: pip install build twine
24+
25+
- name: 'Build package'
26+
run: scripts/build.sh
27+
28+
- name: Upload build artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
path: 'dist/*'
32+
33+
upload_pypi:
34+
name: Upload packages
35+
needs: ['build']
36+
runs-on: 'ubuntu-latest'
37+
if: github.event_name == 'release' && github.event.action == 'created'
38+
steps:
39+
- name: Download artifacts
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: artifact
43+
path: dist
44+
45+
- name: Publish package to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1
47+
with:
48+
user: '__token__'
49+
password: '${{ secrets.PYPI_API_TOKEN }}'
Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

4-
name: Run Python tests
4+
name: Python package
55

66
on:
77
push:
@@ -20,6 +20,7 @@ jobs:
2020
matrix:
2121
python-version:
2222
- "pypy3.9"
23+
- "pypy3.10"
2324
- "3.8"
2425
- "3.9"
2526
- "3.10"
@@ -39,16 +40,21 @@ jobs:
3940
python-version: "${{ matrix.python-version }}"
4041
cache: "pip"
4142
cache-dependency-path: |
42-
requirements/*.txt
43-
requirements/**/*.txt
44-
- name: "Install dependencies"
45-
run: "scripts/install"
46-
- name: "Run linting checks"
47-
run: "scripts/check"
48-
- name: "Run tests"
49-
run: "scripts/tests"
50-
- name: "Enforce coverage"
51-
uses: codecov/codecov-action@v3
43+
requirements-docs.txt
44+
requirements-tests.txt
45+
pyproject.toml
46+
47+
- name: Install dependencies
48+
run: pip install -r requirements.txt
49+
50+
- name: Run linting checks
51+
run: scripts/lint.sh
52+
53+
- name: Run tests
54+
run: scripts/tests.sh
55+
56+
- name: Enforce coverage
57+
uses: codecov/codecov-action@v4
5258
with:
5359
token: ${{ secrets.CODECOV_TOKEN }}
5460

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Session.vim
8484
tags
8585
.pytest_cache/
8686
.ipython/
87+
.ruff_cache/
8788

8889
### PyCharm
8990
.idea

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ repos:
99
- id: check-yaml
1010
- id: check-toml
1111
- id: check-added-large-files
12-
12+
- repo: https://github.com/commitizen-tools/commitizen
13+
rev: v3.18.0
14+
hooks:
15+
- id: commitizen
1316
- repo: https://github.com/charliermarsh/ruff-pre-commit
1417
rev: v0.3.0
1518
hooks:

.pyup.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
## v0.2.0 (2024-03-02)
3+
4+
## 0.1.0 (2023-01-10)

0 commit comments

Comments
 (0)