Skip to content

Commit

Permalink
fix: pdm python setup in nx integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mikonse committed Jun 15, 2024
1 parent 20f2686 commit 9ca154d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
python-version: "3.11"

- name: Install Python dependencies
run: pdm sync -d -G testing
run: pdm sync -d

- name: Lint
run: npx nx run-many --target=lint
Expand All @@ -52,7 +52,7 @@ jobs:
python-version: "3.11"

- name: Install Python dependencies
run: pdm sync -d -G testing
run: pdm sync -d

- name: Test
run: npx nx run-many --target=test
Expand All @@ -78,7 +78,7 @@ jobs:
python-version: "3.11"

- name: Install Python dependencies
run: pdm sync -d -G testing
run: pdm sync -d

- name: Build
run: npx nx run-many --target=build
12 changes: 6 additions & 6 deletions sftkit/Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
.PHONY: test
test:
pdm run pytest . --doctest-modules
pdm run -p .. pytest . --doctest-modules

.PHONY: format
format:
pdm run ruff format
pdm run -p .. ruff format

.PHONY: lint
lint: ruff mypy check-format

.PHONY: ruff
ruff:
pdm run ruff check .
pdm run -p .. ruff check .

.PHONY: ruff-fix
ruff-fix:
pdm run ruff check . --fix
pdm run -p .. ruff check . --fix

.PHONY: mypy
mypy:
pdm run mypy .
pdm run -p .. mypy .

.PHONY: check-format
check-format:
pdm run ruff format --check
pdm run -p .. ruff format --check

.PHONY: build
package:
Expand Down
18 changes: 9 additions & 9 deletions sftkit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@
"typecheck": {
"executor": "nx:run-commands",
"options": {
"command": "pdm run mypy sftkit",
"cwd": "sftkit"
"command": "pdm run -p .. mypy .",
"cwd": "{projectRoot}"
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "pdm run ruff .",
"cwd": "sftkit"
"command": "pdm run -p .. ruff check .",
"cwd": "{projectRoot}"
},
"dependsOn": ["typecheck"]
},
"format": {
"executor": "nx:run-commands",
"options": {
"command": "pdm run ruff format .",
"cwd": "sftkit"
"command": "pdm run -p .. ruff format .",
"cwd": "{projectRoot}"
}
},
"test": {
"executor": "nx:run-commands",
"options": {
"command": "pdm run pytest . --doctest-modules",
"cwd": "sftkit"
"command": "pdm run -p .. pytest . --doctest-modules",
"cwd": "{projectRoot}"
}
},
"build": {
"executor": "nx:run-commands",
"inputs": ["default"],
"options": {
"command": "pdm build",
"cwd": "sftkit"
"cwd": "{projectRoot}"
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions sftkit/tests/test_dummy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import pytest

from sftkit.service import Service


async def test_dummy():
assert True == True
assert True

0 comments on commit 9ca154d

Please sign in to comment.