-
Notifications
You must be signed in to change notification settings - Fork 6
0.0.9 #10
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
0.0.9 #10
Changes from all commits
8de9d89
0263fda
90b7c83
1d1bd2b
c44e18a
26080f2
2f551f7
783e363
35db597
ce6f897
8ae5f47
1c41335
2d6007f
3405dba
4ee6dff
1e63db8
0c979c6
1e425a1
4e31e57
0a11352
5b07682
cf29bf2
58b6568
268eaf4
9d5fdd0
9f58555
df68f99
672fdfe
df11456
fa84004
a3685c2
b2489df
4d63dfd
38ad864
c5e37a6
4cd9330
95a857f
e4cc5a2
c3c65a6
caed76a
1548ce9
f65f7ec
7d4ce30
2754d4a
bb19e92
7bd1757
6725beb
3341155
5e3b4f8
a1a60be
ccd864d
c197b17
ccd69c7
e36aa31
1cdac79
dff2135
dd8a1b1
6941cc1
e0bd4d8
7a5eb30
469270e
df250c9
0ec0fe9
082066b
54fc281
f16cbbe
a5639b2
3808361
d9aee0a
2d0ff37
5ff8e91
742a077
bc0064c
e83d906
08caaee
382b832
b662ae6
76fb2f4
d0fb1aa
9fc6d9e
874ea83
31c7a8d
7715c63
7fae349
d27729d
9494a19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,50 @@ | ||
| name: Lint | ||
|
|
||
| on: | ||
| push | ||
| on: push | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | ||
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: pip install -r requirements_dev.txt | ||
|
|
||
| - name: Install the library | ||
| shell: bash | ||
| run: pip install . | ||
|
|
||
| - name: Run ruff | ||
| shell: bash | ||
| run: ruff check transfunctions | ||
|
|
||
| - name: Run ruff for tests | ||
| shell: bash | ||
| run: ruff check tests | ||
| - name: Cache pip dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-${{ github.workflow }}- | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: pip install -r requirements_dev.txt | ||
|
|
||
| - name: Install the library | ||
| shell: bash | ||
| run: pip install . | ||
|
|
||
| - name: Run ruff | ||
| shell: bash | ||
| run: ruff check transfunctions | ||
|
|
||
| - name: Run ruff for tests | ||
| shell: bash | ||
| run: ruff check tests | ||
|
|
||
| - name: Run mypy | ||
| shell: bash | ||
| run: mypy --strict transfunctions | ||
|
|
||
| - name: Run mypy for tests | ||
| shell: bash | ||
| run: mypy tests --exclude typing |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,55 @@ | ||
| name: Tests | ||
|
|
||
| on: | ||
| push | ||
| on: push | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [macos-latest, ubuntu-latest, windows-latest] | ||
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | ||
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install the library | ||
| shell: bash | ||
| run: pip install . | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: pip install -r requirements_dev.txt | ||
|
|
||
| - name: Print all libs | ||
| shell: bash | ||
| run: pip list | ||
|
|
||
| - name: Run tests and show coverage on the command line | ||
| run: | | ||
| coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=90 | ||
| coverage xml | ||
|
|
||
| - name: Upload coverage to Coveralls | ||
| if: runner.os == 'Linux' | ||
| env: | ||
| COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} | ||
| uses: coverallsapp/github-action@v2 | ||
| with: | ||
| format: cobertura | ||
| file: coverage.xml | ||
|
|
||
| - name: Run tests and show the branch coverage on the command line | ||
| run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=90 | ||
| - name: Install the library | ||
| shell: bash | ||
| run: pip install . | ||
|
|
||
| - name: Cache pip dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip-${{ github.workflow }}- | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| run: pip install -r requirements_dev.txt | ||
|
|
||
|
Comment on lines
+24
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Reorder installs to leverage cache and prevent double-installs Currently you install your package before caching and before installing dev deps, which can trigger unnecessary network hits and duplicate dependency resolution. Install dev deps first (after enabling cache), then install the package (preferably editable for test workflows). - - name: Install the library
- shell: bash
- run: pip install .
-
- - name: Cache pip dependencies
- uses: actions/cache@v4
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-${{ github.workflow }}-${{ hashFiles('requirements_dev.txt') }}
- restore-keys: |
- ${{ runner.os }}-pip-${{ github.workflow }}-
+ # setup-python's built-in cache is enabled above; remove the manual cache step
+
+ - name: Install dependencies
+ shell: bash
+ run: pip install -r requirements_dev.txt
+
+ - name: Install the library (editable)
+ shell: bash
+ run: pip install -e .Notes:
🤖 Prompt for AI Agents |
||
| - name: Print all libs | ||
| shell: bash | ||
| run: pip list | ||
|
|
||
| - name: Run tests and show coverage on the command line | ||
| run: | | ||
| coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94 | ||
| coverage xml | ||
|
|
||
|
Comment on lines
+40
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Run tests once with branch coverage to save CI time You run the entire test suite twice. Combine into a single run using --branch and produce both the console report and XML. - - name: Run tests and show coverage on the command line
- run: |
- coverage run --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94
- coverage xml
+ - name: Run tests and show coverage on the command line (branch coverage)
+ run: |
+ coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain
+ coverage report -m --fail-under=94
+ coverage xml
@@
- - name: Run tests and show the branch coverage on the command line
- run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94
+ # Removed duplicate full test run; branch coverage is already collected aboveAlso applies to: 54-55 🤖 Prompt for AI Agents |
||
| - name: Upload coverage to Coveralls | ||
| if: runner.os == 'Linux' | ||
| env: | ||
| COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} | ||
| uses: coverallsapp/github-action@v2 | ||
| with: | ||
| format: cobertura | ||
| file: coverage.xml | ||
|
|
||
| - name: Run tests and show the branch coverage on the command line | ||
| run: coverage run --branch --source=transfunctions --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=94 | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,4 +6,4 @@ mypy==1.14.1 | |
| pytest-mypy-testing==0.1.3 | ||
| ruff==0.9.9 | ||
| mutmut==3.2.3 | ||
| full_match==0.0.2 | ||
| full_match==0.0.3 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # noqa: A005 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix undefined matrix variable for setup-python (actionlint error) and pin a concrete Python version
This job does not define a matrix, yet references matrix.python-version. setup-python will receive an empty version and fail. Also, consider enabling built-in pip cache for speed.
Actionlint hints:
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.7)
20-20: property "python-version" is not defined in object type {}
(expression)
23-23: property "python-version" is not defined in object type {}
(expression)
🤖 Prompt for AI Agents