Skip to content

Commit 080179d

Browse files
authored
Merge pull request #86 from vincelhx/vinc_dev_streaks
major variables add (GradientFeatures)
2 parents 0f25258 + 3639ff6 commit 080179d

19 files changed

+1340
-325
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,79 +15,79 @@ jobs:
1515

1616
steps:
1717
# Checkout the code
18-
- name: Checkout code
19-
uses: actions/checkout@v4
18+
- name: Checkout code
19+
uses: actions/checkout@v4
2020

21-
- uses: mamba-org/setup-micromamba@v1
22-
with:
23-
micromamba-version: "1.5.9-1" # any version from https://github.com/mamba-org/micromamba-releases
24-
channels: tcevaer, conda-forge
25-
init-shell: bash
26-
post-cleanup: "all"
21+
- uses: mamba-org/setup-micromamba@v1
22+
with:
23+
micromamba-version: "1.5.9-1" # any version from https://github.com/mamba-org/micromamba-releases
24+
channels: tcevaer, conda-forge
25+
init-shell: bash
26+
post-cleanup: "all"
2727

28-
- name: Configure Conda channel priority to disabled
29-
run: |
30-
conda config --set channel_priority disabled
28+
- name: Configure Conda channel priority to disabled
29+
run: |
30+
conda config --set channel_priority disabled
3131
32-
- name: Create environment and install tools
33-
run: micromamba create -n grdwind_env pytest conda-build boa python=3.10 -y
32+
- name: Create environment and install tools
33+
run: micromamba create -n grdwind_env pytest conda-build boa python=3.10 -y
3434

35-
- name: Build package
36-
run: |
37-
cd recipe
38-
eval "$(micromamba shell hook --shell bash)"
39-
micromamba activate grdwind_env
40-
conda mambabuild .
35+
- name: Build package
36+
run: |
37+
cd recipe
38+
eval "$(micromamba shell hook --shell bash)"
39+
micromamba activate grdwind_env
40+
conda mambabuild .
4141
42-
# Install the built package into the environment
43-
- name: Install the built package
44-
run: |
45-
eval "$(micromamba shell hook --shell bash)"
46-
micromamba activate grdwind_env
47-
conda install --use-local grdwindinversion -y
42+
# Install the built package into the environment
43+
- name: Install the built package
44+
run: |
45+
eval "$(micromamba shell hook --shell bash)"
46+
micromamba activate grdwind_env
47+
conda install --use-local grdwindinversion -y
4848
49-
# Cache the test data if previously downloaded (up to 10 GB limit for the cache)
50-
# WARNING : modify the key if the data is modified !!
51-
- name: Cache test data
52-
uses: actions/cache@v4
53-
id: cache
54-
with:
55-
path: ./test_data
56-
key: test-data-v3
57-
restore-keys: test-data-v3
49+
# Cache the test data if previously downloaded (up to 10 GB limit for the cache)
50+
# WARNING : modify the key if the data is modified !!
51+
- name: Cache test data
52+
uses: actions/cache@v4
53+
id: cache
54+
with:
55+
path: ./test_data
56+
key: test-data-v3
57+
restore-keys: test-data-v3
5858

59-
# Download test data if not already cached
60-
- name: Download test data
61-
if: steps.cache.outputs.cache-hit != 'true' # Only download if cache miss
62-
run: |
59+
# Download test data if not already cached
60+
- name: Download test data
61+
if: steps.cache.outputs.cache-hit != 'true' # Only download if cache miss
62+
run: |
6363
mkdir -p ./test_data/
6464
wget https://cloud.ifremer.fr/index.php/s/ExLQ2TnYAqozPWE/download -O /tmp/ecmwf.zip
6565
unzip /tmp/ecmwf.zip -d ./test_data/
6666
wget https://cloud.ifremer.fr/index.php/s/kRgdOOPsjoZieZR/download -O /tmp/l1.zip
6767
unzip /tmp/l1.zip -d ./test_data/
68-
timeout-minutes: 200 # Adjust depending on the size of your data
68+
timeout-minutes: 200 # Adjust depending on the size of your data
6969

70-
# Set up xsar configuration
71-
- name: Setup xsar configuration
72-
run: |
70+
# Set up xsar configuration
71+
- name: Setup xsar configuration
72+
run: |
7373
mkdir -p ~/.xsar
7474
echo "data_dir: /tmp" > ~/.xsar/config.yaml
7575
echo "auxiliary_dir: ./test_data/auxiliary" >> ~/.xsar/config.yaml
7676
echo "path_dataframe_aux: ./test_data/auxiliary/active_aux.csv" >> ~/.xsar/config.yaml
7777
78-
# Set up grdwindinversion configuration
79-
- name: Setup grdwindinversion configuration
80-
run: |
78+
# Set up grdwindinversion configuration
79+
- name: Setup grdwindinversion configuration
80+
run: |
8181
mkdir -p ~/.grdwindinversion
8282
echo "'ecmwf_0100_1h': ./test_data/ECMWF/forecast/hourly/0100deg/netcdf_light/%Y/%j/ECMWF_FORECAST_0100_%Y%m%d%H%M_10U_10V.nc" > ~/.grdwindinversion/data_config.yaml
8383
echo "'ecmwf_0125_1h': ./test_data/ECMWF/0.125deg/1h/forecasts/%Y/%j/ecmwf_%Y%m%d%H%M.nc" >> ~/.grdwindinversion/data_config.yaml
8484
#echo "'nc_luts_path': ./test_data/GMFS/nc_luts" >> ~/.grdwindinversion/data_config.yaml
8585
#echo "'lut_cmod7_path': './test_data/GMFS/v1.6/GMF_cmod7_official/cmod7_and_python_script'" >> ~/.grdwindinversion/data_config.yaml
8686
#echo "'lut_ms1ahw_path': './test_data/GMFS/v1.6/GMF_cmodms1ahw'" >> ~/.grdwindinversion/data_config.yaml
8787
88-
# Run the tests
89-
- name: Run tests
90-
run: |
88+
# Run the tests
89+
- name: Run tests
90+
run: |
9191
eval "$(micromamba shell hook --shell bash)"
9292
micromamba activate grdwind_env
9393
pytest

