1
- [tool . poetry ]
1
+ [project ]
2
2
name = " ndoh-hub"
3
3
version = " 0.10.25"
4
4
description = " NDOH Registration and Change service for MomConnect and NurseConnect"
5
- authors = [
" Fritz Brand <[email protected] >" ]
6
- repository = " https://github.com/praekeltfoundation/ndoh-hub"
7
- license = " BSD"
5
+ authors = [
6
+ {
name =
" Reach Digital Health" ,
email =
" [email protected] " },
7
+ ]
8
+ license = {text = " BSD" }
8
9
readme = " README.md"
10
+ requires-python = " >=3.10,<4.0"
11
+ dependencies = [
12
+ " Django>=4.2.15" ,
13
+ " djangorestframework>=3.15.2" ,
14
+ " coreapi>=2.3.3" ,
15
+ " Markdown>=3.1.1" ,
16
+ " dj-database-url>=1.2.0" ,
17
+ " django-environ>=0.10.0" ,
18
+ " psycopg2-binary>=2.8.6" ,
19
+ " raven>=6.9.0" ,
20
+ " django-filter>=2.4.0" ,
21
+ " celery>=5.2.3" ,
22
+ " six>=1.11.0" ,
23
+ " requests>=2.32.0" ,
24
+ " demands>=3.0.0" ,
25
+ " structlog>=18.2.0" ,
26
+ " phonenumberslite>=8.9.15" ,
27
+ " django-simple-history>=3.3.0" ,
28
+ " openpyxl>=2.5.9" ,
29
+ " django-prometheus>=2.2.0" ,
30
+ " rapidpro-python==2.6.1" , # V2.7.0 removed the V1 API support, which we use
31
+ " pycountry>=19.8.18" ,
32
+ " attrs>=24.2.0" ,
33
+ " iso6709>=0.1.5" ,
34
+ " redis>=4.5.4" ,
35
+ " django-redis>=5.2.0" ,
36
+ " celery_batches>=0.7" ,
37
+ " python-dateutil>=2.8.2" ,
38
+ ]
39
+
40
+ [project .urls ]
41
+ repository = " http://github.com/praekeltfoundation/ndoh-hub"
9
42
43
+ [build-system ]
44
+ requires = [" hatchling" ]
45
+ build-backend = " hatchling.build"
46
+
47
+ [tool .hatch .build .targets .wheel ]
10
48
packages = [
11
- { include = " aaq" } ,
12
- { include = " changes" } ,
13
- { include = " eventstore" } ,
14
- { include = " registrations" } ,
49
+ " aaq" ,
50
+ " changes" ,
51
+ " eventstore" ,
52
+ " registrations" ,
15
53
]
16
54
17
- [tool .poetry .dependencies ]
18
- python = " ^3.9"
19
- Django = " ^4.2.15"
20
- djangorestframework = " ^3.15.2"
21
- coreapi = " ^2.3.3"
22
- Markdown = " ^3.1.1"
23
- dj-database-url = " ^1.2.0"
24
- django-environ = " ^0.10.0"
25
- psycopg2-binary = " ^2.8.6"
26
- raven = " ^6.9.0"
27
- django-filter = " ^2.4.0"
28
- celery = " ^5.2.3"
29
- six = " ^1.11.0"
30
- requests = " ^2.32.0"
31
- demands = " ^3.0.0"
32
- structlog = " ^18.2.0"
33
- phonenumberslite = " ^8.9.15"
34
- django-simple-history = " ^3.3.0"
35
- openpyxl = " ^2.5.9"
36
- django-prometheus = " ^2.2.0"
37
- rapidpro-python = " 2.6.1" # V2.7.0 removed the V1 API support, which we use
38
- pycountry = " ^19.8.18"
39
- attrs = " ^24.2.0"
40
- iso6709 = " ^0.1.5"
41
- redis = " ^4.5.4"
42
- django-redis = " ^5.2.0"
43
- celery_batches = " ^0.7"
44
- python-dateutil = " ^2.8.2"
45
-
46
- [tool .poetry .group .dev .dependencies ]
47
- ruff = " ^0.6.9"
48
- pytest = " ^7.2.1"
49
- pytest-cov = " ^4.0.0"
50
- pytest-django = " ^4.5.2"
51
- pytest-asyncio = " ^0.21.0"
52
- responses = " ^0.23.1"
53
- pre-commit = " ^3.2.0"
54
- freezegun = " ^1.2.2"
55
+ [dependency-groups ]
56
+ dev = [
57
+ " ruff>=0.6.9" ,
58
+ " pytest>=7.2.1" ,
59
+ " pytest-cov>=4.0.0" ,
60
+ " pytest-django>=4.5.2" ,
61
+ " pytest-asyncio>=0.21.0" ,
62
+ " responses>=0.23.1" ,
63
+ " pre-commit>=3.2.0" ,
64
+ " freezegun>=1.2.2" ,
65
+ ]
55
66
56
- [build-system ]
57
- requires = [" poetry-core" ]
58
- build-backend = " poetry.core.masonry.api"
67
+ [tool .pytest .ini_options ]
68
+ filterwarnings = [' ignore::DeprecationWarning' ,]
69
+ python_files = " test*.py"
70
+ addopts = " --verbose --ds=config.settings.test"
59
71
60
72
[tool .ruff ]
61
73
extend-exclude = [
62
74
" */migrations/*.py" ,
63
- " docs/conf.py" ,
64
-
65
75
]
66
76
67
77
[tool .ruff .lint ]
@@ -84,32 +94,96 @@ ignore = [
84
94
" E501" , # TODO: Something about these long lines.
85
95
" S113" , # TODO: Add request timeouts.
86
96
" PTH118" , # TODO: Switch to pathlib
87
- " PTH100" , # TODO: 'os.path.abspath()' should be replaced by 'Path.resolve()' maybe use pathlib?
88
- " PTH120" , # TODO: 'os.path.dirname()' should be replaced by 'Path.parent' maybe use pathlib?
97
+ " PTH100" , # TODO: Switch to pathlib
98
+ " PTH120" , # TODO: Switch to pathlib
99
+ " RUF012" , # We usually want immutable instance attributes
89
100
" PTH123" , # TODO: 'open()' should be replaced by 'Path.open()' maybe use pathlib?
90
101
# Ignores below this line needs to be checked out by someone with more knowledge of the project
91
102
" S501" , # TODO: Probable use of 'requests' call with 'verify=False' disabling SSL certificate checks
92
103
" SIM115" , # TODO: Use a context manager for opening files - FWB: Tried fixing these, but ran into errors on tests
93
104
" S101" , # TODO: Use of 'assert' detected - FWB: Looks like this is only used in migration files
94
105
" S608" , # TODO: Possible SQL injection vector through string-based query construction
95
106
" RUF012" , # We usually want immutable instance attributes
96
-
97
107
]
98
108
99
- # Do not add S106 or S105 global ignores. Rather use inline ignores (noqa)
100
109
[tool .ruff .lint .per-file-ignores ]
101
110
"**/tests/**" = [
102
- " S101" , # It's okay to use ' assert' in tests.
111
+ " S101" , # It's okay to use ` assert` in tests.
103
112
]
104
113
105
114
# TODO: Move this somewhere sensible?
106
115
"**/tests.py" = [
107
- " S101" , # It's okay to use ' assert' in tests.
116
+ " S101" , # It's okay to use ` assert` in tests.
108
117
]
109
118
110
119
"**/config/settings/{test,dev}.py" = [
111
120
" S104" , # It's okay to bind to all interfaces in tests
112
121
" F405" , # Its okay to import * in settings
113
122
" S105" , # Its okay to have hardcoded secrets in test config
123
+ ]
124
+ "ndoh_hub/testsettings.py" = [
125
+ " S105" , # Its okay to have hardcoded secrets in test config
126
+ ]
127
+
128
+
129
+
130
+ # [build-system]
131
+ # requires = ["poetry-core"]
132
+ # build-backend = "poetry.core.masonry.api"
133
+
134
+ # [tool.ruff]
135
+ # extend-exclude = [
136
+ # "*/migrations/*.py",
137
+ # "docs/conf.py",
138
+
139
+ # ]
140
+
141
+ # [tool.ruff.lint]
142
+ # select = [
143
+ # "E", "F", "W", # pycodestyle + pyflakes == flake8 - mccabe
144
+ # "I", # isort
145
+ # "UP", # pyupgrade
146
+ # "S", # flake8-bandit
147
+ # "B", # flake8-bugbear
148
+ # "C4", # flake8-comprehensions
149
+ # # "DJ", # flake8-django
150
+ # "PIE", # flake8-pie
151
+ # # "PT", # flake8-pytest-style
152
+ # "SIM", # flake8-simplify
153
+ # "PTH", # flake8-use-pathlib
154
+ # "RUF", # ruff-specific rules
155
+ # ]
156
+
157
+ # ignore = [
158
+ # "E501", # TODO: Something about these long lines.
159
+ # "S113", # TODO: Add request timeouts.
160
+ # "PTH118", # TODO: Switch to pathlib
161
+ # "PTH100", # TODO: 'os.path.abspath()' should be replaced by 'Path.resolve()' maybe use pathlib?
162
+ # "PTH120", # TODO: 'os.path.dirname()' should be replaced by 'Path.parent' maybe use pathlib?
163
+ # "PTH123", # TODO: 'open()' should be replaced by 'Path.open()' maybe use pathlib?
164
+ # # Ignores below this line needs to be checked out by someone with more knowledge of the project
165
+ # "S501", #TODO: Probable use of 'requests' call with 'verify=False' disabling SSL certificate checks
166
+ # "SIM115", # TODO: Use a context manager for opening files - FWB: Tried fixing these, but ran into errors on tests
167
+ # "S101", # TODO: Use of 'assert' detected - FWB: Looks like this is only used in migration files
168
+ # "S608", # TODO: Possible SQL injection vector through string-based query construction
169
+ # "RUF012", # We usually want immutable instance attributes
170
+
171
+ # ]
172
+
173
+ # # Do not add S106 or S105 global ignores. Rather use inline ignores (noqa)
174
+ # [tool.ruff.lint.per-file-ignores]
175
+ # "**/tests/**" = [
176
+ # "S101", # It's okay to use 'assert' in tests.
177
+ # ]
178
+
179
+ # # TODO: Move this somewhere sensible?
180
+ # "**/tests.py" = [
181
+ # "S101", # It's okay to use 'assert' in tests.
182
+ # ]
183
+
184
+ # "**/config/settings/{test,dev}.py" = [
185
+ # "S104", # It's okay to bind to all interfaces in tests
186
+ # "F405", # Its okay to import * in settings
187
+ # "S105", # Its okay to have hardcoded secrets in test config
114
188
115
- ]
189
+ # ]
0 commit comments