ticoi 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ticoi-0.1.2/.github/script/generate_yml_from_requirement.py +36 -0
- ticoi-0.1.2/.github/workflows/pre-commit.yml +14 -0
- ticoi-0.1.2/.github/workflows/pypi-publish.yml +51 -0
- ticoi-0.1.2/.github/workflows/python-app.yml +48 -0
- ticoi-0.1.2/.gitignore +164 -0
- ticoi-0.1.2/.pre-commit-config.yaml +40 -0
- ticoi-0.1.2/.relint.yml +4 -0
- ticoi-0.1.2/CITATION.cff +40 -0
- ticoi-0.1.2/CODE_OF_CONDUCT.md +82 -0
- ticoi-0.1.2/CONTRIBUTING.md +104 -0
- ticoi-0.1.2/LICENSE +165 -0
- ticoi-0.1.2/PKG-INFO +179 -0
- ticoi-0.1.2/README.md +137 -0
- ticoi-0.1.2/README_output.md +61 -0
- ticoi-0.1.2/README_possible_parameters.md +75 -0
- ticoi-0.1.2/environment.yml +28 -0
- ticoi-0.1.2/examples/advanced/cube_prep_from_geotiff.py +138 -0
- ticoi-0.1.2/examples/advanced/custom_loader.py +47 -0
- ticoi-0.1.2/examples/advanced/demo_for_different_datasets/cube_ticoi_demo_IGE_Pleiades.py +261 -0
- ticoi-0.1.2/examples/advanced/demo_for_different_datasets/cube_ticoi_demo_IGE_S2.py +261 -0
- ticoi-0.1.2/examples/advanced/demo_for_different_datasets/cube_ticoi_demo_TerraTrack.py +261 -0
- ticoi-0.1.2/examples/advanced/demo_for_different_datasets/cube_ticoi_demo_its_live.py +254 -0
- ticoi-0.1.2/examples/advanced/demo_for_different_datasets/pixel_ticoi_demo_TerraTrack.py +228 -0
- ticoi-0.1.2/examples/advanced/hyperparameter_choice/coef_regu_based_on_vvc.py +119 -0
- ticoi-0.1.2/examples/advanced/quality_metrics/VVC.ipynb +146 -0
- ticoi-0.1.2/examples/advanced/quality_metrics/glaft_for_ticoi_results.py +94 -0
- ticoi-0.1.2/examples/advanced/quality_metrics/stats_in_static_areas.py +13 -0
- ticoi-0.1.2/examples/basic/notebook/cube_demo_local_ncdata.ipynb +241 -0
- ticoi-0.1.2/examples/basic/notebook/pixel_demo_its_live_on_cloud.ipynb +288 -0
- ticoi-0.1.2/examples/basic/notebook/pixel_demo_local_ncdata.ipynb +270 -0
- ticoi-0.1.2/examples/basic/python_script/cube_ticoi_demo.py +258 -0
- ticoi-0.1.2/examples/basic/python_script/pixel_ticoi_demo.py +227 -0
- ticoi-0.1.2/examples/image/Temporal_closure.png +0 -0
- ticoi-0.1.2/pyproject.toml +81 -0
- ticoi-0.1.2/src/__init__.py +0 -0
- ticoi-0.1.2/src/ticoi/__about__.py +1 -0
- ticoi-0.1.2/src/ticoi/__init__.py +0 -0
- ticoi-0.1.2/src/ticoi/core.py +1534 -0
- ticoi-0.1.2/src/ticoi/cube_data_classxr.py +2172 -0
- ticoi-0.1.2/src/ticoi/cube_writer.py +772 -0
- ticoi-0.1.2/src/ticoi/example.py +100 -0
- ticoi-0.1.2/src/ticoi/filtering_functions.py +712 -0
- ticoi-0.1.2/src/ticoi/interpolation_functions.py +238 -0
- ticoi-0.1.2/src/ticoi/inversion_functions.py +1032 -0
- ticoi-0.1.2/src/ticoi/mjd2date.py +31 -0
- ticoi-0.1.2/src/ticoi/optimize_coefficient_functions.py +321 -0
- ticoi-0.1.2/src/ticoi/pixel_class.py +2078 -0
- ticoi-0.1.2/src/ticoi/seasonality_functions.py +220 -0
- ticoi-0.1.2/src/ticoi/utils.py +743 -0
- ticoi-0.1.2/tests/test_cube_data_class.py +77 -0
- ticoi-0.1.2/tests/test_example.py +32 -0
- ticoi-0.1.2/tests/test_filtering_functions.py +195 -0
- ticoi-0.1.2/tests/test_inversion_functions.py +194 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
import yaml
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def parse_requirements(file_path):
|
|
8
|
+
with open(file_path) as file:
|
|
9
|
+
lines = file.readlines()
|
|
10
|
+
|
|
11
|
+
requirements = {}
|
|
12
|
+
for line in lines:
|
|
13
|
+
line = line.strip()
|
|
14
|
+
if line and not line.startswith("#"):
|
|
15
|
+
# Using regex to split the package and version constraints
|
|
16
|
+
match = re.match(r"([a-zA-Z0-9_\-]+)([><=!]=?[\d\.]*)?", line)
|
|
17
|
+
if match:
|
|
18
|
+
package = match.group(1)
|
|
19
|
+
version = match.group(2) if match.group(2) else None
|
|
20
|
+
requirements[package] = version
|
|
21
|
+
|
|
22
|
+
return requirements
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def generate_yaml(requirements, output_file):
|
|
26
|
+
with open(output_file, "w") as file:
|
|
27
|
+
yaml.dump({"dependencies": requirements}, file, default_flow_style=False)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
requirements_file = f"{os.path.abspath(os.path.join(os.path.dirname(__file__)))}/requirements.txt"
|
|
31
|
+
output_yaml_file = f"{os.path.abspath(os.path.join(os.path.dirname(__file__)))}/ticoi_env.yml"
|
|
32
|
+
|
|
33
|
+
requirements = parse_requirements(requirements_file)
|
|
34
|
+
generate_yaml(requirements, output_yaml_file)
|
|
35
|
+
|
|
36
|
+
print(f"Generated {output_yaml_file} from {requirements_file}")
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: pre-commit.yml
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ main ]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pre-commit:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
- uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using hatch when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
#Inspired from https://blog.pecar.me/automate-hatch-publish and https://github.com/shippp/hipp/blob/main/.github/workflows/pypi-publish.yml
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
deploy:
|
|
20
|
+
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.10"
|
|
30
|
+
cache: 'pip'
|
|
31
|
+
|
|
32
|
+
- name: Install Hatch
|
|
33
|
+
run: pip install hatch
|
|
34
|
+
|
|
35
|
+
# - name: Run tests
|
|
36
|
+
# uses: hatch run dev:pytest
|
|
37
|
+
|
|
38
|
+
- name: Update version in __about__.py
|
|
39
|
+
run: |
|
|
40
|
+
VERSION=${{ github.event.release.tag_name }}
|
|
41
|
+
VERSION=${VERSION#v} # strip leading "v" if present
|
|
42
|
+
sed -i "s/^__version__ = .*/__version__ = \"${VERSION}\"/" src/ticoi/__about__.py
|
|
43
|
+
|
|
44
|
+
- name: Build package
|
|
45
|
+
run: hatch build
|
|
46
|
+
|
|
47
|
+
- name: Publish package distribution to Pypi
|
|
48
|
+
run: hatch publish
|
|
49
|
+
env:
|
|
50
|
+
HATCH_INDEX_USER: __token__
|
|
51
|
+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Python test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
env:
|
|
16
|
+
PYTHONUNBUFFERED: "1"
|
|
17
|
+
FORCE_COLOR: "1"
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
run:
|
|
21
|
+
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
27
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: ${{ matrix.python-version }}
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
uses: astral-sh/setup-uv@v3
|
|
39
|
+
|
|
40
|
+
- name: Install ourself
|
|
41
|
+
run: |
|
|
42
|
+
uv pip install --system -e .
|
|
43
|
+
|
|
44
|
+
- name: Install hatch
|
|
45
|
+
run: uv pip install --system hatch
|
|
46
|
+
|
|
47
|
+
- name: Run tests
|
|
48
|
+
run: hatch test --python ${{ matrix.python-version }} --cover-quiet --randomize --parallel --retries 5 --retry-delay 3
|
ticoi-0.1.2/.gitignore
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
.idea
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
|
|
7
|
+
# C extensions
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Distribution / packaging
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
#Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# poetry
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
103
|
+
#poetry.lock
|
|
104
|
+
|
|
105
|
+
# pdm
|
|
106
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
107
|
+
#pdm.lock
|
|
108
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
109
|
+
# in version control.
|
|
110
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
111
|
+
.pdm.toml
|
|
112
|
+
|
|
113
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
114
|
+
__pypackages__/
|
|
115
|
+
|
|
116
|
+
# Celery stuff
|
|
117
|
+
celerybeat-schedule
|
|
118
|
+
celerybeat.pid
|
|
119
|
+
|
|
120
|
+
# SageMath parsed files
|
|
121
|
+
*.sage.py
|
|
122
|
+
|
|
123
|
+
# Environments
|
|
124
|
+
.env
|
|
125
|
+
.venv
|
|
126
|
+
env/
|
|
127
|
+
venv/
|
|
128
|
+
ENV/
|
|
129
|
+
env.bak/
|
|
130
|
+
venv.bak/
|
|
131
|
+
|
|
132
|
+
# Spyder project settings
|
|
133
|
+
.spyderproject
|
|
134
|
+
.spyproject
|
|
135
|
+
|
|
136
|
+
# Rope project settings
|
|
137
|
+
.ropeproject
|
|
138
|
+
|
|
139
|
+
# mkdocs documentation
|
|
140
|
+
/site
|
|
141
|
+
|
|
142
|
+
# mypy
|
|
143
|
+
.mypy_cache/
|
|
144
|
+
.dmypy.json
|
|
145
|
+
dmypy.json
|
|
146
|
+
|
|
147
|
+
# Pyre type checker
|
|
148
|
+
.pyre/
|
|
149
|
+
|
|
150
|
+
# pytype static type analyzer
|
|
151
|
+
.pytype/
|
|
152
|
+
|
|
153
|
+
# Cython debug symbols
|
|
154
|
+
cython_debug/
|
|
155
|
+
|
|
156
|
+
# PyCharm
|
|
157
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
158
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
159
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
160
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
161
|
+
#.idea/
|
|
162
|
+
/examples/results/cube/
|
|
163
|
+
/examples/results/pixel/
|
|
164
|
+
/examples/results/line/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
# Ruff version.
|
|
4
|
+
rev: v0.14.4
|
|
5
|
+
hooks:
|
|
6
|
+
# Run the linter.
|
|
7
|
+
- id: ruff
|
|
8
|
+
types_or: [python, pyi]
|
|
9
|
+
args: [--fix, --extend-ignore=E722, --extend-ignore=F821] #ignore bare except and Undefined name, to avoid pb in old code
|
|
10
|
+
# Run the formatter.
|
|
11
|
+
- id: ruff-format
|
|
12
|
+
types_or: [python, pyi]
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
15
|
+
rev: v6.0.0
|
|
16
|
+
hooks:
|
|
17
|
+
- id: check-added-large-files
|
|
18
|
+
- id: check-case-conflict
|
|
19
|
+
# - id: check-executables-have-shebangs
|
|
20
|
+
- id: check-json
|
|
21
|
+
- id: check-merge-conflict
|
|
22
|
+
- id: check-toml
|
|
23
|
+
- id: check-yaml
|
|
24
|
+
|
|
25
|
+
# Replace relative imports
|
|
26
|
+
- repo: https://github.com/MarcoGorelli/absolufy-imports
|
|
27
|
+
rev: v0.3.1
|
|
28
|
+
hooks:
|
|
29
|
+
- id: absolufy-imports
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
35
|
+
# rev: "v1.15.0"
|
|
36
|
+
# hooks:
|
|
37
|
+
# - id: mypy
|
|
38
|
+
# args: [--ignore-missing-imports, --no-warn-unused-ignores, --allow-untyped-calls,]
|
|
39
|
+
|
|
40
|
+
|
ticoi-0.1.2/.relint.yml
ADDED
ticoi-0.1.2/CITATION.cff
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
authors:
|
|
4
|
+
- family-names: "Charrier"
|
|
5
|
+
given-names: "Laurane"
|
|
6
|
+
- family-names: "Guo"
|
|
7
|
+
given-names: "Lei"
|
|
8
|
+
title: "TICOI Software"
|
|
9
|
+
version: 1.0.0
|
|
10
|
+
url: "https://github.com/ticoi/ticoi.git"
|
|
11
|
+
preferred-citation:
|
|
12
|
+
type: article
|
|
13
|
+
authors:
|
|
14
|
+
- family-names: Charrier
|
|
15
|
+
given-names: Laurane
|
|
16
|
+
- family-names: Dehecq
|
|
17
|
+
given-names: Amaury
|
|
18
|
+
- family-names: Guo
|
|
19
|
+
given-names: Lei
|
|
20
|
+
- family-names: Brun
|
|
21
|
+
given-names: Fanny
|
|
22
|
+
- family-names: Millan
|
|
23
|
+
given-names: Romain
|
|
24
|
+
- family-names: Lioret
|
|
25
|
+
given-names: Nathan
|
|
26
|
+
- family-names: Copland
|
|
27
|
+
given-names: Luke
|
|
28
|
+
- family-names: Maier
|
|
29
|
+
given-names: Nathan
|
|
30
|
+
- family-names: Dow
|
|
31
|
+
given-names: Christine
|
|
32
|
+
- family-names: Halas
|
|
33
|
+
given-names: Paul
|
|
34
|
+
title: "TICOI: an operational Python package to generate regular glacier velocity time series"
|
|
35
|
+
year: 2025
|
|
36
|
+
journal: "The Cryosphere"
|
|
37
|
+
volume: 19
|
|
38
|
+
start: 4555
|
|
39
|
+
end: 4583
|
|
40
|
+
doi: "10.5194/tc-19-4555-2025"
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
laurane.charrier at univ-grenoble-alpes.fr.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Attribution
|
|
70
|
+
|
|
71
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
72
|
+
version 2.0, available at
|
|
73
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
74
|
+
|
|
75
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
76
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
77
|
+
|
|
78
|
+
[homepage]: https://www.contributor-covenant.org
|
|
79
|
+
|
|
80
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
81
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
82
|
+
https://www.contributor-covenant.org/translations.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Contributing Guidelines
|
|
2
|
+
|
|
3
|
+
:tada: **First off, thank you for considering contributing to TICOI! ** :tada:
|
|
4
|
+
|
|
5
|
+
The project can still be improved, and all contribitors are welcome!
|
|
6
|
+
These are some of the many ways to contribute:
|
|
7
|
+
|
|
8
|
+
* :bug: Submitting bug reports and feature requests
|
|
9
|
+
* :memo: Writing tutorials or examples
|
|
10
|
+
* :mag: Fixing typos and improving the documentation
|
|
11
|
+
* :bulb: Writing code for everyone to use
|
|
12
|
+
|
|
13
|
+
*
|
|
14
|
+
Below is a guide to contributing to TICOI step by step, ensuring tests are passing.
|
|
15
|
+
|
|
16
|
+
## Overview: making a contribution
|
|
17
|
+
|
|
18
|
+
The technical steps to contributing to xDEM are:
|
|
19
|
+
|
|
20
|
+
1. Fork `ticoi/ticoi` and clone your fork repository locally.
|
|
21
|
+
2. Set up the development environment **(see section "Setup" below)**,
|
|
22
|
+
3. Create a branch for the new feature or bug fix,
|
|
23
|
+
4. Make your changes,
|
|
24
|
+
5. Add or modify related tests in `tests/` **(see section "Tests" below)**,
|
|
25
|
+
6. Commit your changes,
|
|
26
|
+
7. Run `pre-commit` separately if not installed as git hook **(see section "Linting" below)**,
|
|
27
|
+
8. Push to your fork,
|
|
28
|
+
9. Open a pull request from GitHub to discuss and eventually merge.
|
|
29
|
+
|
|
30
|
+
## Development environment
|
|
31
|
+
|
|
32
|
+
TICOI currently supports Python versions of 3.10 to 3.11, which are
|
|
33
|
+
tested in a continuous integration (CI) workflow running on GitHub Actions.
|
|
34
|
+
|
|
35
|
+
When you open a PR on TICOI, a single linting action and 1 test actions will automatically start, corresponding to all
|
|
36
|
+
supported Python versions (3.11).
|
|
37
|
+
|
|
38
|
+
### Setup
|
|
39
|
+
|
|
40
|
+
#### With `mamba`
|
|
41
|
+
Clone the git repo and create a `mamba` environment (see how to install `mamba` in the [mamba documentation](https://mamba.readthedocs.io/en/latest/)):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git clone git@github.com:ticoi/ticoi.git
|
|
45
|
+
cd ticoi
|
|
46
|
+
mamba env create -f environment.yml -n ticoi_env # change the name if you want
|
|
47
|
+
mamba activate ticoi_env # Or any other name specified above
|
|
48
|
+
```
|
|
49
|
+
#### With `pip`
|
|
50
|
+
```bash
|
|
51
|
+
git clone git@github.com:ticoi/ticoi.git
|
|
52
|
+
cd ticoi
|
|
53
|
+
make install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Tests
|
|
57
|
+
|
|
58
|
+
At least one test per feature (in the associated `tests/test_*.py` file) should be included in the PR, using `pytest` (see existing tests for examples).
|
|
59
|
+
The structure of test modules and functions in `tests/` largely mirrors that of the package modules and functions in `ticoi/`.
|
|
60
|
+
|
|
61
|
+
To run the entire test suite, run `pytest` from the root of the repository:
|
|
62
|
+
```bash
|
|
63
|
+
pytest
|
|
64
|
+
```
|
|
65
|
+
### Formatting and linting
|
|
66
|
+
|
|
67
|
+
Install and run `pre-commit` from the root of the repository (such as with `mamba install pre-commit`, see [pre-commit documentation](https://pre-commit.com/) for details),
|
|
68
|
+
which will use `.pre-commit-config.yaml` to verify spelling errors, import sorting, type checking, formatting and linting:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pre-commit install #optional: to install pre-commit as a git-hook, to ensure checks have to pass before committing.
|
|
72
|
+
pre-commit run --all
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
You can then commit and push those changes.
|
|
76
|
+
|
|
77
|
+
### Final steps
|
|
78
|
+
|
|
79
|
+
That's it! If the tests are passing, or if you need help to make those work, you can open a PR.
|
|
80
|
+
|
|
81
|
+
We'll receive word of your PR as soon as it is opened, and should follow up shortly to discuss the changes, and eventually give approval to merge. Thank you so much for contributing!
|
|
82
|
+
|
|
83
|
+
### Rights
|
|
84
|
+
|
|
85
|
+
The license (see LICENSE) applies to all contributions.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Understanding the structure of the code
|
|
89
|
+
|
|
90
|
+
#### Main code
|
|
91
|
+
|
|
92
|
+
* **core.py**: Main functions to process the temporal inversion of glacier's surface velocity using
|
|
93
|
+
the TICOI method. The inversion is solved using an Iterative Reweighted Least Square, and a robust downweighted
|
|
94
|
+
function (Tukey's biweight).
|
|
95
|
+
* **cube_data_classxr.py**: Class object to store and manipulate velocity observation data in a cube (netcdf or zarr)
|
|
96
|
+
* **pixel_class.py**: Class object to manipulate and visualize velocity observations and inverted results on a pixel (from a pandas dataframe, or inside a cube)
|
|
97
|
+
* **inversion_functions.py**: Functions to process the temporal inversion.
|
|
98
|
+
* **interpolation_functions.py**: Functions to process the temporal interpolation.
|
|
99
|
+
* **filtering_functions.py**: Functions to process some filtering.
|
|
100
|
+
* **utils.py**: Two other functions for accessing ITS_LIVE data.
|
|
101
|
+
* **mjd2date.py**: Functions to convert the dates from Modified Julian Date to Gregorian Date
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|