debrisframe 0.1a6__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.
Files changed (43) hide show
  1. debrisframe-0.1a6/.github/workflows/TestWithSinglePython.yml +59 -0
  2. debrisframe-0.1a6/.github/workflows/buildAndUploadPyPi.yml +73 -0
  3. debrisframe-0.1a6/.gitignore +190 -0
  4. debrisframe-0.1a6/.qlty/qlty.toml +163 -0
  5. debrisframe-0.1a6/.readthedocs.yaml +13 -0
  6. debrisframe-0.1a6/LICENSE.txt +287 -0
  7. debrisframe-0.1a6/PKG-INFO +37 -0
  8. debrisframe-0.1a6/README.md +15 -0
  9. debrisframe-0.1a6/debrisframe/__init__.py +0 -0
  10. debrisframe-0.1a6/debrisframe/c1TIF/__init__.py +0 -0
  11. debrisframe-0.1a6/debrisframe/c1TIF/c1TIF.py +52 -0
  12. debrisframe-0.1a6/debrisframe/c1TIF/c1TIFCfg.ini +186 -0
  13. debrisframe-0.1a6/debrisframe/debrisframeCfg.ini +38 -0
  14. debrisframe-0.1a6/debrisframe/in1Utils/__init__.py +0 -0
  15. debrisframe-0.1a6/debrisframe/in1Utils/fileUtils.py +43 -0
  16. debrisframe-0.1a6/debrisframe/in1Utils/generateTopo.py +173 -0
  17. debrisframe-0.1a6/debrisframe/in1Utils/generateTopoCfg.ini +57 -0
  18. debrisframe-0.1a6/debrisframe/in1Utils/plotUtils.py +112 -0
  19. debrisframe-0.1a6/debrisframe/in2TopoHyd/__init__.py +0 -0
  20. debrisframe-0.1a6/debrisframe/in2TopoHyd/in2TopoHyd.py +986 -0
  21. debrisframe-0.1a6/debrisframe/in2TopoHyd/in2TopoHydCfg.ini +26 -0
  22. debrisframe-0.1a6/debrisframe/runC1TIF.py +134 -0
  23. debrisframe-0.1a6/debrisframe/runIn2TopoHyd.py +87 -0
  24. debrisframe-0.1a6/debrisframe/runScripts/runGenerateTopo.py +35 -0
  25. debrisframe-0.1a6/docs/Makefile +20 -0
  26. debrisframe-0.1a6/docs/make.bat +35 -0
  27. debrisframe-0.1a6/docs/requirements.txt +3 -0
  28. debrisframe-0.1a6/docs/source/_static/css/custom.css +18 -0
  29. debrisframe-0.1a6/docs/source/_static/logo.png +0 -0
  30. debrisframe-0.1a6/docs/source/_static/ratingCurve.png +0 -0
  31. debrisframe-0.1a6/docs/source/_templates/custom-class-template.rst +32 -0
  32. debrisframe-0.1a6/docs/source/_templates/custom-module-template.rst +70 -0
  33. debrisframe-0.1a6/docs/source/conf.py +70 -0
  34. debrisframe-0.1a6/docs/source/index.rst +85 -0
  35. debrisframe-0.1a6/docs/source/installation.rst +40 -0
  36. debrisframe-0.1a6/docs/source/introduction.rst +30 -0
  37. debrisframe-0.1a6/docs/source/moduleC1TIF.rst +100 -0
  38. debrisframe-0.1a6/docs/source/moduleIn2TopoHyd.rst +280 -0
  39. debrisframe-0.1a6/docs/source/references_all.bib +31 -0
  40. debrisframe-0.1a6/docs/source/release.rst +37 -0
  41. debrisframe-0.1a6/docs/source/workflow.rst +64 -0
  42. debrisframe-0.1a6/docs/source/zreferences.rst +6 -0
  43. debrisframe-0.1a6/pyproject.toml +92 -0
