Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
35ce3fa
update test data commit
cheroy-ntia May 1, 2025
d848824
update description
cheroy-ntia May 9, 2025
b731c30
update template
cheroy-ntia May 15, 2025
9b329dd
Merge branch 'template-main'
cheroy-ntia May 15, 2025
f8b9ff0
update README template
cheroy-ntia May 20, 2025
65c3c5d
Merge branch 'template-main' into merge_template
cheroy-ntia May 20, 2025
038730a
add csv_to_test_dict
cheroy-ntia May 22, 2025
9867a46
Merge branch 'template-main' into merge_template
cheroy-ntia May 22, 2025
5448d85
add convertResultStruct
cheroy-ntia May 22, 2025
b82c151
add SolutionMethod enum
cheroy-ntia May 22, 2025
11d439d
test invalid pol
cheroy-ntia May 22, 2025
9957b90
update comments
cheroy-ntia May 29, 2025
9ac91d1
update trademark
cheroy-ntia May 29, 2025
9edf881
Merge branch 'template-main' into merge_template
cheroy-ntia May 29, 2025
7400b9f
Merge branch 'template-main' into merge_template
cheroy-ntia May 29, 2025
93934ab
add comments
cheroy-ntia May 29, 2025
0386d3e
update test data submodule
cheroy-ntia Jun 4, 2025
39500d9
Merge pull request #9 from NTIA/merge_template
cheroy-ntia Jun 4, 2025
328885c
update workflow version
cheroy-ntia Jul 14, 2026
339d573
Merge pull request #1 from NTIA/update_workflow
cheroy-ntia Jul 14, 2026
aed885a
update version
cheroy-ntia Jul 15, 2026
4e0ae9f
Merge branch 'main' of https://github.com/NTIA/proplib-template-python
cheroy-ntia Jul 15, 2026
4b17535
update version
cheroy-ntia Jul 15, 2026
1f8751d
Merge branch 'template-main' into dev
cheroy-ntia Jul 15, 2026
cb3df34
merge template
cheroy-ntia Jul 15, 2026
9ded31d
u
cheroy-ntia Jul 17, 2026
db3a9fd
Merge branch 'template-main' into dev
cheroy-ntia Jul 20, 2026
55d2129
update to robinraju/release-downloader@v1.13
cheroy-ntia Aug 7, 2026
2cadbbd
optimize workflows
cheroy-ntia Aug 21, 2026
81183de
update comments
cheroy-ntia Aug 25, 2026
0550a0c
improve template
cheroy-ntia Sep 3, 2026
977e08b
submodule token
cheroy-ntia Sep 3, 2026
1d5bba1
add token for downloading C++ library
cheroy-ntia Sep 3, 2026
1f69da7
Initial plan
Copilot Sep 3, 2026
44ec88a
fix: make test helper type hints Python 3.9 compatible
Copilot Sep 3, 2026
03b72a1
Merge pull request #2 from NTIA/copilot/fix-windows-github-actions-job
cheroy-ntia Sep 3, 2026
88f5dcd
Initial plan
Copilot Sep 3, 2026
0411648
fix: run macOS x64 pytest job on intel runner
Copilot Sep 3, 2026
91e6a71
Merge pull request #3 from NTIA/copilot/fix-macos-intel-py39-job
cheroy-ntia Sep 3, 2026
d4a7e08
reformet
cheroy-ntia Sep 3, 2026
8a11ea7
Merge branch 'template-main' into dev
cheroy-ntia Sep 3, 2026
ee31647
add submodule
cheroy-ntia Sep 3, 2026
f106dd0
Merge pull request #12 from NTIA/merge_template
cheroy-ntia Sep 15, 2026
d73aef9
update version
cheroy-ntia Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .github/workflows/cff-validator.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
name: Validate CITATION.cff

on:
push:
branches: ["main", "dev"]
paths:
- 'CITATION.cff'
- '.github/workflows/cff-validator.yml'
pull_request:
branches: ["main", "dev"]
paths:
- 'CITATION.cff'
- '.github/workflows/cff-validator.yml'
## Auto-triggers are disabled by default. Uncomment the
## push/pull_request blocks below to enable validation on branches/PRs. Until
## then, the workflow runs only via manual dispatch (Actions tab → Run workflow).
#push:
# branches: ["main"]
# paths:
# - 'CITATION.cff'
# - '.github/workflows/cff-validator.yml'
#pull_request:
# branches: ["main"]
# paths:
# - 'CITATION.cff'
# - '.github/workflows/cff-validator.yml'
workflow_dispatch:

# Cancel in-progress runs for the same ref when a new run is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
Validate-CITATION-cff:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04 # current stable Ubuntu (Aug 2026)
name: Validate CITATION.cff
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
- name: Validate CITATION.cff
uses: dieghernan/cff-validator@v4
uses: dieghernan/cff-validator@v5
179 changes: 127 additions & 52 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,168 @@
name: Test with pytest

