Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 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
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
2 changes: 1 addition & 1 deletion .github/workflows/cff-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Validate CITATION.cff
uses: dieghernan/cff-validator@v4
16 changes: 11 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
arch-id: 'x86'
release-file-pattern: '*-x86.dll'
- os-name: 'macOS (intel/x64)'
os-runner: 'macos-13'
os-runner: 'macos-15'
arch-id: 'x64'
release-file-pattern: '*.dylib'
- os-name: 'macOS (apple/arm64)'
Expand All @@ -48,20 +48,26 @@ jobs:
arch-id: 'x64'
release-file-pattern: '*.so'
py: # Python versions to test on all platforms
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
exclude:
# Exclude python 3.10 on macos-15
- platform:
os-runner: 'macos-15'
py: '3.10'
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v6
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
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 }}
Expand All @@ -80,7 +86,7 @@ jobs:
out-file-path: ${{ env.LIBRARY_DESTINATION_DIRECTORY }}

- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
architecture: ${{ matrix.platform.arch-id }}
python-version: ${{ matrix.py }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true

Expand Down Expand Up @@ -76,7 +76,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
8 changes: 4 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ authors:
- family-names: Heroy
given-names: Chen
affiliation: >-
U.S. Department of Commerce, National
Telecommunications and Information Administration,
U.S. Department of Commerce,
National Telecommunications and Information Administration,
Institute for Telecommunication Sciences
orcid: 'https://orcid.org/0009-0006-8728-4502'
email: cheroy.ctr@ntia.gov
Expand All @@ -21,8 +21,8 @@ authors:
orcid: 'https://orcid.org/0000-0001-8437-6504'
email: aromaniello@ntia.gov
- name: >-
U.S. Department of Commerce, National
Telecommunications and Information Administration,
U.S. Department of Commerce,
National Telecommunications and Information Administration,
Institute for Telecommunication Sciences
address: 325 Broadway
city: Boulder
Expand Down
101 changes: 59 additions & 42 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,16 @@ When complete, features branches should merge into `dev`.

### Git Submodules

Software in the ITS Propagation Library is implemented primarily in C++. Each piece
of software has a primary repository which contains the base C++ implementation,
test data and resources, and common files used by the multi-language wrappers.
Interfaces for additional programming languages are provided in separate repositories,
which are linked to the primary repository as [Git submodules](https://gist.github.com/gitaarik/8735255).
When cloning the primary repository, the submodules are not additionally cloned
by default. This can be done with the `git submodule init` command. Initializing
the submodule as part of the parent repository will let you use the build
configuration from the primary repository to compile the C++ source and place it
appropriately for use by the wrapper code. If you choose to independently clone
the wrapper repository, you will likely need to separately download the compiled
library (for example, a DLL from a GitHub release).
PropLib C++ repositories make use of Git submodules to reference certain development
dependencies, e.g. GoogleTest. Depending on the CMake preset or options used, submodules
may be required to successfully build and/or test the software. When cloning a repository,
submodules are not additionally cloned by default. Use the following commands to initialize
and clone any submodules in a repository:

```cmd
git submodule init
git submodule update
```

### Contributing on GitHub

Expand Down Expand Up @@ -130,35 +128,27 @@ repository. For details about wrapper repositories, refer to their own README fi

```bash
app/ # The command-line driver which can run the library
data/ # Example input and output files for use with the driver
include/ # Headers used by the command-line driver
src/ # Source code for the command-line driver
tests/ # Header and source files for testing the command-line driver
CMakeLists.txt # Configuration for the command-line driver and its tests
README.md # Usage information for the command-line driver
docs/
CMakeLists.txt # Doxygen configuration
... # Static files (images, HTML, CS, Markdown) used by Doxygen
extern/
... # External Git submodules/dependencies
test-data/ # Git submodule containing test data files shared with wrappers
... # Other external Git submodules/dependencies
include/
<PackageNamespace>/ # Include namespace folder, e.g. "ITS.Propagation.ITM"
<HeaderFiles>.h # Library header files go here, e.g. "ITM.h" and "ErrorCodes.h"
<HeaderFile>.h # Library interface header file goes here, e.g. "ITM.h"
src/
<SourceFiles>.cpp # Source files go here, e.g. "LongleyRice.cpp" and "FreeSpaceLoss.cpp"
CMakeLists.txt # Configures cross-platform build
tests/
data/
<TestDataFiles>.csv # Testing data goes here. Does not have to be CSV.
<TestFiles>.cpp # Unit tests, usually one test file per source file.
<TestFiles>.h # Any headers used by tests go here as well.
CMakeLists.txt # CTest+GTest config. Files containing tests must be included here.
wrap/
dotnet/ # C#/.NET wrapper submodule. Should contain CMakeLists.txt
matlab/ # MATLAB wrapper submodule. Should contain CMakeLists.txt
python/ # Python wrapper submodule. Should contain CMakeLists.txt
CMakeLists.txt # Top-level CMakeLists.txt: project metadata and options
CMakePresets.json # Presets for CMake, e.g. "release", "debug", etc.
CMakePresets.json # Presets for CMake, e.g. "release64", "debug32", etc.
...
```

Expand All @@ -179,7 +169,6 @@ The following CMake options are used for top-level project configuration:
| `RUN_DRIVER_TESTS` | `ON` | Test the command-line driver executable |
| `DOCS_ONLY` | `OFF` | Skip all steps _except_ generating the documentation site |
| `RUN_TESTS` | `ON` | Run unit tests for the main library |
| `COPY_TO_WRAPPERS` | `ON` | Copy the compiled shared library into wrapper submodules |

[CMake Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) are
provided to support common build configurations. These are specified in the
Expand All @@ -202,21 +191,21 @@ generating the Doxygen documentation site.
Below are some examples of how CMake can be called to compile this software.

```bash
# Configure and compile in release configuration
cmake --preset release
cmake --build --preset release
# Configure and compile in 64-bit release configuration
cmake --preset release64
cmake --build --preset release64

# Use the release configuration but don't build Doxygen docs
cmake --preset release -DBUILD_DOCS=OFF
cmake --build --preset release
# Use the 64-bit release configuration but don't build Doxygen docs
cmake --preset release64 -DBUILD_DOCS=OFF
cmake --build --preset release64

# Configure and compile in debug configuration
cmake --preset debug
cmake --build --preset debug
# Configure and compile in 32-bit debug configuration
cmake --preset debug32
cmake --build --preset debug32

# Use the release configuration but don't run driver tests
cmake --preset release -DRUN_DRIVER_TESTS=OFF
cmake --build --preset release
# Use the 64-bit release configuration but don't run driver tests
cmake --preset release64 -DRUN_DRIVER_TESTS=OFF
cmake --build --preset release64
```

### Supported Platforms and Build Options
Expand All @@ -243,7 +232,7 @@ example showing the expected documentation formats. Except for inline documentat
use the JavaDoc banner style [described by Doxygen](https://www.doxygen.nl/manual/docblocks.html)

```cpp
constexpr double = PI 3.1415; /**< Inline format, e.g. for constants */
constexpr double = PI 3.1415; ///< Inline format, e.g. for constants

/*******************************************************************************
* This is a brief description of the function.
Expand Down Expand Up @@ -273,8 +262,36 @@ the Doxygen site to GitHub Pages.

### MATLAB Wrappers

Most code in the MATLAB wrapper is actually written in C. In these files, the same
documentation style as noted above for C++ should be used.
MATLAB&reg; wrappers are implemented as toolboxes which interface with the shared library
compiled from C++ source code. The project structure is informed by the best practices
provided by MathWorks&reg; in their [`toolboxdesign` repository](https://github.com/mathworks/toolboxdesign).
Here is an example of how a function may be documented in a MATLAB wrapper. Note the
documentation with code, where input and output arguments are provided for autocompletion.

```matlab
function y = DoubleTheInput(x)
% DoubleTheInput - produces an output which is twice its input.
%
% Syntax:
% y = DoubleTheInput(x)
%
% Input Arguments:
% x (double) - A number which needs doubling
%
% Output Arguments:
% y (double) - The result, 2*x
%
% Description:
% Functions more complex than this one may warrant an additional,
% longer description.
arguments (Input)
x double
end
arguments (Output)
y double
end
...
```

### Python Wrappers

Expand Down Expand Up @@ -302,9 +319,9 @@ def double_the_input(x: float) -> float:
return 2 * x
```

### C#/.NET Wrappers
### .NET Wrappers

In C#/.NET, documentation comments are written in
PropLib .NET wrappers are written in C# and documentation comments are written in
[XML format](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/documentation-comments)
and are used to generate documentation through tools like Visual Studio. Use `<summary>` tags to
provide brief descriptions of classes, constants, functions, etc. Functions should
Expand Down
10 changes: 5 additions & 5 deletions GitHubRepoPublicReleaseApproval.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# GitHub Repository Public Release Approval

**Project Name:** NTIA/OSM Research and Development
**Project Name:** NTIA/OSM Research and Development - Propagation Library

**Software Name:** Low Frequency / Medium Frequency (LF/MF) Propagation Model, Python Wrapper
**Software Name:** Low Frequency / Medium Frequency (LF/MF) Propagation Model, Python&reg; Wrapper

The project identified above, which is contained within the repository this
document is stored in, has met the following criteria for public release:
Expand All @@ -18,14 +18,14 @@ mark next to each attests that the criterion has been met.
* [x] The repository includes the appropriate `LICENSE.md` file
2. [x] 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. [x] The README.md file has passed editorial review from the ITS Publications Office.
3. [x] The README.md file has passed editorial review by the ITS Publications Office.
4. [x] 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. [x] 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
your version of this Markdown document to that branch, and then create a pull request
for that branch. The following must log in to GitHub and approve that pull request
before the pull request can be merged and this repo made public:

* Project Lead: William Kozma, Jr.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Low Frequency / Medium Frequency (LF/MF) Propagation Model, Python® Wrapper #
# Low Frequency / Medium Frequency (LF/MF) Propagation Model, Python&reg; Wrapper #

[![NTIA/ITS PropLib][proplib-badge]][proplib-link]
[![PyPI Release][pypi-release-badge]][pypi-release-link]
Expand Down Expand Up @@ -78,6 +78,8 @@ library from C++ source code; see relevant build instructions
[GitHub Release](https://github.com/NTIA/LFMF/releases). Then place the
downloaded file in `src/ITS/Propagation/LFMF/` (alongside `__init__.py`).

1. Make sure pip, hatchling and pytest are installed in your current environment.

1. Install the local package and development dependencies into your current environment:

```cmd
Expand Down
Loading
Loading