Skip to content

Commit b86680e

Browse files
authored
Merge pull request #28 from radionets-project/fix-docs
Fix docs
2 parents 2506995 + 1331bbd commit b86680e

File tree

4 files changed

+103
-8
lines changed

4 files changed

+103
-8
lines changed

.github/workflows/changelog.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Changelog
2+
3+
on:
4+
pull_request:
5+
# should also be re-run when changing labels
6+
types: [opened, reopened, labeled, unlabeled, synchronize]
7+
8+
env:
9+
FRAGMENT_NAME: "docs/changes/${{ github.event.number }}.*.rst"
10+
11+
jobs:
12+
changelog:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v5
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Check for news fragment
20+
if: ${{ ! contains( github.event.pull_request.labels.*.name, 'no-changelog-needed')}}
21+
uses: andstor/file-existence-action@v3
22+
with:
23+
files: ${{ env.FRAGMENT_NAME }}
24+
fail: true

.github/workflows/ci.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
matrix:
2121
include:
2222
- os: ubuntu-latest
23-
python-version: "3.10"
23+
python-version: "3.11"
2424
install-method: mamba
2525

2626
- os: ubuntu-latest
27-
python-version: "3.11"
27+
python-version: "3.12"
2828
install-method: mamba
2929
extra-args: ["codecov"]
3030

@@ -34,7 +34,7 @@ jobs:
3434
shell: bash -leo pipefail {0}
3535

3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v5
3838
with:
3939
fetch-depth: 0
4040

@@ -48,7 +48,7 @@ jobs:
4848
4949
- name: mamba setup
5050
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
51-
uses: mamba-org/setup-micromamba@v1
51+
uses: mamba-org/setup-micromamba@v2
5252
with:
5353
environment-file: environment.yml
5454
cache-downloads: true
@@ -58,7 +58,8 @@ jobs:
5858
PYTHON_VERSION: ${{ matrix.python-version }}
5959
run: |
6060
python --version
61-
pip install --group dev -e ".[all]"
61+
pip install --upgrade pip
62+
pip install --group tests -e .
6263
pip freeze
6364
pip list
6465
@@ -68,9 +69,43 @@ jobs:
6869

6970
- name: Tests
7071
run: |
71-
pytest -vv --cov --cov-branch --cov-report=xml
72+
pytest -vv --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
7273
7374
- name: Upload coverage to Codecov
7475
uses: codecov/codecov-action@v5
7576
env:
7677
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
78+
79+
- name: Upload test results to Codecov
80+
if: ${{ !cancelled() }}
81+
uses: codecov/test-results-action@v1
82+
with:
83+
token: ${{ secrets.CODECOV_TOKEN }}
84+
85+
docs:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v5
89+
with:
90+
fetch-depth: 0
91+
92+
- uses: astral-sh/setup-uv@v6
93+
94+
- name: Set up Python
95+
uses: actions/setup-python@v5
96+
with:
97+
python-version: "3.11"
98+
99+
- name: Install doc dependencies
100+
run: |
101+
sudo apt update --yes && sudo apt install --yes git
102+
uv pip install --system . -U pip towncrier
103+
uv pip install --system . --group docs -e .
104+
git describe --tags
105+
106+
- name: Build docs
107+
run: make -C docs html
108+
109+
- name: Produce Changelog
110+
run: |
111+
towncrier build --yes --version==0.0.0

.readthedocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ build:
1111
- asdf plugin add uv
1212
- asdf install uv latest
1313
- asdf global uv latest
14-
- mkdir $HOME/.casa/data
1514
install:
1615
- uv pip install --upgrade pip
17-
- uv pip install --group docs .[casa]
16+
- uv pip install --group docs
1817

1918
sphinx:
2019
configuration: docs/conf.py

pyproject.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,40 @@ docstring-code-format = true
142142

143143
[tool.ruff.lint.isort]
144144
known-first-party = ["pyvisgrid"]
145+
146+
147+
[tool.towncrier]
148+
package = "pyvisgrid"
149+
directory = "docs/changes"
150+
filename = "CHANGES.rst"
151+
template = "docs/changes/template.rst"
152+
# let towncrier create proper links to the merged PR
153+
issue_format = "`#{issue} <https://github.com/radionets-project/pyvisgrid/pull/{issue}>`__"
154+
155+
[tool.towncrier.fragment.feature]
156+
name = "New Features"
157+
showcontent = true
158+
159+
[tool.towncrier.fragment.bugfix]
160+
name = "Bug Fixes"
161+
showcontent = true
162+
163+
[tool.towncrier.fragment.api]
164+
name = "API Changes"
165+
showcontent = true
166+
167+
[tool.towncrier.fragment.datamodel]
168+
name = "Data Model Changes"
169+
showcontent = true
170+
171+
[tool.towncrier.fragment.optimization]
172+
name = "Refactoring and Optimization"
173+
showcontent = true
174+
175+
[tool.towncrier.fragment.maintenance]
176+
name = "Maintenance"
177+
showcontent = true
178+
179+
[[tool.towncrier.section]]
180+
name = ""
181+
path = ""

0 commit comments

Comments
 (0)