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: docs/dev/contributing.md
+34-5Lines changed: 34 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,44 @@ Pull requests are welcomed and automatically built and tested against multiple v
4
4
5
5
Except for unit tests, testing is only supported on Python 3.9.
6
6
7
-
The project is packaged with a light development environment based on `Docker` to help with the local development of the project and to run tests within GitHub Actions.
7
+
The project is packaged with a light development environment based on `Docker` to help with the local development of the project and to run tests within GitHub Actions.
8
8
9
-
The project is following Network to Code software development guidelines and are leveraging the following:
9
+
The project is following Network to Code software development guidelines and is leveraging the following:
10
10
11
-
-Black, Pylint, Bandit, flake8, and pydocstyle for Python linting and formatting.
12
-
-pytest, coverage, and unittest for unit tests.
11
+
-Python linting and formatting: `pylint`and `ruff`.
12
+
-YAML linting is done with `yamllint`.
13
13
14
14
Documentation is built using [mkdocs](https://www.mkdocs.org/). The [Docker based development environment](dev_environment.md#docker-development-environment) can be started by running `invoke docs`[http://localhost:8001](http://localhost:8001) that auto-refreshes when you make any changes to your local files.
15
15
16
+
## Creating Changelog Fragments
17
+
18
+
All pull requests to `next` or `develop` must include a changelog fragment file in the `./changes` directory. To create a fragment, use your GitHub issue number and fragment type as the filename. For example, `2362.added`. Valid fragment types are `added`, `changed`, `deprecated`, `fixed`, `removed`, and `security`. The change summary is added to the file in plain text. Change summaries should be complete sentences, starting with a capital letter and ending with a period, and be in past tense. Each line of the change fragment will generate a single change entry in the release notes. Use multiple lines in the same file if your change needs to generate multiple release notes in the same category. If the change needs to create multiple entries in separate categories, create multiple files.
19
+
20
+
!!! example
21
+
22
+
**Wrong**
23
+
```plaintext title="changes/1234.fixed"
24
+
fix critical bug in documentation
25
+
```
26
+
27
+
**Right**
28
+
```plaintext title="changes/1234.fixed"
29
+
Fixed critical bug in documentation.
30
+
```
31
+
32
+
!!! example "Multiple Entry Example"
33
+
34
+
This will generate 2 entries in the `fixed` category and one entry in the `changed` category.
35
+
36
+
```plaintext title="changes/1234.fixed"
37
+
Fixed critical bug in documentation.
38
+
Fixed release notes generation.
39
+
```
40
+
41
+
```plaintext title="changes/1234.changed"
42
+
Changed release notes generation.
43
+
```
44
+
16
45
## Branching Policy
17
46
18
47
The branching policy includes the following tenets:
@@ -45,4 +74,4 @@ When a new release is created the following should happen.
45
74
- A post release PR is created with.
46
75
- Change the version from `<major>.<minor>.<patch>` to `<major>.<minor>.<patch + 1>-beta` pyproject.toml.
@@ -51,7 +50,7 @@ Poetry is used in lieu of the "virtualenv" commands and is leveraged in both env
51
50
The `pyproject.toml` file outlines all of the relevant dependencies for the project:
52
51
53
52
-`tool.poetry.dependencies` - the main list of dependencies.
54
-
-`tool.poetry.dev-dependencies` - development dependencies, to facilitate linting, testing, and documentation building.
53
+
-`tool.poetry.group.dev.dependencies` - development dependencies, to facilitate linting, testing, and documentation building.
55
54
56
55
The `poetry shell` command is used to create and enable a virtual environment managed by Poetry, so all commands ran going forward are executed within the virtual environment. This is similar to running the `source venv/bin/activate` command with virtualenvs. To install project dependencies in the virtual environment, you should run `poetry install` - this will install **both** project and development dependencies.
57
56
@@ -82,21 +81,18 @@ Each command can be executed with `invoke <command>`. Each command also has its
82
81
### Utility
83
82
84
83
```
85
-
cli Enter the image to perform troubleshooting or dev work.
86
-
clean-container Remove stopped containers that source for image `pyntc:`
84
+
cli Enter the image to perform troubleshooting or dev work.
85
+
clean Remove stopped containers that source for image `pyntc:`
86
+
generate-release-notes Generate Release Notes using Towncrier.
87
87
```
88
88
89
89
### Testing
90
90
91
91
```
92
-
bandit Run bandit to validate basic static code security analysis.
93
-
black Run black to check that Python files adhere to its style standards.
94
-
coverage Run the coverage report against pytest.
95
-
flake8 Run flake8 to check that Python files adhere to its style standards.
96
-
mypy Run mypy to validate typing-hints.
97
-
pylint Run pylint code analysis.
98
-
pydocstyle Run pydocstyle to validate docstring formatting adheres to NTC defined standards.
99
-
pytest Run pytest for the specified name and Python version.
100
-
tests Run all tests for the specified name and Python version.
101
-
yamllint Run yamllint to validate formatting adheres to NTC defined YAML standards.
92
+
autoformat (a) Run code autoformatting.
93
+
pylint Run pylint for the specified name and Python version.
94
+
ruff Run ruff to perform code formatting and/or linting.
95
+
pytest Run pytest for the specified name and Python version.
96
+
tests Run all tests for the specified name and Python version.
97
+
yamllint Run yamllint to validate formatting adheres to NTC defined YAML standards.
0 commit comments