Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
88f3675
add template public release approval form
aromanielloNTIA Nov 14, 2024
a13ae56
Update README
aromanielloNTIA Nov 20, 2024
f704e6e
Add template public release form
aromanielloNTIA Nov 20, 2024
9fda6d4
Create GitHubRepoPublicReleaseApproval.md
aromanielloNTIA Nov 20, 2024
830cf7d
Update citation metadata and remove zenodo file
aromanielloNTIA Nov 20, 2024
a2f0c26
Update README in preparation of publication
aromanielloNTIA Nov 20, 2024
f465741
Remove zenodo file
aromanielloNTIA Nov 20, 2024
4fd2231
Add template citation file
aromanielloNTIA Nov 20, 2024
cf69743
Remove DOI badge, replace github release with PyPI badge, add disclaimer
aromanielloNTIA Nov 20, 2024
626afb6
Merge remote-tracking branch 'proplib-template/main' into AddPublicRe…
aromanielloNTIA Nov 20, 2024
47f6ca7
Fix capitalization
aromanielloNTIA Nov 20, 2024
b56f6eb
Merge remote-tracking branch 'proplib-template/main' into AddPublicRe…
aromanielloNTIA Nov 20, 2024
46aee01
Create cff-validator.yml
aromanielloNTIA Nov 21, 2024
801988a
Merge remote-tracking branch 'proplib-template/main' into AddPublicRe…
aromanielloNTIA Nov 21, 2024
e452154
Remove name-particle from template citation file
aromanielloNTIA Nov 21, 2024
9ab2e06
Fix name in citation file
aromanielloNTIA Nov 21, 2024
20dd7f5
Merge remote-tracking branch 'proplib-template/main' into AddPublicRe…
aromanielloNTIA Nov 21, 2024
72f7712
Make template valid
aromanielloNTIA Nov 21, 2024
5220a68
Merge remote-tracking branch 'proplib-template/main' into AddPublicRe…
aromanielloNTIA Nov 21, 2024
af0d8b5
Fix file filter in CFF validator
aromanielloNTIA Nov 21, 2024
5daf8b4
Merge remote-tracking branch 'template/main' into AddPublicReleaseForm
aromanielloNTIA Nov 21, 2024
e5a222b
Delete GitHubRepoPublicReleaseApproval.md
aromanielloNTIA Nov 21, 2024
56e3da2
Remove "U.S. Reference Implementation"
aromanielloNTIA Nov 22, 2024
6e5b86e
Test fixing path filters
aromanielloNTIA Nov 22, 2024
dabc99c
Add link to template test data repo
aromanielloNTIA Nov 22, 2024
d3e9192
Fix incorrect field
aromanielloNTIA Nov 26, 2024
670d3b1
Update approval form for test data requirements
aromanielloNTIA Dec 2, 2024
ad6bb23
Add zenodo template and README badge
aromanielloNTIA Dec 2, 2024
8e89044
Fix resource_type in template zenodo file
aromanielloNTIA Dec 2, 2024
9dfae6f
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Dec 2, 2024
0c93071
Prepare README for publication
aromanielloNTIA Dec 2, 2024
8cf84f7
Consistent bullet styling
aromanielloNTIA Dec 3, 2024
f470b5d
Update markdownlink pre-commit hook
aromanielloNTIA Dec 3, 2024
21235c7
Migrate tox configuration into pyproject.toml
aromanielloNTIA Dec 3, 2024
201c315
Remove CMakeLists.txt
aromanielloNTIA Dec 3, 2024
f1a67b4
Update test data directory
aromanielloNTIA Dec 3, 2024
6f6f8ac
Update README
aromanielloNTIA Dec 3, 2024
a7b6084
Initialize extern directory for submodule
aromanielloNTIA Dec 3, 2024
d9ac58d
Rename test_utils file
aromanielloNTIA Dec 3, 2024
4c1f403
Partial zenodo metadata
aromanielloNTIA Dec 3, 2024
9b45ef8
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Dec 3, 2024
b258e4c
Update README abstract and trademark symbol placement
aromanielloNTIA Dec 3, 2024
9d59b38
Finish zenodo metadata
aromanielloNTIA Dec 3, 2024
b8251f5
Populate public release approval form details
aromanielloNTIA Dec 3, 2024
7769241
Run pre-commit hooks on all files
aromanielloNTIA Dec 3, 2024
57b56d4
Update test data expected location
aromanielloNTIA Dec 3, 2024
6f7c9f8
Move expected test data directory to tests/data
aromanielloNTIA Dec 3, 2024
79ca389
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Dec 3, 2024
8de1928
Fix CITATION.cff validator for Ubuntu 24.04 runner
aromanielloNTIA Dec 12, 2024
c948c24
Update pyupgrade pre-commit hook
aromanielloNTIA Dec 18, 2024
8fc0df2
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Dec 18, 2024
4877693
Remove keyword resulting in misleading zenodo content
aromanielloNTIA Dec 18, 2024
51593f6
Add PropLib Wiki link to metadata
aromanielloNTIA Dec 18, 2024
60b4488
Add license and disclaimer information
aromanielloNTIA Dec 18, 2024
1b417af
Deduplicate workflow runs
aromanielloNTIA Dec 18, 2024
dda2ecf
Add Wiki link to metadata
aromanielloNTIA Dec 18, 2024
30d30e9
Fix badge order
aromanielloNTIA Dec 18, 2024
60f817c
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Dec 18, 2024
ada6489
Finalize multiplatform library file name extensions
aromanielloNTIA Jan 17, 2025
896738a
Initial testing of CI testing workflow
aromanielloNTIA Jan 17, 2025
010309a
Fix environment variable syntax
aromanielloNTIA Jan 17, 2025
a68f8d2
fix environment variable in debug step
aromanielloNTIA Jan 17, 2025
49b42b1
Test configure matrix with environment variable
aromanielloNTIA Jan 17, 2025
99a296c
Modify test matrix
aromanielloNTIA Jan 17, 2025
50beacd
Modify testing matrix
aromanielloNTIA Jan 17, 2025
7922681
Test workflow matrix exclusion
aromanielloNTIA Jan 17, 2025
fbda497
Remove 32-bit testing
aromanielloNTIA Jan 17, 2025
52d7a48
Use matrix with list of objects to specify platforms
aromanielloNTIA Jan 17, 2025
61f39db
make tests fail for checking CI
aromanielloNTIA Jan 17, 2025
47494eb
Simplify tests with pytest for CI
aromanielloNTIA Jan 17, 2025
d76f6be
Remove tox for CI testing
aromanielloNTIA Jan 17, 2025
c739bb0
Remove debug test designed to always fail
aromanielloNTIA Jan 17, 2025
6e5fbb3
Remove path filters
aromanielloNTIA Jan 17, 2025
6dfd6d5
Remove dead code
aromanielloNTIA Jan 17, 2025
2cb8b31
Try single download step
aromanielloNTIA Jan 17, 2025
728d270
Remove a step by using editable pip install
aromanielloNTIA Jan 17, 2025
0b175f2
Revert to previous download strategy
aromanielloNTIA Jan 17, 2025
306b573
Add matrix config to test 32-bit windows
aromanielloNTIA Jan 17, 2025
6654b4a
Add DLL loading logic for 32-bit windows
aromanielloNTIA Jan 17, 2025
61ed0ae
Add docstring about new possible error
aromanielloNTIA Jan 17, 2025
f264487
Add testing workflows for intel-based mac platforms
aromanielloNTIA Jan 17, 2025
8cfc2e9
Add pytest GitHub Actions workflow
aromanielloNTIA Jan 17, 2025
a9cb4fe
Support 32-bit windows
aromanielloNTIA Jan 17, 2025
84e80d6
Remove __all__ in package root, add check for test data
aromanielloNTIA Jan 17, 2025
6784a57
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Jan 17, 2025
047a85e
Remove template comment
aromanielloNTIA Jan 17, 2025
0fc2662
Testing buildwheel action
aromanielloNTIA Jan 17, 2025
8b5fbf0
Add tests for wheel being built
aromanielloNTIA Jan 22, 2025
6cb1779
debug download artifact filepath
aromanielloNTIA Jan 22, 2025
7742354
Adjust file paths for multi-platform
aromanielloNTIA Jan 22, 2025
2bbf467
Update cff-validator to v4
aromanielloNTIA Jan 22, 2025
9c5d2ca
Remove testing code
aromanielloNTIA Jan 22, 2025
78facd1
Update cff-validator to v4
aromanielloNTIA Jan 22, 2025
ece190a
Add buildwheels template workflow
aromanielloNTIA Jan 22, 2025
1414e6c
Add runtimeerror documentation
aromanielloNTIA Jan 22, 2025
9f0d085
Merge remote-tracking branch 'template/main' into pre-publish-revisions
aromanielloNTIA Jan 22, 2025
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
82 changes: 82 additions & 0 deletions .github/workflows/buildwheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Action builds a universal (Win32/Win64/macOS-universal/Linux-x64) Python wheel
# from the source code, using Hatchling, and uploads it as an artifact. This wheel
# can then be distributed with new releases. 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. This action handles downloading all
# shared library files and including them in the resulting wheel.
name: Build Wheels

