Skip to content

Commit 2a9851c

Browse files
authored
Merge pull request #39 from dpgraham4401/src_layout
Migrate to src layout and pyproject.toml
2 parents 0ff2493 + 93dab05 commit 2a9851c

File tree

7 files changed

+37
-32
lines changed

7 files changed

+37
-32
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,10 @@ jobs:
5858
- name: Install dependencies
5959
run: |
6060
python -m pip install --upgrade pip
61+
pip install --group dev .
6162
pip install -q Django~=${{ matrix.django_version }}
62-
pip install coverage pytest
63-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
6463
6564
- name: Run tests
6665
run: |
67-
coverage3 run --source='./encrypted_fields' manage.py test
66+
coverage run --source='./src/encrypted_fields' manage.py test
6867
coverage xml
69-
70-
# - name: "Upload coverage to Artifact"
71-
# uses: actions/upload-artifact@v4
72-
# with:
73-
# name: coverage
74-
# path: coverage.xml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ dist/
1616
.ruff_cache
1717
.venv
1818
.venv_django_*
19+
.coverage*
20+
coverage.*
1921

2022
# Node
2123
node_modules/

pyproject.toml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
[project]
2+
name = "django-fernet-encrypted-fields"
3+
version = "0.3.1"
4+
description = "Symmetrically encrypted model fields for Django"
5+
readme = "README.md"
6+
license = "MIT"
7+
authors = [
8+
{ name = "jazzband", email = "n.anahara@fragment.co.jp" },
9+
]
10+
requires-python = ">=3.10"
11+
dependencies = [
12+
"Django>=4.2",
13+
"cryptography>=35.0.0",
14+
]
15+
16+
[project.urls]
17+
Homepage = "https://github.com/jazzband/django-fernet-encrypted-fields/"
18+
19+
[build-system]
20+
requires = ["setuptools>=61.0.0"]
21+
build-backend = "setuptools.build_meta"
22+
23+
[dependency-groups]
24+
dev = [
25+
"mypy>=1.19.1,<2",
26+
"pre-commit>=4.5.1",
27+
"ruff>=0.15.6,<0.16.0",
28+
"pytest>=9.0.2",
29+
"pytest-cov>=7.0.0",
30+
"coverage>=7.13.4,<8.0.0",
31+
]
32+
133
##################
234
# ruff
335
##################
@@ -7,7 +39,7 @@ lint.fixable = ["ALL"]
739
lint.ignore = ["A003", "COM812", "D", "DJ008", "ERA001", "ISC001", "PLC2401", "PLC2403", "PT011", "RUF001", "S101", "S105", "S608", "SIM103", "TC001", "TC002", "TC003", "UP040"]
840
lint.select = ["ALL"]
941
lint.unfixable = ["ERA001", "F401"]
10-
include = ["encrypted_fields/*.py", "package_test/*.py"]
42+
extend-include = ["package_test/**/*.py"]
1143
target-version = "py312"
1244

1345
##################

requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)