Skip to content

Commit 6ee7c7b

Browse files
update readme
1 parent b33e45f commit 6ee7c7b

File tree

1 file changed

+40
-47
lines changed

1 file changed

+40
-47
lines changed

README.md

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,49 @@
11
# Recommendation ITU-R P.2108 - U.S. Reference Implementation, Python #
22

3-
[![GitHub issues][github-issue-count-badge]][github-issues]
4-
[![Code style: black][code-style-badge]][code-style-repo]
3+
![GitHub Release][gh-releases-badge]
4+
![GitHub Issues][gh-issues-badge]
55

6-
[code-style-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
7-
[code-style-repo]: https://github.com/psf/black
8-
[github-issue-count-badge]: https://img.shields.io/github/issues/NTIA/p2108-python
9-
[github-issues]: https://github.com/NTIA/p2108-python/issues
6+
[gh-releases-badge]: https://img.shields.io/github/v/release/NTIA/p2108-python
7+
[gh-issues-badge]: https://img.shields.io/github/issues/NTIA/p2108-python
108

119
Python® wrapper for U.S. Reference Software Implementation of Recommendation ITU-R
1210
P.2108. This Recommendation contains three methods for the prediction of clutter
1311
loss: Height Gain Terminal Correction Model, Terrestrial Statistical Model, and
1412
Aeronautical Statistical Model. The software implements Section 3 of Annex 1 of
15-
the Recommendation.
13+
the Recommendation. This Python package wraps the
14+
[base C++ implementation](https://github.com/NTIA/p2108).
1615

17-
## Usage ##
16+
## Getting Started ##
1817

1918
For an overview of the available functions of this model, view the
2019
[NTIA/ITS Propagation Library Wiki](https://ntia.github.io/propagation-library-wiki/models/P2108).
2120
Additionally, Python-specific usage information, installation instructions, and
2221
code examples are available [here](https://ntia.github.io/propagation-library-wiki/models/P2108/python).
2322

23+
If you're a developer and would like to contribute to or extend this repository,
24+
please review the guide for contributors [here](CONTRIBUTING.md) or open an
25+
[issue](https://github.com/NTIA/p2108-python/issues) to start a discussion.
26+
2427
## Development ##
2528

2629
This repository contains code which wraps [the C++ source](https://github.com/NTIA/p2108)
2730
as an importable Python module. If you wish to contribute to this repository,
28-
testing your changes will require the inclusion of the dynamic library binary
29-
built from the C++ source code. You may retrieve this either from the
31+
testing your changes will require the inclusion of this shared library. You may retrieve
32+
this either from the
3033
[relevant GitHub Releases page](https://github.com/NTIA/p2108/releases), or by
31-
compiling it yourself from the source code. If providing the dynamic library file
32-
(`.dll`, `.dylib`, or `.so`) manually from a release, place it in
33-
`src/ITS/ITU/PSeries/P2108/`, alongside `__init__.py`. Otherwise, follow these
34-
instructions to compile the library yourself.
35-
36-
### Building the Library from Source ###
34+
compiling it yourself from the C++ source code (instructions
35+
[here](https://github.com/NTIA/p2108?tab=readme-ov-file#configure-and-build)).
36+
If providing the shared library (`.dll`, `.dylib`, or `.so` file) manually
37+
from a GitHub release, place it in `src/ITS/ITU/PSeries/P2108/`, alongside
38+
`__init__.py`.
3739

38-
The following development workflow assumes that you work within a cloned copy of
39-
the [parent repository](https://github.com/NTIA/p2108). Below are the steps to build
40-
and install the Python package from source, including
40+
Below are the steps to build and install the Python package from source, including
4141
compiling the library from the C++ source code. Working installations of Git and
42-
Python (3.8 or above) are required.
42+
Python (3.9 or above) are required.
4343

4444
1. Clone the parent repository, then initialize the Git submodule containing the
45-
Python wrapper.
45+
Python wrapper. This repository structure makes test data available to the Python
46+
wrapper.
4647

4748
```cmd
4849
# Clone the parent repository:
@@ -51,36 +52,35 @@ Python wrapper.
5152

5253
# Then run one of the following:
5354
git submodule init wrap/python # Only the Python wrapper
54-
git submodule init # All available wrappers
55+
git submodule init # All available wrappers
5556

56-
# Finally, to clone the submodule(s):
57+
# Finally, clone the submodule(s):
5758
git submodule update
5859
```
5960

60-
1. Compile the C++ library for your platform using CMake. Here, we use CMake
61-
options to _only_ build the library, without building documentation or running C++
62-
unit tests. If you are using a 32-bit platform, use the `release32` preset
63-
instead of `release64`.
64-
65-
```cmd
66-
# From the cloned repository:
61+
1. Compile the C++ library for your platform, following instructions
62+
[here](https://github.com/NTIA/p2108?tab=readme-ov-file#configure-and-build).
63+
Following these instructions should automatically copy the shared library
64+
into the location required by the Python wrapper.
6765

68-
cmake --preset release64 -DBUILD_DOCS=OFF -DRUN_TESTS=OFF
69-
cmake --build --preset release64
70-
```
66+
**OR**
7167

72-
When the CMake build command is run, the compiled library will be automatically
73-
be copied into place where needed to build the Python package (alongside `__init__.py`).
68+
Download the shared library (`.dll`, `.so`, or `.dylib`) from a
69+
[GitHub Release](https://github.com/NTIA/p2108/releases). Then place the
70+
downloaded file in `src/ITS/ITU/PSeries/P2108/` (alongside `__init__.py`).
7471

75-
1. Install the local package, and development dependencies:
72+
1. Install the local package and development dependencies:
7673

7774
```cmd
7875
cd wrap/python
7976
pip install .[dev]
8077
```
8178
82-
This will install the Python package itself along with development dependencies
83-
for pre-commit hooks, building distributable packages, and running unit tests.
79+
1. To build the wheel for your platform:
80+
81+
```cmd
82+
hatchling build
83+
```
8484
8585
### Running Tests ###
8686
@@ -91,23 +91,16 @@ the location of the test data files in `tests/test_p2108.py` (using the `TEST_DA
9191
variable). Then, run the tests with pytest:
9292
9393
```cmd
94-
pytest .
94+
pytest
9595
```
9696

9797
Additionally, the [Study Group Clutter Excel Workbook](https://www.itu.int/en/ITU-R/study-groups/rsg3/ionotropospheric/Clutter%20and%20BEL%20workbook_V2.xlsx)
9898
contains an extensive set of example values which are useful as validation cases.
9999

100-
## License ##
101-
102-
See [LICENSE](LICENSE.md).
103-
104-
"Python" and the Python logos are trademarks or registered trademarks of the Python
105-
Software Foundation, used by the National Telecommunications and Information Administration
106-
with permission from the Foundation.
107-
108100
## References ##
109101

110102
* [ITS Propagation Library Wiki](https://ntia.github.io/propagation-library-wiki)
103+
* [P2108 Wiki Page](https://ntia.github.io/propagation-library-wiki/models/P2108)
111104
* [`ITS.ITU.PSeries.P2108` C++ API Reference](https://ntia.github.io/P2108)
112105
* [Recommendation ITU-R P.2108](https://www.itu.int/rec/R-REC-P.2108/en)
113106
* [Report ITU-R P.2402](https://www.itu.int/pub/R-REP-P.2402)

0 commit comments

Comments
 (0)