Skip to content

Commit

Permalink
Use src layout and update pyproject.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick ZAJDA <[email protected]>
  • Loading branch information
Nardol committed Jan 10, 2024
1 parent 43cc627 commit bc506a9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
filters: |
docfiles:
- 'pysmsboxnet/*.py'
- 'src/pysmsboxnet/*.py'
- 'docs/**'
- 'requirements_doc.txt'
Expand Down Expand Up @@ -52,9 +52,9 @@ jobs:
pip install -e .
- name: 🖤 Lint with Black
run: venv/bin/black pysmsboxnet tests --check
run: venv/bin/black src tests --check
- name: 🖤 Lint with Flake8
run: venv/bin/flake8 pysmsboxnet tests
run: venv/bin/flake8 src tests
- name: Pre-commit cache
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -85,14 +85,14 @@ jobs:
check-latest: true

- name: 📦 Install dependencies
run: pip3 install -r requirements_test.txt
run: pip3 install -r requirements_test.txt -e .

- name: 🏃 Run tests
run: pytest tests

- name: Run code coverage
if: ${{ matrix.python-version == '3.10' }}
run: pytest --cov=./pysmsboxnet --cov-report=xml tests
run: pytest --cov=./src --cov-report=xml tests

- name: upload to codecov
if: ${{ matrix.python-version == '3.10' }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ repos:
language: script
types: [python]
require_serial: true
files: ^(pysmsboxnet)/.+\.py$
files: ^(src/pysmsboxnet)/.+\.py$
ci:
skip: ["mypy"]
9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = [ "setuptools==67.2.0", "wheel==0.38.4", "setuptools-git-versioning==1.13.1", ]
requires = [ "setuptools", "setuptools-git-versioning", ]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -43,12 +43,7 @@ dependencies = [

[tool.setuptools]
platforms = ["any"]
zip-safe = false
include-package-data = true

[tool.setuptools.packages.find]
include = ["pysmsboxnet*"]
namespaces = false
include-package-data = false

[tool.black]
target-version = ["py39", "py310"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bc506a9

Please sign in to comment.