on:
## Auto-triggers are disabled by default. Uncomment the
## push/pull_request blocks below to enable CI on branches/PRs. Until then,
## the workflow runs only via manual dispatch (Actions tab → Run workflow).
#push:
# branches:
# - main
# paths:
# - 'src/**'
# - 'tests/**'
# - 'pyproject.toml'
# - '.github/workflows/pytest.yml'
#pull_request:
# branches:
# - main
# paths:
# - 'src/**'
# - 'tests/**'
# - 'pyproject.toml'
# - '.github/workflows/pytest.yml'
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
- dev

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

# Least-privilege default token permissions
permissions:
contents: read
pull-requests: read

# LIBRARY_BASE_REPO: The base repo with the C++ implementation, e.g. "NTIA/itm".
# LIBRARY_RELEASE_TAG: The Git tag identifying the binary release to test. Can be a pre-release.
# LIBRARY_DESTINATION_DIRECTORY: Path in this repo where shared library files should be placed.
env:
LIBRARY_BASE_REPO: NTIA/LFMF
LIBRARY_RELEASE_TAG: v1.1
LIBRARY_DESTINATION_DIRECTORY: 'src/ITS/Propagation/LFMF'
LIBRARY_BASE_REPO: NTIA/LFMF
LIBRARY_RELEASE_TAG: v1.1
LIBRARY_DESTINATION_DIRECTORY: 'src/ITS/Propagation/LFMF'

jobs:
should-run:
runs-on: ubuntu-24.04 # current stable Ubuntu (Aug 2026)
outputs:
should_run: ${{ steps.decide.outputs.should_run }}
steps:
- name: Skip duplicate runs for merged PRs
id: decide
uses: actions/github-script@v9
with:
script: |
if (context.eventName !== 'push') {
core.setOutput('should_run', 'true');
return;
}

const { data: pullRequests } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha
});

const hasMainPullRequest = pullRequests.some((pullRequest) => pullRequest.base.ref === 'main');
core.setOutput('should_run', hasMainPullRequest ? 'false' : 'true');

run-all-tests:
if: ${{ needs.should-run.outputs.should_run == 'true' }}
needs: should-run
name: ${{ matrix.platform.os-name }} / Py${{ matrix.py }}
runs-on: ${{ matrix.platform.os-runner }}
strategy:
fail-fast: false
matrix:
# As of Aug 2026, current stable runner images are windows-2025, ubuntu-24.04,
# and macos-15 (arm64) / macos-15-intel.
platform:
- os-name: 'Windows (64-bit)'
os-runner: 'windows-latest'
os-runner: 'windows-2025' # current stable, Aug 2026
arch-id: 'x64'
release-file-pattern: '*-x64.dll'
- os-name: 'Windows (32-bit)'
os-runner: 'windows-latest'
os-runner: 'windows-2025' # current stable, Aug 2026
arch-id: 'x86'
release-file-pattern: '*-x86.dll'
- os-name: 'macOS (intel/x64)'
os-runner: 'macos-13'
os-runner: 'macos-15-intel' # Explicit Intel runner required for x64 Python setup
arch-id: 'x64'
release-file-pattern: '*.dylib'
- os-name: 'macOS (apple/arm64)'
os-runner: 'macos-latest'
os-runner: 'macos-15' # Apple silicon (arm64), current stable (Aug 2026)
arch-id: 'arm64'
release-file-pattern: '*.dylib'
- os-name: 'Linux (Ubuntu)'
os-runner: 'ubuntu-latest'
os-runner: 'ubuntu-24.04' # current stable, Aug 2026
arch-id: 'x64'
release-file-pattern: '*.so'
py: # Python versions to test on all platforms
# Non-Linux runners test only the supported bounds (oldest + newest Python)
# to save runner minutes; Linux covers the full supported range. The bounds
# match pyproject `requires-python = ">=3.9"` (newest = 3.14).
py:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.14"
include:
# Full Python-version coverage on Linux only.
- platform:
os-name: 'Linux (Ubuntu)'
os-runner: 'ubuntu-24.04'
arch-id: 'x64'
release-file-pattern: '*.so'
py: "3.10"
- platform:
os-name: 'Linux (Ubuntu)'
os-runner: 'ubuntu-24.04'
arch-id: 'x64'
release-file-pattern: '*.so'
py: "3.11"
- platform:
os-name: 'Linux (Ubuntu)'
os-runner: 'ubuntu-24.04'
arch-id: 'x64'
release-file-pattern: '*.so'
py: "3.12"
- platform:
os-name: 'Linux (Ubuntu)'
os-runner: 'ubuntu-24.04'
arch-id: 'x64'
release-file-pattern: '*.so'
py: "3.13"
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- name: Check out repository
uses: actions/checkout@v7
with:
submodules: true

# Cache key is unique to the combination of runner OS + architecture (matrix.arch-id) + release tag
- name: Restore ${{ env.LIBRARY_RELEASE_TAG }} binaries from cache if available
id: cache-restore
uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ matrix.platform.arch-id }}-${{ env.LIBRARY_RELEASE_TAG }}
path: ${{ env.LIBRARY_DESTINATION_DIRECTORY}}/${{ matrix.platform.release-file-pattern }}
# Cache key is unique to the combination of runner OS + architecture (matrix.arch-id) + release tag
- name: Restore ${{ env.LIBRARY_RELEASE_TAG }} binaries from cache if available
id: cache-restore
uses: actions/cache@v6
with:
key: ${{ runner.os }}-${{ matrix.platform.arch-id }}-${{ env.LIBRARY_RELEASE_TAG }}
path: ${{ env.LIBRARY_DESTINATION_DIRECTORY}}/${{ matrix.platform.release-file-pattern }}

