Skip to content

Commit 92b9e10

Browse files
authored
Follow Python standard packaging guidelines (#469)
1 parent 72c68ca commit 92b9e10

24 files changed

+10
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
cp .ci_support/environment-old.yml environment.yml
3333
python .ci_support/release.py; cat pyproject.toml
34-
git update-index --assume-unchanged pyproject.toml pysqa/_version.py
34+
git update-index --assume-unchanged pyproject.toml src/pysqa/_version.py
3535
- name: Build
3636
shell: bash -l {0}
3737
run: hatchling build -t sdist -t wheel

.github/workflows/pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: psf/black@stable
1414
with:
1515
options: "--check --diff"
16-
src: ./${{ github.event.repository.name }}
16+
src: ./src/${{ github.event.repository.name }}
1717

1818
black_fix: # in most cases pre-commit is faster
1919
needs: [black]
@@ -29,7 +29,7 @@ jobs:
2929
uses: psf/black@stable
3030
with:
3131
options: ""
32-
src: "./${{ github.event.repository.name }}"
32+
src: "./src/${{ github.event.repository.name }}"
3333
- name: commit
3434
run: |
3535
git config --local user.email "[email protected]"
@@ -55,7 +55,7 @@ jobs:
5555
- name: Test
5656
run: |
5757
pip install mypy types-PyYAML types-paramiko
58-
mypy --ignore-missing-imports ${{ github.event.repository.name }}
58+
mypy --ignore-missing-imports src/${{ github.event.repository.name }}
5959
6060
coverage:
6161
needs: [black]

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,26 +95,26 @@ ignore = [
9595

9696
[tool.hatch.build]
9797
include = [
98-
"pysqa"
98+
"src/pysqa"
9999
]
100100

101101
[tool.hatch.build.hooks.vcs]
102-
version-file = "pysqa/_version.py"
102+
version-file = "src/pysqa/_version.py"
103103

104104
[tool.hatch.build.targets.sdist]
105105
include = [
106-
"pysqa"
106+
"src/pysqa"
107107
]
108108

109109
[tool.hatch.build.targets.wheel]
110110
packages = [
111-
"pysqa"
111+
"src/pysqa"
112112
]
113113

114114
[tool.hatch.version]
115115
source = "vcs"
116-
path = "pysqa/_version.py"
116+
path = "src/pysqa/_version.py"
117117

118118
[tool.coverage.run]
119-
omit = ["pysqa/_version.py", "tests/*"]
119+
source = ["pysqa"]
120120
command_line = "-m unittest discover tests"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)