on:
workflow_dispatch:
push:
branches:
- main
tags:
- 'v[0-9]+.*'
pull_request:
branches:
- main
- dev

env:
LIBRARY_BASE_REPO: NTIA/p2108
LIBRARY_RELEASE_TAG: v1.0-rc.1
LIBRARY_DESTINATION_DIRECTORY: 'src/ITS/ITU/PSeries/P2108/'

jobs:
build_wheel:
name: Build a universal, cross-platform wheel
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
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
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
fileName: '*.dll'
tarBall: false
zipBall: false
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} Linux binaries
uses: robinraju/release-downloader@v1
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
fileName: '*.so'
tarBall: false
zipBall: false
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Download required ${{ env.LIBRARY_RELEASE_TAG }} macOS binaries
uses: robinraju/release-downloader@v1
with:
repository: ${{ env.LIBRARY_BASE_REPO }}
tag: ${{ env.LIBRARY_RELEASE_TAG }}
fileName: '*.dylib'
tarBall: false
zipBall: false
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

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

- name: Install build dependencies
run: pip install hatchling

- name: Build wheels
run: hatchling build

- uses: actions/upload-artifact@v4
with:
name: Universal Wheel (.whl)
path: dist/*.whl
27 changes: 27 additions & 0 deletions .github/workflows/cff-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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'
workflow_dispatch:

jobs:
Validate-CITATION-cff:
runs-on: ubuntu-latest
name: Validate CITATION.cff
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

on:
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

env:
LIBRARY_BASE_REPO: NTIA/p2108
LIBRARY_RELEASE_TAG: v1.0-rc.1
LIBRARY_DESTINATION_DIRECTORY: 'src/ITS/ITU/PSeries/P2108/'

jobs:
run-all-tests:
name: ${{ matrix.platform.os-name }} / Py${{ matrix.py }}
runs-on: ${{ matrix.platform.os-runner }}
strategy:
fail-fast: false
matrix:
platform:
- os-name: 'Windows (64-bit)'
os-runner: 'windows-latest'
arch-id: 'x64'
release-file-pattern: '*-x64.dll'
- os-name: 'Windows (32-bit)'
os-runner: 'windows-latest'
arch-id: 'x86'
release-file-pattern: '*-x86.dll'
- os-name: 'macOS (intel/x64)'
os-runner: 'macos-13'
arch-id: 'x64'
release-file-pattern: '*.dylib'
- os-name: 'macOS (apple/arm64)'
os-runner: 'macos-latest'
arch-id: 'arm64'
release-file-pattern: '*.dylib'
- os-name: 'Linux (Ubuntu)'
os-runner: 'ubuntu-latest'
arch-id: 'x64'
release-file-pattern: '*.so'
py: # Python versions to test on all platforms
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: Check out repository
uses: actions/checkout@v4
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 }}

# 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 }}

- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v5
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: Run pytest
run: pytest --cov-report=term-missing --no-cov-on-fail --cov
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tests/data"]
path = tests/data
url = https://github.com/NTIA/p2108-test-data
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py39-plus"]
Expand All @@ -33,7 +33,7 @@ repos:
- id: black
types: [file, python]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.43.0
hooks:
- id: markdownlint
types: [file, markdown]
Expand Down
40 changes: 30 additions & 10 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
{
"upload_type": "software",
"publication_date": "2024-12-11",
"title": "Recommendation ITU-R P.2108, Python Wrapper",
"creators": [
{
"orcid": "TODO-TEMPLATE",
"name": "Romaniello, Anthony W.",
"affiliation": "U.S. Department of Commerce, National Telecommunications and Information Administration, Institute for Telecommunication Sciences",
"name": "TODO-TEMPLATE"
"orcid": "0000-0001-8437-6504"
}
],
"license": "NTIA Public Domain",
"title": "TODO-TEMPLATE, Python Wrapper",
"upload_type": "software",
"version": "TODO-TEMPLATE",
"keywords": ["TODO-TEMPLATE"],
"communities": [
{"identifier": "its-proplib"}
]
"description": "This repository contains a Python wrapper for the NTIA/ITS implementation of Recommendation ITU-R P.2108. This Recommendation contains three methods for the prediction of clutter loss: Height Gain Terminal Correction Model, Terrestrial Statistical Model, and Aeronautical Statistical Model. The software implements Section 3 of Annex 1 of the Recommendation. This Python package wraps the NTIA/ITS C++ implementation.",
"keywords": [
"clutter",
"ITU",
"ITU-R",
"propagation"
],
"related_identifiers": [
{
"identifier": "https://github.com/NTIA/p2108",
"relation": "isSupplementTo",
"resource_type": "software"
},
{
"identifier": "https://github.com/NTIA/p2108-test-data",
"relation": "isSupplementedBy",
"resource_type": "dataset"
},
{
"identifier": "https://ntia.github.io/propagation-library-wiki/models/P2108/",
"relation": "isDocumentedBy",
"resource_type": "softwaredocumentation"
}
],
"version": "1.0.0"
}
28 changes: 5 additions & 23 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
cff-version: 1.2.0
title: >-
Recommendation ITU-R P.2108-1, U.S. Reference Python
Implementation
Recommendation ITU-R P.2108, Python Wrapper
message: Please cite this software using these metadata.
type: software
authors:
- given-names: William
family-names: Kozma
name-suffix: Jr
email: wkozma@ntia.gov
affiliation: >-
U.S. Department of Commerce, National
Telecommunications and Information Administration,
Institute for Telecommunication Sciences
orcid: 'https://orcid.org/0000-0002-7417-4009'
- given-names: Anthony
- given-names: Anthony W.
family-names: Romaniello
name-particle: W.
email: aromaniello@ntia.gov
affiliation: >-
U.S. Department of Commerce, National
Expand All @@ -26,27 +15,20 @@ authors:
- name: >-
U.S. Department of Commerce, National
Telecommunications and Information Administration,
Institute for Telecommunications Sciences
Institute for Telecommunication Sciences
address: 325 Broadway
city: Boulder
country: US
post-code: '80305'
region: Colorado
alias: NTIA/ITS
email: code@ntia.gov
website: 'https://its.ntia.gov'
alias: NTIA/ITS
identifiers:
- type: doi
value: 10.5281/zenodo.7114523
description: TODO PLACEHOLDER how was doi generated, doi given is wrong.
repository-code: 'https://github.com/NTIA/p2108-python'
url: 'https://github.com/NTIA/propagation/wiki'
repository: 'https://github.com/NTIA/p2108'
url: 'https://ntia.github.io/propagation-library-wiki/models/P2108/'
keywords:
- propagation
- rf
- clutter
- itu
license: 'NTIA Public Domain'
version: 1.0.0
date-released: '2024-05-24'
32 changes: 32 additions & 0 deletions GitHubRepoPublicReleaseApproval.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# GitHub Repository Public Release Approval

**Project Name:** NTIA/OSM Research and Development

**Software Name:** Recommendation ITU-R P.2108, Python Wrapper

The project identified above, which is contained within the repository this
document is stored in, has met the following criteria for public release:

1. [ ] The project, including the test criteria, meets the requirements defined
in the ITS Software Development Publication Policy for making a repository public.
The major pre-established criteria for publication are listed below, and the check
mark next to each attests that the criterion has been met.
* [ ] Unit tests are available and the software has been tested against the unit tests.
* [ ] The software can be compiled and/or used on Windows, macOS, and Linux.
* [ ] The repository structure and contents follow from the ITS PropLib template, and
all template or placeholder code has been removed.
* [ ] The repository includes the appropriate `LICENSE.md` file
2. [ ] Any test data necessary for the code and its unit tests to function is included in this
GitHub repository, either directly or as a linked Git submodule.
3. [ ] The README.md file has passed editorial review from the ITS Publications Office.
4. [ ] The project complies with the ITS Code Style Guide or an appropriate style
guide as agreed to by the sponsor, project lead, or Supervising Division Chief.
5. [ ] Approved disclaimer and licensing language has been included.

In order to complete this approval, please create a new branch, upload and commit
your version of this Markdown document to that branch, then create a pull request
for that branch. The following must login to GitHub and approve that pull request
before the pull request can be merged and this repo made public:

* Project Lead: Brian Lain
* Supervising Division Chief or Release Authority: Chris Anderson
Loading
Loading