Skip to content

Commit a2c6cb6

Browse files
authored
Merge pull request #455 from dbekaert/dev
Release v0.3.1 -- python version and entry point fixes
2 parents 3bdd39b + 87f6c7d commit a2c6cb6

File tree

6 files changed

+55
-8
lines changed

6 files changed

+55
-8
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy Docs to Github.io
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build_and_deploy:
10+
name: Build site and deploy
11+
runs-on: "ubuntu-latest"
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- uses: conda-incubator/setup-miniconda@v2
18+
with:
19+
mamba-version: "*"
20+
python-version: '3.10'
21+
activate-environment: RAiDER
22+
environment-file: environment.yml
23+
24+
- name: install RAiDER
25+
shell: bash -l {0}
26+
run: |
27+
python -m pip install --no-deps .
28+
29+
- name: Deploy website
30+
shell: bash -l {0}
31+
run: |
32+
mkdocs gh-deploy --force

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.3.1]
10+
Fixes some missing imports and typing statements
11+
912
## [0.3.0]
1013
RAiDER package was refactored to expose the main functionality as a Python library, including the `prepareWeatherModel`
1114
and `tropo_delay` functions, as well as anciliarry functions needed for defining AOIs, look vectors, etc.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ nav:
88
- Tutorials:
99
- Overview: tutorials.md
1010
- RAiDER tutorial: https://nbviewer.org/github/dbekaert/RAiDER-docs/blob/main/notebooks/RAiDER_tutorial/RAiDER_tutorial.ipynb" target="_blank
11+
- RAiDER Python tutorial: https://nbviewer.org/github/dbekaert/RAiDER-docs/blob/main/notebooks/RAiDER_tutorial/RAiDER_Python_access.ipynb" target="_blank
1112
- raiderStats tutorial: https://nbviewer.org/github/dbekaert/RAiDER-docs/blob/main/notebooks/raiderStats/raiderStats_tutorial.ipynb" target="_blank
1213
- Downloading GNSS tropospheric delays: https://nbviewer.org/github/dbekaert/RAiDER-docs/blob/main/notebooks/raiderDownloadGNSS/raiderDownloadGNSS_tutorial.ipynb" target="_blank
1314
- GNSS delay manipulation with Pandas: https://nbviewer.org/github/dbekaert/RAiDER-docs/blob/main/notebooks/Pandas_tutorial/Pandas_tutorial.ipynb" target="_blank

tools/RAiDER/cli/__main__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import argparse
2-
import os
2+
import sys
33
from importlib.metadata import entry_points
44

55
from RAiDER.cli.raider import calcDelays, downloadGNSS, calcDelaysGUNW
66

7+
78
def main():
89
parser = argparse.ArgumentParser(
910
prefix_chars='+',
@@ -15,11 +16,18 @@ def main():
1516
help='Select the entrypoint to use'
1617
)
1718
args, unknowns = parser.parse_known_args()
18-
os.sys.argv = [args.process, *unknowns]
19+
sys.argv = [args.process, *unknowns]
20+
21+
try:
22+
# python >=3.10 interface
23+
process_entry_point = entry_points(group='console_scripts', name=f'{args.process}.py')[0]
24+
except TypeError:
25+
# python 3.8 and 3.9 interface
26+
scripts = entry_points()['console_scripts']
27+
process_entry_point = [ep for ep in scripts if ep.name == f'{args.process}.py'][0]
1928

20-
process_entry_point = entry_points(group='console_scripts', name=f'{args.process}.py')[0]
2129
process_entry_point.load()()
2230

2331

2432
if __name__ == '__main__':
25-
main()
33+
main()

tools/RAiDER/cli/raider.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
import shutil
44
import sys
55
import yaml
6-
import re, glob
6+
7+
from textwrap import dedent
78

89
import RAiDER
910
from RAiDER.constants import _ZREF, _CUBE_SPACING_IN_M
1011
from RAiDER.logger import logger, logging
1112
from RAiDER.cli import DEFAULT_DICT, AttributeDict
13+
from RAiDER.cli.parser import add_out, add_cpus, add_verbose
1214
from RAiDER.cli.validators import (
13-
enforce_time, enforce_bbox, parse_dates, get_query_region, get_heights, get_los, enforce_wm
15+
enforce_time, enforce_bbox, parse_dates, get_query_region, get_heights, get_los, enforce_wm,
16+
DateListAction, date_type,
1417
)
1518

1619

tools/RAiDER/delay.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import xarray
2020

2121
from pyproj import CRS, Transformer
22-
from typing import List
22+
from typing import List, Union
2323

2424
import isce3.ext.isce3 as isce
2525
import numpy as np
@@ -41,7 +41,7 @@ def tropo_delay(
4141
aoi,
4242
los,
4343
height_levels: List[float]=None,
44-
out_proj: int | str=4326,
44+
out_proj: Union[int, str] =4326,
4545
cube_spacing_m: int=None,
4646
look_dir: str='right',
4747
):

0 commit comments

Comments
 (0)