You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,68 @@ To run linting and code formatting checks before committing your change, you can
119
119
nox --session=pre-commit -- install
120
120
```
121
121
122
+
123
+
124
+
125
+
126
+
## Project setup
127
+
128
+
### Poetry venv
129
+
Installing the dev-dependencies in a new environment can be done with the following command:
130
+
```bash
131
+
poetry install --with dev
132
+
```
133
+
134
+
Or if you want to call nox with poetry and pass pytest flags through...
135
+
```bash
136
+
poetry run nox -p 3.11
137
+
```
138
+
139
+
The marker "integration_dapla" is for running specific tests locally on a dapla. They are placed in tests/test_integration_dapla.py .\
140
+
Use this flag in the command-line call to avoid running them on other platforms.
141
+
142
+
143
+
### Pytest coverage
144
+
```bash
145
+
poetry run nox -s tests ypy -p 3.11
146
+
```
147
+
Run this when developing tests.
148
+
If you achieve a higher testing coverage make sure to increase the threshold in the workflow.
149
+
.github/workflows/tests.yml
150
+
(at the bottom)
151
+
152
+
### Running the pre-commit hooks locally
153
+
```bash
154
+
poetry run nox -s pre-commit -p 3.11
155
+
```
156
+
Several of the pre-commit hooks will try to modify the files on a fail. Re-running the command might therefore result in a different result the second time.
157
+
158
+
### Type-checking with Mypy
159
+
```bash
160
+
poetry run nox -s mypy -p 3.11
161
+
```
162
+
163
+
## Publish new version of package to Pypi
164
+
165
+
The action to publish to Pypi is connected with a workflow to releases from Github.
166
+
So to publish to Pypi, make sure everything is done, and in the main branch, bump the version in pyproject.toml, add a tag and release on Github.
167
+
168
+
## Rebuild docs
169
+
Necessary if you have changed the package at the submodule-level.
170
+
171
+
The content of the {eval-rst} block below is generated by the command:
172
+
```bash
173
+
poetry run sphinx-apidoc -T -f -t ./docs/templates -o ./docs ./src
174
+
```
175
+
from the root directory.
176
+
177
+
178
+
179
+
### Bump version
180
+
```bash
181
+
poetry version patch
182
+
```
183
+
122
184
It is recommended to open an issue before starting work on anything.
123
185
This will allow a chance to talk it over with the owners and validate your approach.
err_msg=f'Your account has been locked. Contact kundeservice@ssb.no to unlock. Resetting auth. Errortext: {e.response_content.get("ExceptionMessage", "")}'
f"TYPE CAREFULLY - The username and password you used may have been wrong. Resetting Auth. Errortext: {e.response_content.get('ExceptionMessage', '')}",
0 commit comments