Skip to content

Commit 54e9e6b

Browse files
authored
Initial commit of code (#1)
* added code for library
1 parent 2728779 commit 54e9e6b

108 files changed

Lines changed: 15898 additions & 9 deletions

File tree

Some content is hidden

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

.github/workflows/format.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
format:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.12"
18+
- name: Install dependencies
19+
run: |
20+
pip install uv
21+
uv sync --group dev
22+
- name: Format with ruff
23+
run: |
24+
uv run ruff format --check .

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.12"
18+
- name: Install dependencies
19+
run: |
20+
pip install uv
21+
uv sync --group dev
22+
- name: Lint with ruff
23+
run: |
24+
uv run ruff check .

.github/workflows/test.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test-core:
11+
name: Core Tests (No Optional Deps)
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install core dependencies only
24+
run: |
25+
pip install uv
26+
uv sync --group dev
27+
- name: Run core tests
28+
run: |
29+
uv run pytest -m core -v
30+
31+
test-all:
32+
name: All Tests (With Optional Deps)
33+
needs: test-core
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
38+
39+
steps:
40+
- uses: actions/checkout@v3
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v4
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
- name: Install all dependencies
46+
run: |
47+
pip install uv
48+
uv sync --group dev --group typing --group examples
49+
- name: Run all tests
50+
run: |
51+
uv run pytest -v
52+
53+
coverage:
54+
name: Coverage Report
55+
runs-on: ubuntu-latest
56+
permissions:
57+
contents: write
58+
pull-requests: write
59+
60+
steps:
61+
- uses: actions/checkout@v3
62+
63+
- name: Set up Python 3.12
64+
uses: actions/setup-python@v4
65+
with:
66+
python-version: "3.12"
67+
68+
- name: Install dependencies
69+
run: |
70+
pip install uv
71+
uv sync --all-extras --all-groups
72+
73+
- name: Run tests with coverage
74+
run: |
75+
uv run coverage run -m pytest
76+
uv run coverage xml
77+
uv run coverage html
78+
uv run coverage report
79+
80+
- name: Coverage comment
81+
if: github.event_name == 'pull_request'
82+
uses: py-cov-action/python-coverage-comment-action@v3
83+
with:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
MINIMUM_GREEN: 85
86+
MINIMUM_ORANGE: 70
87+
88+
- name: Store coverage report
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: coverage-report
92+
path: htmlcov/

.github/workflows/ty-check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Type Check
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
ty-check:
11+
name: Run ty type checker
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [3.12]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install uv
27+
run: python -m pip install uv
28+
29+
- name: Install dependencies with typing group
30+
run: uv sync --group typing
31+
32+
- name: Install ty type checker
33+
run: uv pip install "ty>=0.0.1a20"
34+
35+
- name: Run ty checks
36+
run: |
37+
echo "Running ty check on maseval and tests (excluding examples)"
38+
uv run ty check maseval tests

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Custom
2+
.idea/
3+
.DS_Store
4+
15
# Byte-compiled / optimized / DLL files
26
__pycache__/
37
*.py[codz]
@@ -182,11 +186,11 @@ cython_debug/
182186
.abstra/
183187

184188
# Visual Studio Code
185-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
189+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186190
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
191+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188192
# you could uncomment the following to ignore the entire vscode folder
189-
# .vscode/
193+
.vscode/
190194

191195
# Ruff stuff:
192196
.ruff_cache/

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

0 commit comments

Comments
 (0)