Skip to content

Commit f273922

Browse files
committed
feat(repo,mkdocs,workflows): migrate to src layout; add pyproject and docs scaffold
1 parent f61cb85 commit f273922

File tree

188 files changed

+312
-199
lines changed

Some content is hidden

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

188 files changed

+312
-199
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ '**' ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.10', '3.11']
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install tools
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -e ".[ci]"
29+
30+
- name: Lint (Ruff)
31+
run: |
32+
ruff check .
33+
34+
- name: Format check (Black)
35+
run: |
36+
black --check .
37+
38+
- name: Type check (MyPy)
39+
run: |
40+
mypy --install-types --non-interactive
41+
42+
- name: Install package
43+
run: |
44+
pip install .
45+
46+
- name: Run tests
47+
run: |
48+
pytest -q

.github/workflows/docs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.11'
18+
- name: Install docs deps
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -e ".[docs]"
22+
- name: Build site
23+
run: |
24+
python -m mkdocs build --strict
25+
- name: Deploy to GitHub Pages
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./site

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.9'
22+
23+
- name: Build sdist and wheel
24+
run: |
25+
python -m pip install -U pip build
26+
python -m build
27+
28+
- name: Publish package to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
skip-existing: true

CONTRIBUTING.md

Lines changed: 21 additions & 20 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 PythonNative
3+
Copyright (c) 2025 PythonNative
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
21+
THE SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion

docs/api/pythonnative.md

Lines changed: 3 additions & 0 deletions

docs/concepts/components.md

Lines changed: 3 additions & 0 deletions

docs/examples.md

Lines changed: 3 additions & 0 deletions

docs/examples/hello-world.md

Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)