README.md

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,38 @@
1-
21
# grdwindinversion
32

4-
5-
63
[![Python Version](https://img.shields.io/pypi/pyversions/grdwindinversion.svg)](https://pypi.org/project/grdwindinversion/)
74
[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/umr-lops/grdwindinversion/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)
85

9-
10-
11-
12-
136
Package to perform Wind inversion from GRD Level-1 SAR images
147

15-
16-
* Free software: MIT license
17-
* Documentation: https://grdwindinversion.readthedocs.io.
18-
8+
- Free software: MIT license
9+
- Documentation: https://grdwindinversion.readthedocs.io.
1910

2011
## Usage
2112

13+
```python
2214

23-
```python
15+
SAR_L1-to-L2_wind_processor -h
16+
usage: SAR_L1-to-L2_wind_processor [-h] --input_file INPUT_FILE [--config_file CONFIG_FILE] --outputdir OUTPUTDIR [--verbose] [--overwrite]
2417

25-
SAR_L1-to-L2_wind_processor -h
26-
usage: SAR_L1-to-L2_wind_processor [-h] --input_file INPUT_FILE [--config_file CONFIG_FILE] --outputdir OUTPUTDIR [--verbose] [--overwrite]
18+
Perform inversion from S1(L1-GRD) SAFE, L1-RCM, L1-RS2 ; using xsar/xsarsea tools
2719

28-
Perform inversion from S1(L1-GRD) SAFE, L1-RCM, L1-RS2 ; using xsar/xsarsea tools
29-
30-
options:
31-
-h, --help show this help message and exit
32-
--input_file INPUT_FILE
33-
input file path
34-
--config_file CONFIG_FILE
35-
config file path [if not provided will take config file based on input file]
36-
--outputdir OUTPUTDIR
37-
--verbose
38-
--overwrite overwrite existing .nc files [default is False]
20+
options:
21+
-h, --help show this help message and exit
22+
--input_file INPUT_FILE
23+
input file path
24+
--config_file CONFIG_FILE
25+
config file path [if not provided will take config file based on input file]
26+
--outputdir OUTPUTDIR
27+
--verbose
28+
--overwrite overwrite existing .nc files [default is False]
3929
```
4030

41-
4231
## Features
4332

4433
This Python library (based on `xarray`) allows to perform wind inversion from level-1 GRD (projected magnitude image).
4534
Mission supported:
46-
* Sentinel-1
47-
* RCM
48-
* RadarSat-2
49-
5035

36+
- Sentinel-1
37+
- RCM
38+
- RadarSat-2

docs/conf.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
# relative to the documentation root, use os.path.abspath to make it
1818
# absolute, like shown here.
1919
#
20+
import grdwindinversion
2021
import os
2122
import sys
2223
sys.path.insert(0, os.path.abspath('..'))
2324

24-
import grdwindinversion
2525

2626
# -- General configuration ---------------------------------------------
2727

@@ -43,6 +43,12 @@
4343
'sphinxcontrib.mermaid',
4444
'nbsphinx',
4545
'jupyter_sphinx',
46+
'myst_parser'
47+
]
48+
myst_enable_extensions = [
49+
"deflist", # Pour les listes de définitions
50+
"linkify", # Pour rendre les URLs cliquables automatiquement
51+
"colon_fence", # Pour activer des blocs ::: comme Markdown GFM
4652
]
4753
# order by source
4854
autodoc_member_order = 'bysource'
@@ -69,7 +75,12 @@
6975
# You can specify multiple suffix as a list of string:
7076
#
7177
# source_suffix = ['.rst', '.md']
72-
source_suffix = '.rst'
78+
# source_suffix = '.rst'
79+
80+
source_suffix = {
81+
'.rst': 'restructuredtext',
82+
'.md': 'markdown',
83+
}
7384

7485
# The master toctree document.
7586
master_doc = 'index'
@@ -112,8 +123,11 @@
112123
# The theme to use for HTML and HTML Help pages. See the documentation for
113124
# a list of builtin themes.
114125
#
115-
html_theme = 'alabaster'
116-
#html_theme = 'sphinx_rtd_theme'
126+
# html_theme = 'alabaster'
127+
# html_theme = 'sphinx_rtd_theme'
128+
# html_theme = 'furo'
129+
html_theme = 'sphinx_rtd_theme'
130+
117131

118132
# Theme options are theme-specific and customize the look and feel of a
119133
# theme further. For a list of options available for each theme, see the
@@ -125,8 +139,12 @@
125139
# relative to this directory. They are copied after the builtin static files,
126140
# so a file named "default.css" will overwrite the builtin "default.css".
127141
html_static_path = ['_static']
128-
#html_style = 'css/grdwindinversion.css'
142+
html_style = 'css/grdwindinversion.css'
143+
# html_style = 'css/xsarsea.css'
129144

145+
html_theme_options = {
146+
'logo_only': False,
147+
}
130148
# -- Options for HTMLHelp output ---------------------------------------
131149

132150
# Output file base name for HTML help builder.
@@ -187,6 +205,3 @@
187205
'One line description of project.',
188206
'Miscellaneous'),
189207
]
190-
191-
192-

0 commit comments

Comments
 (0)