Skip to content

Commit 41d3cf9

Browse files
committed
chore: new version
1 parent 981edf2 commit 41d3cf9

File tree

148 files changed

+9150
-9023
lines changed

Some content is hidden

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

148 files changed

+9150
-9023
lines changed

.gitattributes

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Normalize line endings to LF in the repo
2+
* text=auto eol=lf
3+
4+
# Windows-specific scripts keep CRLF
5+
*.bat eol=crlf
6+
*.cmd eol=crlf
7+
*.ps1 eol=crlf
8+
9+
# Binary assets (no diffs)
10+
*.png binary
11+
*.jpg binary
12+
*.jpeg binary
13+
*.gif binary
14+
*.svg binary
15+
*.ico binary
16+
*.pdf binary
17+
*.zip binary
18+
*.gz binary
19+
*.xz binary
20+
*.bz2 binary
21+
22+
# Data / notebooks — avoid noisy diffs
23+
*.ipynb -diff
24+
*.parquet binary
25+
*.feather binary
26+
27+
# Docs aren’t “code” for linguist stats
28+
docs/** linguist-documentation
29+
30+
# Vendored/virtualenv noise (if ever committed)
31+
venv/** linguist-vendored
32+
.venv/** linguist-vendored
33+
34+
# Minified bundles — no diffs
35+
*.min.* -diff

.github/CODEOWNERS

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# CODEOWNERS: order matters; later matches take precedence.
2+
3+
# Default owner for everything
4+
5+
- @DiogoRibeiro7
6+
7+
# Source code
8+
9+
/src/ssspx/ @DiogoRibeiro7
10+
11+
# Tests
12+
13+
/tests/ @DiogoRibeiro7
14+
15+
# CI workflows
16+
17+
/.github/workflows/ @DiogoRibeiro7
18+
19+
# Tooling & configs
20+
21+
/pyproject.toml @DiogoRibeiro7 /.pre-commit-config.yaml @DiogoRibeiro7 /mypy.ini @DiogoRibeiro7 /.gitattributes @DiogoRibeiro7 /.gitignore @DiogoRibeiro7 /README.md @DiogoRibeiro7 /LICENSE @DiogoRibeiro7

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Bug report"
2+
description: "Report a reproducible bug"
3+
title: "bug: "
4+
labels: [bug]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: What happened?
10+
description: Provide steps to reproduce the issue.
11+
placeholder: "Steps to reproduce..."
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: expected
16+
attributes:
17+
label: Expected behavior
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: environment
22+
attributes:
23+
label: Environment
24+
description: "OS, Python version, dependency versions"
25+
validations:
26+
required: false

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Feature request"
2+
description: "Suggest a new idea or enhancement"
3+
title: "feat: "
4+
labels: [enhancement]
5+
body:
6+
- type: textarea
7+
id: summary
8+
attributes:
9+
label: Feature description
10+
description: What problem does this solve?
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: alternatives
15+
attributes:
16+
label: Alternatives considered
17+
validations:
18+
required: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Question"
2+
description: "Ask a question about using ssspx"
3+
title: "question: "
4+
labels: [question]
5+
body:
6+
- type: textarea
7+
id: question
8+
attributes:
9+
label: What is your question?
10+
validations:
11+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Summary
2+
-
3+
4+
## Testing
5+
- `pre-commit run --files <files>`
6+
- `pydocstyle src/ssspx`
7+
- `poetry run pytest -q`

.github/labels.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
comment: |
2+
👋 Thanks for contributing!
3+
🏷 Titles prefixed with feat:, fix:, docs:, or chore: are labeled automatically.
4+
labels:
5+
enhancement:
6+
- '^feat:'
7+
bug:
8+
- '^fix:'
9+
documentation:
10+
- '^docs:'
11+
chore:
12+
- '^chore:'
13+
deps:
14+
- '^deps:'

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
linux-macos:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11'
19+
- name: Install build tooling
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install poetry cibuildwheel
23+
poetry install --only main
24+
- name: Build wheels
25+
run: |
26+
cibuildwheel --output-dir dist
27+
- uses: actions/upload-artifact@v4
28+
with:
29+
name: wheels-${{ matrix.os }}
30+
path: dist/*.whl
31+
32+
sdist:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: '3.11'
39+
- name: Install Poetry
40+
run: pip install poetry
41+
- name: Build sdist
42+
run: poetry build -f sdist
43+
- uses: actions/upload-artifact@v4
44+
with:
45+
name: sdist
46+
path: dist/*.tar.gz

.github/workflows/ci.yml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
name: CI
2+
3+
env:
4+
POETRY_VIRTUALENVS_CREATE: true
5+
6+
on:
7+
push:
8+
branches: [ main, develop ]
9+
pull_request:
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11'
19+
- uses: actions/cache@v4
20+
with:
21+
path: |
22+
~/.cache/pip
23+
~/.cache/pypoetry
24+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-poetry-
27+
- uses: abatilo/actions-poetry@v3
28+
with:
29+
poetry-version: 1.8.3
30+
- name: Install deps
31+
run: poetry install
32+
- name: Lint
33+
run: poetry run flake8 src/ssspx
34+
- name: Docstring style
35+
run: poetry run pydocstyle src/ssspx
36+
- name: Docstring coverage
37+
run: poetry run docstr-coverage src/ssspx --fail-under 90
38+
- name: Type check
39+
run: poetry run mypy src/ssspx
40+
- name: Security scan
41+
run: poetry run bandit -r src/ssspx -c bandit.yaml --severity-level high
42+
- name: Dependency audit
43+
run: poetry run pip-audit --ignore-vuln PYSEC-2022-42969
44+
- name: Deprecations up-to-date
45+
run: poetry run python tools/check_deprecations.py
46+
- name: Validate citation metadata
47+
run: poetry run cffconvert --validate --infile CITATION.cff
48+
49+
unit:
50+
needs: lint
51+
runs-on: ${{ matrix.os }}
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
os: [ubuntu-latest, macos-latest, windows-latest]
56+
python-version: ['3.9', '3.10', '3.11', '3.12']
57+
defaults:
58+
run:
59+
shell: bash
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: actions/setup-python@v5
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
- uses: actions/cache@v4
66+
with:
67+
path: |
68+
~/.cache/pip
69+
~/.cache/pypoetry
70+
C:\\Users\\runneradmin\\AppData\\Local\\pip\\Cache
71+
C:\\Users\\runneradmin\\AppData\\Local\\pypoetry\\Cache
72+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
73+
restore-keys: |
74+
${{ runner.os }}-poetry-
75+
- uses: abatilo/actions-poetry@v3
76+
with:
77+
poetry-version: 1.8.3
78+
- name: Install deps
79+
run: poetry install
80+
- name: Unit tests
81+
run: poetry run pytest -q --maxfail=1 --disable-warnings --cov=ssspx --cov-report=term-missing -m "not integration"
82+
83+
integration:
84+
runs-on: ubuntu-latest
85+
needs: [lint, unit]
86+
steps:
87+
- uses: actions/checkout@v4
88+
- uses: actions/setup-python@v5
89+
with:
90+
python-version: '3.11'
91+
- uses: actions/cache@v4
92+
with:
93+
path: |
94+
~/.cache/pip
95+
~/.cache/pypoetry
96+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
97+
restore-keys: |
98+
${{ runner.os }}-poetry-
99+
- uses: abatilo/actions-poetry@v3
100+
with:
101+
poetry-version: 1.8.3
102+
- name: Install deps
103+
run: poetry install
104+
- name: Integration tests
105+
run: poetry run pytest -q -m integration
106+
107+
docs:
108+
runs-on: ubuntu-latest
109+
needs: [lint, unit]
110+
steps:
111+
- uses: actions/checkout@v4
112+
- uses: actions/setup-python@v5
113+
with:
114+
python-version: '3.11'
115+
- uses: actions/cache@v4
116+
with:
117+
path: |
118+
~/.cache/pip
119+
~/.cache/pypoetry
120+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
121+
restore-keys: |
122+
${{ runner.os }}-poetry-
123+
- uses: abatilo/actions-poetry@v3
124+
with:
125+
poetry-version: 1.8.3
126+
- name: Install deps
127+
run: poetry install
128+
- name: Build docs
129+
run: poetry run mkdocs build --strict
130+
131+
release:
132+
runs-on: ubuntu-latest
133+
needs: [integration, docs]
134+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
135+
steps:
136+
- uses: actions/checkout@v4
137+
- uses: actions/setup-python@v5
138+
with:
139+
python-version: '3.11'
140+
- uses: actions/cache@v4
141+
with:
142+
path: |
143+
~/.cache/pip
144+
~/.cache/pypoetry
145+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
146+
restore-keys: |
147+
${{ runner.os }}-poetry-
148+
- uses: abatilo/actions-poetry@v3
149+
with:
150+
poetry-version: 1.8.3
151+
- name: Install deps
152+
run: poetry install
153+
- name: Build distributions
154+
run: poetry build
155+
- name: Upload artifacts
156+
uses: actions/upload-artifact@v4
157+
with:
158+
name: dist
159+
path: dist/*
160+
- name: Publish release
161+
env:
162+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
run: poetry run semantic-release publish --skip-build
164+
165+
extras:
166+
runs-on: ubuntu-latest
167+
needs: lint
168+
steps:
169+
- uses: actions/checkout@v4
170+
- uses: actions/setup-python@v5
171+
with:
172+
python-version: '3.11'
173+
- uses: actions/cache@v4
174+
with:
175+
path: |
176+
~/.cache/pip
177+
~/.cache/pypoetry
178+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-numpy
179+
restore-keys: |
180+
${{ runner.os }}-poetry-
181+
- uses: abatilo/actions-poetry@v3
182+
with:
183+
poetry-version: 1.8.3
184+
- name: Install with extras
185+
run: poetry install -E numpy-backend
186+
- name: Unit tests with extras
187+
run: poetry run pytest -q --maxfail=1 --disable-warnings -m "not integration"

0 commit comments

Comments
 (0)