Skip to content

Commit c217ed0

Browse files
authored
🚚 move package to src directory (#72)
1 parent a4e56e5 commit c217ed0

File tree

12 files changed

+12
-10
lines changed

12 files changed

+12
-10
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
id: compare
2525
run: |
2626
set -e
27-
VERSION=$(awk -F'"' '/__version__/ {print $2}' mysql_to_sqlite3/__init__.py)
27+
VERSION=$(awk -F'"' '/__version__/ {print $2}' src/mysql_to_sqlite3/__init__.py)
2828
TAG=${GITHUB_REF_NAME#v}
2929
if [[ "$VERSION" != "$TAG" ]]; then
30-
echo "Version in mysql-to-sqlite3/__version__.py ($VERSION) does not match tag ($TAG)"
30+
echo "Version in src/mysql_to_sqlite3/__version__.py ($VERSION) does not match tag ($TAG)"
3131
exit 1
3232
fi
3333
echo "VERSION=$VERSION" >> $GITHUB_ENV

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Sponsor = "https://github.com/sponsors/techouse"
5656
PayPal = "https://paypal.me/ktusar"
5757

5858
[tool.hatch.version]
59-
path = "mysql_to_sqlite3/__init__.py"
59+
path = "src/mysql_to_sqlite3/__init__.py"
6060

6161
[tool.hatch.build.targets.sdist]
6262
include = [
63-
"mysql_to_sqlite3",
63+
"src",
6464
"tests",
6565
"README.md",
6666
"CHANGELOG.md",
@@ -102,6 +102,7 @@ known_first_party = "mysql_to_sqlite3"
102102
skip_gitignore = true
103103

104104
[tool.pytest.ini_options]
105+
pythonpath = ["src"]
105106
testpaths = ["tests"]
106107
norecursedirs = [".*", "venv", "env", "*.egg", "dist", "build"]
107108
minversion = "7.3.1"
@@ -115,6 +116,7 @@ markers = [
115116
]
116117

117118
[tool.mypy]
119+
mypy_path = "src"
118120
python_version = "3.8"
119121
exclude = [
120122
"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.
File renamed without changes.

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ passenv =
2525
LEGACY_DB
2626
deps =
2727
-rrequirements_dev.txt
28-
commands = pytest -v --cov=mysql_to_sqlite3 --cov-report=xml
28+
commands = pytest -v --cov=src/mysql_to_sqlite3 --cov-report=xml
2929

3030
[testenv:black]
3131
basepython = python3
3232
skip_install = true
3333
deps =
3434
black
35-
commands = black mysql_to_sqlite3 tests/
35+
commands = black src/mysql_to_sqlite3 tests/
3636

3737
[testenv:isort]
3838
basepython = python3
@@ -53,7 +53,7 @@ deps =
5353
flake8-typing-imports
5454
pep8-naming
5555
commands =
56-
flake8 mysql_to_sqlite3
56+
flake8 src/mysql_to_sqlite3
5757

5858
[testenv:pylint]
5959
basepython = python3
@@ -63,15 +63,15 @@ deps =
6363
-rrequirements_dev.txt
6464
disable = C0209,C0301,C0411,R,W0107,W0622
6565
commands =
66-
pylint --rcfile=tox.ini mysql_to_sqlite3
66+
pylint --rcfile=tox.ini src/mysql_to_sqlite3
6767

6868
[testenv:bandit]
6969
basepython = python3
7070
skip_install = true
7171
deps =
7272
bandit
7373
commands =
74-
bandit -r mysql_to_sqlite3 -c .bandit.yml
74+
bandit -r src/mysql_to_sqlite3 -c .bandit.yml
7575

7676
[testenv:mypy]
7777
basepython = python3
@@ -80,7 +80,7 @@ deps =
8080
mypy>=1.3.0
8181
-rrequirements_dev.txt
8282
commands =
83-
mypy mysql_to_sqlite3
83+
mypy src/mysql_to_sqlite3
8484

8585
[testenv:linters]
8686
basepython = python3

0 commit comments

Comments
 (0)