@@ -0,0 +1,59 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: Test single python version
5
+
6
+ on:
7
+ push:
8
+ branches: [ master ]
9
+ paths-ignore:
10
+ - 'docs/**'
11
+ pull_request:
12
+ branches: [ master ]
13
+ paths-ignore:
14
+ - 'docs/**'
15
+ workflow_dispatch:
16
+
17
+ jobs:
18
+ build:
19
+
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: '3.12'
30
+ check-latest: true
31
+ - name: Install dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ pip install flake8 pytest pytest-cov
35
+ pip install numpy
36
+ pip install setuptools
37
+ pip install pytest_mock
38
+ - name: Install avaframe
39
+ run: |
40
+ pip install avaframe
41
+ - name: Install debrisframe
42
+ run: |
43
+ pip install .
44
+ - name: Test with pytest
45
+ run: |
46
+ pytest -ra --cov --cov-report=xml --cov-report lcov:cov.info --cov-config=.coveragerc
47
+ - uses: qltysh/qlty-action/coverage@v1
48
+ with:
49
+ token: ${{secrets.QLTY_COVERAGE_TOKEN}}
50
+ files: cov.info
51
+ - name: Build wheel
52
+ run: |
53
+ python -m pip install build
54
+ python -m build --wheel
55
+ - name: Smoke test wheel import
56
+ run: |
57
+ python -m venv /tmp/smoke
58
+ /tmp/smoke/bin/pip install dist/*.whl
59
+ /tmp/smoke/bin/python -c "import debrisframe"
@@ -0,0 +1,73 @@
1
+ # Build DebrisFrame and publish it to TestPyPI and PyPI.
2
+ #
3
+ # Release-first flow (matches AvaFrame):
4
+ # 1. Create a GitHub release for the new version tag (X.Y.Z). This creates the
5
+ # tag and triggers Zenodo, which archives the release and mints the DOI.
6
+ # 2. Dispatch this workflow from the Actions tab, selecting that release tag in
7
+ # the "Use workflow from" dropdown.
8
+ #
9
+ # hatch-vcs derives the version from the git tag, so the workflow must run against
10
+ # the tag; otherwise the build gets a local version segment (e.g. +g<hash>) that
11
+ # PyPI rejects. The guard step below enforces this.
12
+
13
+ name: Build and upload to PyPI
14
+
15
+ on:
16
+ workflow_dispatch:
17
+
18
+ jobs:
19
+ build:
20
+ name: Build distribution
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Verify the workflow runs on a release tag
28
+ if: github.ref_type != 'tag'
29
+ run: |
30
+ echo "::error::Dispatch this workflow against a release tag (X.Y.Z), not '${{ github.ref_name }}'."
31
+ exit 1
32
+
33
+ - name: Set up Python
34
+ uses: actions/setup-python@v6
35
+ with:
36
+ python-version: "3.12"
37
+
38
+ - name: Install build tools
39
+ run: |
40
+ python -m pip install --upgrade pip
41
+ pip install build twine
42
+
43
+ - name: Build sdist and wheel
44
+ run: python -m build
45
+
46
+ - name: Check distribution metadata
47
+ run: twine check dist/*
48
+
49
+ - name: Smoke test wheel install
50
+ run: |
51
+ python -m venv /tmp/smoke
52
+ /tmp/smoke/bin/pip install dist/*.whl
53
+ /tmp/smoke/bin/python -c "import debrisframe"
54
+
55
+ - uses: actions/upload-artifact@v7
56
+ with:
57
+ name: dist
58
+ path: dist/*
59
+
60
+ publish_pypi:
61
+ name: Publish to PyPI
62
+ needs: build
63
+ runs-on: ubuntu-latest
64
+ environment: pypi
65
+ permissions:
66
+ id-token: write
67
+ steps:
68
+ - uses: actions/download-artifact@v8
69
+ with:
70
+ name: dist
71
+ path: dist
72
+
73
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,190 @@
1
+ # local settings/configurations files
2
+ local_*
3
+
4
+ debrisframe/**/*.png
5
+
6
+ debrisframe/**/*.shp.nxyz
7
+
8
+ debrisframe/**/*.xml
9
+
10
+ debrisframe/**/**/Outputs
11
+
12
+ debrisframe/**/**/Inputs/DEMremeshed
13
+
14
+ debrisframe/**/**/Inputs/remeshedRasters
15
+
16
+ # Byte-compiled / optimized / DLL files
17
+ __pycache__/
18
+ *.py[cod]
19
+ *$py.class
20
+
21
+ # C extensions
22
+ *.so
23
+
24
+ # Distribution / packaging
25
+ .Python
26
+ build/
27
+ develop-eggs/
28
+ dist/
29
+ downloads/
30
+ eggs/
31
+ .eggs/
32
+ lib/
33
+ lib64/
34
+ parts/
35
+ sdist/
36
+ var/
37
+ wheels/
38
+ share/python-wheels/
39
+ *.egg-info/
40
+ .installed.cfg
41
+ *.egg
42
+ MANIFEST
43
+
44
+ # PyInstaller
45
+ # Usually these files are written by a python script from a template
46
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
47
+ *.manifest
48
+ *.spec
49
+
50
+ # Installer logs
51
+ pip-log.txt
52
+ pip-delete-this-directory.txt
53
+
54
+ # Unit test / coverage reports
55
+ htmlcov/
56
+ .tox/
57
+ .nox/
58
+ .coverage
59
+ .coverage.*
60
+ .cache
61
+ nosetests.xml
62
+ coverage.xml
63
+ *.cover
64
+ *.py,cover
65
+ .hypothesis/
66
+ .pytest_cache/
67
+ cover/
68
+
69
+ # Translations
70
+ *.mo
71
+ *.pot
72
+
73
+ # Django stuff:
74
+ *.log
75
+ local_settings.py
76
+ db.sqlite3
77
+ db.sqlite3-journal
78
+
79
+ # Flask stuff:
80
+ instance/
81
+ .webassets-cache
82
+
83
+ # Scrapy stuff:
84
+ .scrapy
85
+
86
+ # Sphinx documentation
87
+ docs/_build/
88
+
89
+ # PyBuilder
90
+ .pybuilder/
91
+ target/
92
+
93
+ # Jupyter Notebook
94
+ .ipynb_checkpoints
95
+
96
+ # IPython
97
+ profile_default/
98
+ ipython_config.py
99
+
100
+ # pyenv
101
+ # For a library or package, you might want to ignore these files since the code is
102
+ # intended to run in multiple environments; otherwise, check them in:
103
+ # .python-version
104
+
105
+ # pipenv
106
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
107
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
108
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
109
+ # install all needed dependencies.
110
+ #Pipfile.lock
111
+
112
+ # UV
113
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
114
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
115
+ # commonly ignored for libraries.
116
+ #uv.lock
117
+
118
+ # poetry
119
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
120
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
121
+ # commonly ignored for libraries.
122
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
123
+ #poetry.lock
124
+
125
+ # pdm
126
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
127
+ #pdm.lock
128
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
129
+ # in version control.
130
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
131
+ .pdm.toml
132
+ .pdm-python
133
+ .pdm-build/
134
+
135
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
136
+ __pypackages__/
137
+
138
+ # Celery stuff
139
+ celerybeat-schedule
140
+ celerybeat.pid
141
+
142
+ # SageMath parsed files
143
+ *.sage.py
144
+
145
+ # Environments
146
+ .env
147
+ .venv
148
+ env/
149
+ venv/
150
+ ENV/
151
+ env.bak/
152
+ venv.bak/
153
+
154
+ # Spyder project settings
155
+ .spyderproject
156
+ .spyproject
157
+
158
+ # Rope project settings
159
+ .ropeproject
160
+
161
+ # mkdocs documentation
162
+ /site
163
+
164
+ # mypy
165
+ .mypy_cache/
166
+ .dmypy.json
167
+ dmypy.json
168
+
169
+ # Pyre type checker
170
+ .pyre/
171
+
172
+ # pytype static type analyzer
173
+ .pytype/
174
+
175
+ # Cython debug symbols
176
+ cython_debug/
177
+
178
+ # PyCharm
179
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
180
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
181
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
182
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
183
+ .idea/
184
+
185
+ # PyPI configuration file
186
+ .pypirc
187
+
188
+ /pixi.lock
189
+
190
+ /.pixi/
@@ -0,0 +1,163 @@
1
+ # This file was automatically generated by `qlty init`.
2
+ # You can modify it to suit your needs.
3
+ # We recommend you to commit this file to your repository.
4
+ #
5
+ # This configuration is used by both Qlty CLI and Qlty Cloud.
6
+ #
7
+ # Qlty CLI -- Code quality toolkit for developers
8
+ # Qlty Cloud -- Fully automated Code Health Platform
9
+ #
10
+ # Try Qlty Cloud: https://qlty.sh
11
+ #
12
+ # For a guide to configuration, visit https://qlty.sh/d/config
13
+ # Or for a full reference, visit https://qlty.sh/d/qlty-toml
14
+ config_version = "0"
15
+
16
+ exclude_patterns = [
17
+ "config/",
18
+ "db/",
19
+ "dist/",
20
+ "**/.*",
21
+ "**/data/",
22
+ "**/runScripts/",
23
+ "**/com4FlowPy/",
24
+ "**/tinyHelper/",
25
+ "features/",
26
+ "**/node_modules/",
27
+ "script/",
28
+ "**/spec/",
29
+ "**/test/",
30
+ "**/tests/",
31
+ "Tests/",
32
+ "docs/",
33
+ "benchmarks/",
34
+ "**/vendor/",
35
+ "**/*_test.go",
36
+ "**/*.d.ts",
37
+ "**/*.cint",
38
+ "**/*.yml",
39
+ "**/*.ini",
40
+ "**/*.json",
41
+ "**/*.txt",
42
+ "**/*.conf",
43
+ "**/run*.py",
44
+ ".github/",
45
+ "*_min.*",
46
+ "*-min.*",
47
+ "*.min.*",
48
+ "**/*.d.ts",
49
+ "**/.yarn/**",
50
+ "**/bower_components/**",
51
+ "**/build/**",
52
+ "**/cache/**",
53
+ "**/config/**",
54
+ "**/db/**",
55
+ "**/deps/**",
56
+ "**/dist/**",
57
+ "**/extern/**",
58
+ "**/external/**",
59
+ "**/generated/**",
60
+ "**/Godeps/**",
61
+ "**/gradlew/**",
62
+ "**/mvnw/**",
63
+ "**/node_modules/**",
64
+ "**/protos/**",
65
+ "**/seed/**",
66
+ "**/target/**",
67
+ "**/testdata/**",
68
+ "**/vendor/**",
69
+ "**/assets/**",
70
+ ]
71
+
72
+ test_patterns = [
73
+ "**/test/**",
74
+ "**/spec/**",
75
+ "**/*.test.*",
76
+ "**/*.spec.*",
77
+ "**/*_test.*",
78
+ "**/*_spec.*",
79
+ "**/test_*.*",
80
+ "**/spec_*.*",
81
+ ]
82
+
83
+ [smells]
84
+ mode = "comment"
85
+
86
+ [smells.boolean_logic]
87
+ threshold = 4
88
+ enabled = true
89
+
90
+ [smells.file_complexity]
91
+ threshold = 66
92
+ enabled = true
93
+
94
+ [smells.return_statements]
95
+ threshold = 4
96
+ enabled = true
97
+
98
+ [smells.nested_control_flow]
99
+ threshold = 4
100
+ enabled = true
101
+
102
+ [smells.function_parameters]
103
+ threshold = 10
104
+ enabled = true
105
+
106
+ [smells.function_complexity]
107
+ threshold = 10
108
+ enabled = true
109
+
110
+ [smells.duplication]
111
+ enabled = true
112
+ threshold = 20
113
+
114
+ [[source]]
115
+ name = "default"
116
+ default = true
117
+
118
+ [[plugin]]
119
+ name = "actionlint"
120
+
121
+ [[plugin]]
122
+ name = "checkov"
123
+
124
+ [[plugin]]
125
+ name = "golangci-lint"
126
+
127
+ [[plugin]]
128
+ name = "osv-scanner"
129
+
130
+ [[plugin]]
131
+ name = "prettier"
132
+
133
+ [[plugin]]
134
+ name = "ripgrep"
135
+
136
+ [[plugin]]
137
+ name = "ruff"
138
+ version = "0.5.3"
139
+
140
+ [[plugin]]
141
+ name = "shellcheck"
142
+
143
+ [[plugin]]
144
+ name = "shfmt"
145
+
146
+ [[plugin]]
147
+ name = "trivy"
148
+ drivers = [
149
+ "config",
150
+ "fs-vuln",
151
+ ]
152
+
153
+ [[plugin]]
154
+ name = "trufflehog"
155
+
156
+ [[plugin]]
157
+ name = "yamllint"
158
+
159
+ [[plugin]]
160
+ name = "black"
161
+
162
+ #[[plugin]]
163
+ #name = "flake8"
@@ -0,0 +1,13 @@
1
+ version: "2"
2
+
3
+ build:
4
+ os: "ubuntu-22.04"
5
+ tools:
6
+ python: "3.10"
7
+
8
+ python:
9
+ install:
10
+ - requirements: docs/requirements.txt
11
+
12
+ sphinx:
13
+ configuration: docs/source/conf.py