ticoi 0.0.1__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.

Potentially problematic release.


This version of ticoi might be problematic. Click here for more details.

Files changed (59) hide show
  1. ticoi-0.0.1/.github/script/generate_yml_from_requirement.py +36 -0
  2. ticoi-0.0.1/.github/workflows/pre-commit.yml +14 -0
  3. ticoi-0.0.1/.github/workflows/pypi-publish.yml +50 -0
  4. ticoi-0.0.1/.github/workflows/python-app.yml +49 -0
  5. ticoi-0.0.1/.github/workflows/test_hatch.yml +49 -0
  6. ticoi-0.0.1/.gitignore +164 -0
  7. ticoi-0.0.1/.pre-commit-config.yaml +39 -0
  8. ticoi-0.0.1/.relint.yml +4 -0
  9. ticoi-0.0.1/CITATION.cff +41 -0
  10. ticoi-0.0.1/CODE_OF_CONDUCT.md +82 -0
  11. ticoi-0.0.1/CONTRIBUTING.md +104 -0
  12. ticoi-0.0.1/LICENSE +165 -0
  13. ticoi-0.0.1/PKG-INFO +152 -0
  14. ticoi-0.0.1/README.md +114 -0
  15. ticoi-0.0.1/README_output.md +61 -0
  16. ticoi-0.0.1/README_possible_parameters.md +75 -0
  17. ticoi-0.0.1/environment.yml +26 -0
  18. ticoi-0.0.1/examples/advanced/cube_prep_from_geotiff.py +138 -0
  19. ticoi-0.0.1/examples/advanced/cube_ticoi_demo_its_live.py +254 -0
  20. ticoi-0.0.1/examples/advanced/glaft_for_ticoi_results.py +94 -0
  21. ticoi-0.0.1/examples/basic/notebook/pixel_demo_its_live_on_cloud.ipynb +227 -0
  22. ticoi-0.0.1/examples/basic/notebook/pixel_demo_local_ncdata.ipynb +232 -0
  23. ticoi-0.0.1/examples/basic/notebook/results/ILF_result.csv +653 -0
  24. ticoi-0.0.1/examples/basic/notebook/results/RLF_result.csv +653 -0
  25. ticoi-0.0.1/examples/basic/notebook/results/confidence_intervals_and_quality.png +0 -0
  26. ticoi-0.0.1/examples/basic/notebook/results/vv_interp.png +0 -0
  27. ticoi-0.0.1/examples/basic/notebook/results/vv_invert.png +0 -0
  28. ticoi-0.0.1/examples/basic/notebook/results/vv_obs.png +0 -0
  29. ticoi-0.0.1/examples/basic/python_script/cube_ticoi_demo.py +261 -0
  30. ticoi-0.0.1/examples/basic/python_script/pixel_ticoi_demo.py +227 -0
  31. ticoi-0.0.1/examples/image/Temporal_closure.png +0 -0
  32. ticoi-0.0.1/pyproject.toml +77 -0
  33. ticoi-0.0.1/src/__init__.py +0 -0
  34. ticoi-0.0.1/src/ticoi/__about__.py +1 -0
  35. ticoi-0.0.1/src/ticoi/__init__.py +0 -0
  36. ticoi-0.0.1/src/ticoi/core.py +1500 -0
  37. ticoi-0.0.1/src/ticoi/cube_data_classxr.py +2204 -0
  38. ticoi-0.0.1/src/ticoi/cube_writer.py +741 -0
  39. ticoi-0.0.1/src/ticoi/example.py +81 -0
  40. ticoi-0.0.1/src/ticoi/filtering_functions.py +676 -0
  41. ticoi-0.0.1/src/ticoi/interpolation_functions.py +236 -0
  42. ticoi-0.0.1/src/ticoi/inversion_functions.py +1015 -0
  43. ticoi-0.0.1/src/ticoi/mjd2date.py +31 -0
  44. ticoi-0.0.1/src/ticoi/optimize_coefficient_functions.py +264 -0
  45. ticoi-0.0.1/src/ticoi/pixel_class.py +1830 -0
  46. ticoi-0.0.1/src/ticoi/seasonality_functions.py +209 -0
  47. ticoi-0.0.1/src/ticoi/utils.py +725 -0
  48. ticoi-0.0.1/test_data/Argentiere/Alpes_RGI7.dbf +0 -0
  49. ticoi-0.0.1/test_data/Argentiere/Alpes_RGI7.prj +1 -0
  50. ticoi-0.0.1/test_data/Argentiere/Alpes_RGI7.shp +0 -0
  51. ticoi-0.0.1/test_data/Argentiere/Alpes_RGI7.shx +0 -0
  52. ticoi-0.0.1/test_data/Argentiere/Argentiere_example_interp.nc +0 -0
  53. ticoi-0.0.1/test_data/Argentiere/Argentiere_iceflow.gpkg +0 -0
  54. ticoi-0.0.1/test_data/Argentiere/Argentiere_static.gpkg +0 -0
  55. ticoi-0.0.1/test_data/Lowell/ITS_LIVE_Lowell_Lower_test.nc +0 -0
  56. ticoi-0.0.1/tests/test_cube_data_class.py +79 -0
  57. ticoi-0.0.1/tests/test_example.py +16 -0
  58. ticoi-0.0.1/tests/test_filtering_functions.py +195 -0
  59. ticoi-0.0.1/tests/test_inversion_functions.py +190 -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,50 @@
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
+
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
+
31
+ - name: Install Hatch
32
+ run: pipx install hatch
33
+
34
+ # - name: Run tests
35
+ # uses: hatch run dev:pytest
36
+
37
+ - name: Update version in __about__.py
38
+ run: |
39
+ VERSION=${{ github.event.release.tag_name }}
40
+ VERSION=${VERSION#v} # strip leading "v" if present
41
+ sed -i "s/^__version__ = .*/__version__ = \"${VERSION}\"/" src/ticoi/__about__.py
42
+
43
+ - name: Build package
44
+ run: hatch build
45
+
46
+ - name: Publish package distribution to Pypi
47
+ run: hatch publish
48
+ env:
49
+ HATCH_INDEX_USER: __token__
50
+ HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,49 @@
1
+ name: Python test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
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
+ uv pip install --system -e ./backend
44
+
45
+ - name: Run static analysis
46
+ run: hatch fmt --check
47
+
48
+ - name: Run tests
49
+ run: hatch test --python ${{ matrix.python-version }} --cover-quiet --randomize --parallel --retries 5 --retry-delay 3
@@ -0,0 +1,49 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
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
+ uv pip install --system -e ./backend
44
+
45
+ - name: Run static analysis
46
+ run: hatch fmt --check
47
+
48
+ - name: Run tests
49
+ run: hatch test --python ${{ matrix.python-version }} --cover-quiet --randomize --parallel --retries 5 --retry-delay 3
ticoi-0.0.1/.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,39 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.12.7
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: v4.0.1
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
+ # - repo: https://github.com/pre-commit/mirrors-mypy
34
+ # rev: "v1.15.0"
35
+ # hooks:
36
+ # - id: mypy
37
+ # args: [--ignore-missing-imports, --no-warn-unused-ignores, --allow-untyped-calls,]
38
+
39
+
@@ -0,0 +1,4 @@
1
+ #copied from xdem
2
+ - name: Type hint in docstring
3
+ pattern: ':[r]?type '
4
+ filePattern: .*\.py
@@ -0,0 +1,41 @@
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
+ doi: "10.5194/egusphere-2024-3409"
35
+ title: "TICOI: an operational Python package to generate regularized glacier velocity time series"
36
+ journal: "EGUsphere"
37
+ year: 2025
38
+ month: 7
39
+ start: 1 # First page number
40
+ end: 40 # Last page number
41
+ volume: 1
@@ -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
+