Skip to content

Commit 9502081

Browse files
authored
Add a section for a local workflow to CONTRIBUTING.md (#19)
* Add section describing a local workflow * Use the nps alias when invoking ni-python-styleguide * Add step for building the documentation bundle * Remove --keep-going from check_docs.yml because it is always enabled
1 parent db10b2c commit 9502081

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

.github/workflows/check_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
- name: Install nipanel (with docs)
3535
run: poetry install -v --only main,docs
3636
- name: Generate docs
37-
run: poetry run sphinx-build docs docs/_build -b html -W --keep-going
37+
run: poetry run sphinx-build docs docs/_build -b html -W
3838
- name: Upload docs artifact
3939
uses: actions/upload-artifact@v4
4040
with:
4141
name: nipanel-docs
42-
path: docs/_build/
42+
path: docs/_build/

CONTRIBUTING.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to nipanel-python
1+
# Contributing to nipanel-python
22

33
Contributions to nipanel-python are welcome from all!
44

@@ -26,7 +26,30 @@ This is the command to generate the files in /src/ni/pythonpanel/v1/:
2626

2727
# Testing
2828

29-
- TODO: include testing steps here.
29+
## Simple development loop
30+
31+
```
32+
# Create a new branch
33+
git fetch
34+
git switch --create users/{username}/{branch-purpose} origin/main
35+
36+
# Install the project dependencies
37+
poetry install --with docs
38+
39+
# ✍ Make source changes
40+
41+
# Run the analyzers -- see files in .github/workflows for details
42+
poetry run nps lint
43+
poetry run mypy
44+
poetry run bandit -c pyproject.toml -r src/nipanel
45+
46+
# Run the tests
47+
poetry run pytest -v
48+
49+
# Build and inspect the documentation
50+
poetry run sphinx-build docs docs/_build --builder html --fail-on-warning
51+
start docs\_build\index.html
52+
```
3053

3154
# Developer Certificate of Origin (DCO)
3255

@@ -59,4 +82,4 @@ This is the command to generate the files in /src/ni/pythonpanel/v1/:
5982
(taken from [developercertificate.org](https://developercertificate.org/))
6083

6184
See [LICENSE](https://github.com/ni/<reponame>/blob/main/LICENSE)
62-
for details about how \<reponame\> is licensed.
85+
for details about how \<reponame\> is licensed.

0 commit comments

Comments
 (0)