# Only the binaries required for the current platform are downloaded. Note that the distributed
# wheel for proplib python packages includes all binaries, so that the wheel is inherently cross-platform.
- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} binaries
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
uses: robinraju/release-downloader@v1
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
fileName: ${{ matrix.platform.release-file-pattern }}
tarBall: false
zipBall: false
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}
# Only the binaries required for the current platform are downloaded. Note that the distributed
# wheel for proplib python packages includes all binaries, so that the wheel is inherently cross-platform.
- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} binaries
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
uses: robinraju/release-downloader@v1.13
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
fileName: ${{ matrix.platform.release-file-pattern }}
tarBall: false
zipBall: false
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v5
with:
architecture: ${{ matrix.platform.arch-id }}
python-version: ${{ matrix.py }}
cache: 'pip'
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v6
with:
architecture: ${{ matrix.platform.arch-id }}
python-version: ${{ matrix.py }}
cache: 'pip'

- name: Install dependencies for testing
run: python -m pip install -e .[tests]
- name: Install dependencies for testing
run: python -m pip install -e .[tests]

- name: Run pytest
run: pytest --cov-report=term-missing --no-cov-on-fail --cov
- name: Run pytest
run: pytest --cov-report=term-missing --no-cov-on-fail --cov
47 changes: 27 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
# Action builds a universal (Win32/Win64/macOS-universal/Linux-x64) Python wheel
# from the source code, using Hatchling, and uploads it as an artifact. An sdist (.tar.gz) is
# also uploaded, which includes all platform shared library files. These artifacts should be
# used when creating new releases on PyPI and GitHub. The action is triggered by pushes into `main`
# or pull_requests into `main` or `dev` (for testing). To aid in releases, the workflow is
# also triggered when new SemVer tags are created.
# used when creating new releases on PyPI and GitHub. The action is triggered when a new SemVer
# tag (v*) is pushed, and can also be run manually via workflow_dispatch.
name: Build Release Artifacts

on:
workflow_dispatch:
## This release build is triggered when a SemVer tag (v*) is pushed, and can
## also be run manually via workflow_dispatch. Branch/PR auto-triggers are
## intentionally not used here.
push:
branches:
- main
tags:
- 'v[0-9]+.*'
pull_request:
branches:
- main
- dev
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

# Least-privilege default token permissions
permissions:
contents: read

# LIBRARY_BASE_REPO: The base repo with the C++ implementation, e.g. "NTIA/itm".
# LIBRARY_RELEASE_TAG: The Git tag identifying the binary release to test. Can be a pre-release.
# LIBRARY_DESTINATION_DIRECTORY: Path in this repo where shared library files should be placed.
env:
LIBRARY_BASE_REPO: NTIA/LFMF
LIBRARY_RELEASE_TAG: v1.1
LIBRARY_DESTINATION_DIRECTORY: 'src/ITS/Propagation/LFMF/'
LIBRARY_BASE_REPO: NTIA/LFMF
LIBRARY_RELEASE_TAG: v1.1
LIBRARY_DESTINATION_DIRECTORY: 'src/ITS/Propagation/LFMF'

jobs:
build_wheel:
name: Build a universal, cross-platform wheel
runs-on: ubuntu-latest
runs-on: ubuntu-24.04 # current stable Ubuntu (Aug 2026)
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: true

# Only the binaries required for the current platform are downloaded. Note that the distributed
# wheel for proplib python packages includes all binaries, so that the wheel is inherently cross-platform.
- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} Windows binaries
uses: robinraju/release-downloader@v1
uses: robinraju/release-downloader@v1.13
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
Expand All @@ -46,7 +53,7 @@ jobs:
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} Linux binaries
uses: robinraju/release-downloader@v1
uses: robinraju/release-downloader@v1.13
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
Expand All @@ -56,7 +63,7 @@ jobs:
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} macOS binaries
uses: robinraju/release-downloader@v1
uses: robinraju/release-downloader@v1.13
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
Expand All @@ -66,7 +73,7 @@ jobs:
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.13'

Expand All @@ -76,7 +83,7 @@ jobs:
- name: Build wheels
run: hatchling build

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: Release Artifacts (sdist and wheel)
path: dist/*
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"orcid": "0000-0001-8437-6504"
}
],
"description": "This code repository contains a Python wrapper for the NTIA/ITS implementation of the Low Frequency / Medium Frequency (LF/MF) Propagation Model.",
"description": "This code repository contains a Python wrapper for the NTIA/ITS implementation of the Low Frequency / Medium Frequency (LF/MF) Propagation Model. This Python package wraps the NTIA/ITS C++ implementation.",
"keywords": [
"propagation",
"communications",
Expand Down
Loading