Skip to content

Commit 06cedbb

Browse files
authored
Update github actions, copyright date, python versions (#90)
* Update github actions * Update copyright date * Add supported programming languages * Update add to project action * Add actions * Fix codespell * Use pyproject.toml * Fix run all tests action * Rename workflow * Fix run all tests workflow * Select push to main trigger and pull request trigger * Update maintainers doc
1 parent d8fd98d commit 06cedbb

27 files changed

+340
-2646
lines changed

.git_archival.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hdmf_docutils/_version.py export-subst
1+
.git_archival.txt export-subst

.github/workflows/codespell.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Codespell
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
codespell:
8+
name: Check for spelling errors
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v4
13+
- name: Codespell
14+
uses: codespell-project/actions-codespell@v2

.github/workflows/doc_builds.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Add Check for the HDMF-Common-Schema and NWB-schema doc builds
1+
name: Build the HDMF-Common-Schema and NWB-schema documentation
22

33
on:
44
pull_request:
@@ -7,14 +7,14 @@ jobs:
77
validate:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
with:
12-
fetch-depth: 0
12+
fetch-depth: 0 # tags are required for versioneer to determine version
1313

14-
- name: Set up Python 3.11
15-
uses: actions/setup-python@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
1616
with:
17-
python-version: "3.11"
17+
python-version: "3.13"
1818

1919
- name: Clone HDMF-Common-Schema and Install Requirements
2020
run: |
@@ -51,6 +51,3 @@ jobs:
5151
cd docs/format
5252
make clean
5353
make html
54-
55-
56-

.github/workflows/project_action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ jobs:
1212
steps:
1313
- name: GitHub App token
1414
id: generate_token
15-
uses: tibdex/github-app-token@v1.7.0
15+
uses: actions/create-github-app-token@v1
1616
with:
17-
app_id: ${{ secrets.APP_ID }}
18-
private_key: ${{ secrets.APP_PEM }}
17+
app-id: ${{ secrets.APP_ID }}
18+
private-key: ${{ secrets.APP_PEM }}
1919

2020
- name: Add to Developer Board
2121
env:
2222
TOKEN: ${{ steps.generate_token.outputs.token }}
23-
uses: actions/add-to-project@v0.4.0
23+
uses: actions/add-to-project@v1.0.2
2424
with:
2525
project-url: https://github.com/orgs/hdmf-dev/projects/7
2626
github-token: ${{ env.TOKEN }}
2727

2828
- name: Add to Community Board
2929
env:
3030
TOKEN: ${{ steps.generate_token.outputs.token }}
31-
uses: actions/add-to-project@v0.4.0
31+
uses: actions/add-to-project@v1.0.2
3232
with:
3333
project-url: https://github.com/orgs/hdmf-dev/projects/8
3434
github-token: ${{ env.TOKEN }}

.github/workflows/publish_pypi.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow will build the package and publish it to PyPI when a GitHub release is created
2+
# For more information see:
3+
# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python#publishing-to-pypi
4+
# https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-pypi
5+
6+
name: Upload Package to PyPI
7+
8+
on:
9+
release:
10+
types: [published]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
release-build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.13"
25+
26+
- name: Build release distributions
27+
run: |
28+
python -m pip install build
29+
python -m build
30+
31+
- name: Upload release distributions
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: release-dists
35+
path: dist/
36+
37+
pypi-publish:
38+
runs-on: ubuntu-latest
39+
needs:
40+
- release-build
41+
permissions:
42+
id-token: write
43+
environment:
44+
name: pypi
45+
46+
steps:
47+
- name: Retrieve release distributions
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: release-dists
51+
path: dist/
52+
53+
# GitHub recommends pinning actions to a commit SHA.
54+
# To get a newer version, we will need to update the SHA periodically.
55+
- name: Publish release distributions to PyPI
56+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc

.github/workflows/pythonpublish.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ruff.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Ruff
2+
on: pull_request
3+
4+
jobs:
5+
ruff:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repo
9+
uses: actions/checkout@v4
10+
- name: Run ruff
11+
uses: astral-sh/ruff-action@v1
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Run all tests
2+
on:
3+
schedule:
4+
- cron: '0 5 * * 1' # once per week on Monday at 5:00 AM UTC
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
run-all-tests:
13+
name: ${{ matrix.python-ver }} on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
defaults:
16+
run:
17+
shell: bash
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-ver }}-${{ matrix.os }}
20+
cancel-in-progress: true
21+
strategy:
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
- windows-latest
26+
- macos-latest
27+
python-ver:
28+
- "3.9"
29+
- "3.10"
30+
- "3.11"
31+
- "3.12"
32+
- "3.13"
33+
steps:
34+
- name: Checkout repo with submodules
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0 # tags are required to determine the version
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: ${{ matrix.python-ver }}
43+
44+
- name: Install build dependencies
45+
run: |
46+
python -m pip install --upgrade pip
47+
python -m pip install pytest
48+
python -m pip list
49+
50+
- name: Install hdmf-docutils
51+
run: |
52+
python -m pip install .
53+
54+
- name: Run tests
55+
run: |
56+
pytest

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ docs/_build
5050
# IDE junk
5151
.idea/*
5252
*.swp
53+
54+
# Add Hatch
55+
.hatch/
56+
.venv/

0 commit comments

Comments
 (0)