sadiepy 0.0.1.dev0__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.
- sadiepy-0.0.1.dev0/.github/workflows/ci.yml +44 -0
- sadiepy-0.0.1.dev0/.gitignore +266 -0
- sadiepy-0.0.1.dev0/CHANGELOG.md +16 -0
- sadiepy-0.0.1.dev0/CITATION.cff +12 -0
- sadiepy-0.0.1.dev0/LICENSE +21 -0
- sadiepy-0.0.1.dev0/PKG-INFO +114 -0
- sadiepy-0.0.1.dev0/README.md +86 -0
- sadiepy-0.0.1.dev0/pyproject.toml +80 -0
- sadiepy-0.0.1.dev0/src/sadiepy/__init__.py +11 -0
- sadiepy-0.0.1.dev0/src/sadiepy/analysis/__init__.py +1 -0
- sadiepy-0.0.1.dev0/src/sadiepy/core/__init__.py +1 -0
- sadiepy-0.0.1.dev0/src/sadiepy/design/__init__.py +1 -0
- sadiepy-0.0.1.dev0/src/sadiepy/presets/__init__.py +1 -0
- sadiepy-0.0.1.dev0/src/sadiepy/py.typed +0 -0
- sadiepy-0.0.1.dev0/src/sadiepy/scaling/__init__.py +1 -0
- sadiepy-0.0.1.dev0/tests/test_package.py +12 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
name: Lint and type-check
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- name: Install
|
|
21
|
+
run: python -m pip install -e ".[dev]"
|
|
22
|
+
- name: Ruff (lint)
|
|
23
|
+
run: ruff check .
|
|
24
|
+
- name: Ruff (format)
|
|
25
|
+
run: ruff format --check .
|
|
26
|
+
- name: Mypy
|
|
27
|
+
run: mypy
|
|
28
|
+
|
|
29
|
+
test:
|
|
30
|
+
name: Tests (Python ${{ matrix.python-version }})
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: ${{ matrix.python-version }}
|
|
41
|
+
- name: Install
|
|
42
|
+
run: python -m pip install -e ".[dev]"
|
|
43
|
+
- name: Pytest
|
|
44
|
+
run: pytest
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
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
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Conda environments
|
|
163
|
+
conda-meta/
|
|
164
|
+
|
|
165
|
+
# Spyder project settings
|
|
166
|
+
.spyderproject
|
|
167
|
+
.spyproject
|
|
168
|
+
|
|
169
|
+
# Rope project settings
|
|
170
|
+
.ropeproject
|
|
171
|
+
|
|
172
|
+
# mkdocs/Zensical documentation
|
|
173
|
+
/site
|
|
174
|
+
|
|
175
|
+
# mypy
|
|
176
|
+
.mypy_cache/
|
|
177
|
+
.dmypy.json
|
|
178
|
+
dmypy.json
|
|
179
|
+
|
|
180
|
+
# Pyre type checker
|
|
181
|
+
.pyre/
|
|
182
|
+
|
|
183
|
+
# pytype static type analyzer
|
|
184
|
+
.pytype/
|
|
185
|
+
|
|
186
|
+
# Cython debug symbols
|
|
187
|
+
cython_debug/
|
|
188
|
+
|
|
189
|
+
# PyCharm
|
|
190
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
191
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
192
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
193
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
194
|
+
# .idea/
|
|
195
|
+
|
|
196
|
+
# Abstra
|
|
197
|
+
# Abstra is an AI-powered process automation framework.
|
|
198
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
199
|
+
# Learn more at https://abstra.io/docs
|
|
200
|
+
.abstra/
|
|
201
|
+
|
|
202
|
+
# Visual Studio Code
|
|
203
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
204
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
206
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
207
|
+
# .vscode/
|
|
208
|
+
# Temporary file for partial code execution
|
|
209
|
+
tempCodeRunnerFile.py
|
|
210
|
+
|
|
211
|
+
# Ruff stuff:
|
|
212
|
+
.ruff_cache/
|
|
213
|
+
|
|
214
|
+
# PyPI configuration file
|
|
215
|
+
.pypirc
|
|
216
|
+
|
|
217
|
+
# Marimo
|
|
218
|
+
marimo/_static/
|
|
219
|
+
marimo/_lsp/
|
|
220
|
+
__marimo__/
|
|
221
|
+
|
|
222
|
+
# Streamlit
|
|
223
|
+
.streamlit/secrets.toml
|
|
224
|
+
|
|
225
|
+
# Additional Python hidden files
|
|
226
|
+
.env.*
|
|
227
|
+
!.env.example
|
|
228
|
+
.venv*/
|
|
229
|
+
.benchmarks/
|
|
230
|
+
.pyright/
|
|
231
|
+
.virtual_documents/
|
|
232
|
+
.ipython/
|
|
233
|
+
.jupyter/
|
|
234
|
+
.pdm.toml
|
|
235
|
+
.uv-cache/
|
|
236
|
+
|
|
237
|
+
# macOS
|
|
238
|
+
# General
|
|
239
|
+
.DS_Store
|
|
240
|
+
.AppleDouble
|
|
241
|
+
.LSOverride
|
|
242
|
+
Icon
|
|
243
|
+
# Thumbnails
|
|
244
|
+
._*
|
|
245
|
+
|
|
246
|
+
# Files that might appear in the root of a volume
|
|
247
|
+
.DocumentRevisions-V100
|
|
248
|
+
.fseventsd
|
|
249
|
+
.Spotlight-V100
|
|
250
|
+
.TemporaryItems
|
|
251
|
+
.Trashes
|
|
252
|
+
.VolumeIcon.icns
|
|
253
|
+
.com.apple.timemachine.donotpresent
|
|
254
|
+
|
|
255
|
+
# Directories potentially created on remote AFP share
|
|
256
|
+
.AppleDB
|
|
257
|
+
.AppleDesktop
|
|
258
|
+
Network Trash Folder
|
|
259
|
+
Temporary Items
|
|
260
|
+
.apdisk
|
|
261
|
+
|
|
262
|
+
# iCloud generated files
|
|
263
|
+
*.icloud
|
|
264
|
+
|
|
265
|
+
# Claude Code project files (local only)
|
|
266
|
+
.claude/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
6
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Project scaffold: `pyproject.toml` (hatchling, `src/` layout), package skeleton
|
|
13
|
+
(`core`, `presets`, `scaling`, `analysis`, `design`), smoke tests.
|
|
14
|
+
- Tooling: pytest, ruff (lint and format), mypy (strict).
|
|
15
|
+
- GitHub Actions CI: lint/type-check job and test matrix for Python 3.10–3.12.
|
|
16
|
+
- `README.md`, `CITATION.cff`, `CHANGELOG.md`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it using the metadata from this file."
|
|
3
|
+
title: "SADIE: Simulation, Analysis, and Design In Ecohydraulics"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- given-names: Mallory
|
|
7
|
+
family-names: Byers
|
|
8
|
+
email: mgbyers@ucsc.edu
|
|
9
|
+
affiliation: "Independent Researcher, University of California, Santa Cruz"
|
|
10
|
+
repository-code: "https://github.com/malbye/sadiepy"
|
|
11
|
+
license: MIT
|
|
12
|
+
version: 0.0.1.dev0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mallory Byers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sadiepy
|
|
3
|
+
Version: 0.0.1.dev0
|
|
4
|
+
Summary: Physics-based prediction of wave damping by vegetation, with tradespace tools for designing and analysing flume experiments.
|
|
5
|
+
Project-URL: Repository, https://github.com/malbye/sadiepy
|
|
6
|
+
Project-URL: Issues, https://github.com/malbye/sadiepy/issues
|
|
7
|
+
Author-email: Mallory Byers <mgbyers@ucsc.edu>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: coastal engineering,ecohydraulics,flume experiments,vegetation,wave attenuation
|
|
11
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: numpy>=1.24
|
|
22
|
+
Requires-Dist: scipy>=1.10
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
26
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# SADIE: Simulation, Analysis, and Design In Ecohydraulics
|
|
30
|
+
|
|
31
|
+
<!-- Badges to add once each exists: PyPI version, Python versions, documentation, DOI (Zenodo). -->
|
|
32
|
+
[](https://github.com/malbye/sadiepy/actions/workflows/ci.yml)
|
|
33
|
+
[](https://github.com/malbye/sadiepy/blob/main/LICENSE)
|
|
34
|
+
|
|
35
|
+
> **Status:** early development (pre-release).
|
|
36
|
+
|
|
37
|
+
Physics-based prediction of wave damping by vegetation, with tradespace tools for
|
|
38
|
+
designing and analysing flume experiments.
|
|
39
|
+
|
|
40
|
+
SADIE (`sadiepy`) predicts wave attenuation through patches of coastal vegetation
|
|
41
|
+
(mangroves, salt marsh, seagrass, kelp, or user-defined) described as a vertical stack
|
|
42
|
+
of layers, using linear wave theory and the Dalrymple et al. (1984) energy-dissipation
|
|
43
|
+
framework. It supports flume experiment design before an experiment (tradespace
|
|
44
|
+
analysis of candidate designs) and data analysis after it (reflection separation,
|
|
45
|
+
damping-factor fitting, and drag-coefficient back-calculation).
|
|
46
|
+
|
|
47
|
+
Repository: [https://github.com/malbye/sadiepy](https://github.com/malbye/sadiepy)
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
SADIE requires Python 3.10–3.12. Install the latest release from PyPI:
|
|
52
|
+
```shell
|
|
53
|
+
pip install sadiepy
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Development Installation
|
|
57
|
+
|
|
58
|
+
To work with the source code, clone the repository and install the `sadiepy` library in "editable" mode:
|
|
59
|
+
```shell
|
|
60
|
+
git clone https://github.com/malbye/sadiepy.git
|
|
61
|
+
cd sadiepy
|
|
62
|
+
pip install -e .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Note: the following optional dependencies are available with bracket notation:
|
|
66
|
+
* `pip install -e ".[dev]"`: for development (unit testing, linting, and type checking)
|
|
67
|
+
|
|
68
|
+
## Development Tools
|
|
69
|
+
|
|
70
|
+
Development tools are applicable when working with the source code.
|
|
71
|
+
|
|
72
|
+
### Unit Tests
|
|
73
|
+
|
|
74
|
+
Run unit tests with pytest (installed with the `dev` optional dependencies):
|
|
75
|
+
```shell
|
|
76
|
+
pytest
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Run a subset of tests by file, or by a keyword expression with `-k`:
|
|
80
|
+
```shell
|
|
81
|
+
pytest tests/test_package.py -k "version"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Code Style
|
|
85
|
+
|
|
86
|
+
This project uses ruff for linting and formatting, applied from the project root:
|
|
87
|
+
```shell
|
|
88
|
+
ruff check .
|
|
89
|
+
ruff format .
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Type checking uses mypy in strict mode (configured in `pyproject.toml`):
|
|
93
|
+
```shell
|
|
94
|
+
mypy
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
This project is licensed under the MIT License — see
|
|
100
|
+
[LICENSE](https://github.com/malbye/sadiepy/blob/main/LICENSE) for details.
|
|
101
|
+
|
|
102
|
+
## Citation
|
|
103
|
+
|
|
104
|
+
If you use SADIE in your research, please cite it using the metadata in
|
|
105
|
+
[CITATION.cff](https://github.com/malbye/sadiepy/blob/main/CITATION.cff).
|
|
106
|
+
|
|
107
|
+
## Contact
|
|
108
|
+
|
|
109
|
+
Mallory Byers <mgbyers@ucsc.edu>
|
|
110
|
+
|
|
111
|
+
## Acknowledgements
|
|
112
|
+
|
|
113
|
+
Current Project Team
|
|
114
|
+
* Mallory Byers, Independent Researcher, University of California, Santa Cruz
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# SADIE: Simulation, Analysis, and Design In Ecohydraulics
|
|
2
|
+
|
|
3
|
+
<!-- Badges to add once each exists: PyPI version, Python versions, documentation, DOI (Zenodo). -->
|
|
4
|
+
[](https://github.com/malbye/sadiepy/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/malbye/sadiepy/blob/main/LICENSE)
|
|
6
|
+
|
|
7
|
+
> **Status:** early development (pre-release).
|
|
8
|
+
|
|
9
|
+
Physics-based prediction of wave damping by vegetation, with tradespace tools for
|
|
10
|
+
designing and analysing flume experiments.
|
|
11
|
+
|
|
12
|
+
SADIE (`sadiepy`) predicts wave attenuation through patches of coastal vegetation
|
|
13
|
+
(mangroves, salt marsh, seagrass, kelp, or user-defined) described as a vertical stack
|
|
14
|
+
of layers, using linear wave theory and the Dalrymple et al. (1984) energy-dissipation
|
|
15
|
+
framework. It supports flume experiment design before an experiment (tradespace
|
|
16
|
+
analysis of candidate designs) and data analysis after it (reflection separation,
|
|
17
|
+
damping-factor fitting, and drag-coefficient back-calculation).
|
|
18
|
+
|
|
19
|
+
Repository: [https://github.com/malbye/sadiepy](https://github.com/malbye/sadiepy)
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
SADIE requires Python 3.10–3.12. Install the latest release from PyPI:
|
|
24
|
+
```shell
|
|
25
|
+
pip install sadiepy
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Development Installation
|
|
29
|
+
|
|
30
|
+
To work with the source code, clone the repository and install the `sadiepy` library in "editable" mode:
|
|
31
|
+
```shell
|
|
32
|
+
git clone https://github.com/malbye/sadiepy.git
|
|
33
|
+
cd sadiepy
|
|
34
|
+
pip install -e .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Note: the following optional dependencies are available with bracket notation:
|
|
38
|
+
* `pip install -e ".[dev]"`: for development (unit testing, linting, and type checking)
|
|
39
|
+
|
|
40
|
+
## Development Tools
|
|
41
|
+
|
|
42
|
+
Development tools are applicable when working with the source code.
|
|
43
|
+
|
|
44
|
+
### Unit Tests
|
|
45
|
+
|
|
46
|
+
Run unit tests with pytest (installed with the `dev` optional dependencies):
|
|
47
|
+
```shell
|
|
48
|
+
pytest
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Run a subset of tests by file, or by a keyword expression with `-k`:
|
|
52
|
+
```shell
|
|
53
|
+
pytest tests/test_package.py -k "version"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Code Style
|
|
57
|
+
|
|
58
|
+
This project uses ruff for linting and formatting, applied from the project root:
|
|
59
|
+
```shell
|
|
60
|
+
ruff check .
|
|
61
|
+
ruff format .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Type checking uses mypy in strict mode (configured in `pyproject.toml`):
|
|
65
|
+
```shell
|
|
66
|
+
mypy
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
This project is licensed under the MIT License — see
|
|
72
|
+
[LICENSE](https://github.com/malbye/sadiepy/blob/main/LICENSE) for details.
|
|
73
|
+
|
|
74
|
+
## Citation
|
|
75
|
+
|
|
76
|
+
If you use SADIE in your research, please cite it using the metadata in
|
|
77
|
+
[CITATION.cff](https://github.com/malbye/sadiepy/blob/main/CITATION.cff).
|
|
78
|
+
|
|
79
|
+
## Contact
|
|
80
|
+
|
|
81
|
+
Mallory Byers <mgbyers@ucsc.edu>
|
|
82
|
+
|
|
83
|
+
## Acknowledgements
|
|
84
|
+
|
|
85
|
+
Current Project Team
|
|
86
|
+
* Mallory Byers, Independent Researcher, University of California, Santa Cruz
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sadiepy"
|
|
7
|
+
version = "0.0.1.dev0"
|
|
8
|
+
description = "Physics-based prediction of wave damping by vegetation, with tradespace tools for designing and analysing flume experiments."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Mallory Byers", email = "mgbyers@ucsc.edu" }]
|
|
14
|
+
keywords = [
|
|
15
|
+
"ecohydraulics",
|
|
16
|
+
"wave attenuation",
|
|
17
|
+
"vegetation",
|
|
18
|
+
"coastal engineering",
|
|
19
|
+
"flume experiments",
|
|
20
|
+
]
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
30
|
+
"Typing :: Typed",
|
|
31
|
+
]
|
|
32
|
+
dependencies = ["numpy>=1.24", "scipy>=1.10"]
|
|
33
|
+
|
|
34
|
+
[project.optional-dependencies]
|
|
35
|
+
dev = ["pytest>=8", "ruff>=0.6", "mypy>=1.11"]
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Repository = "https://github.com/malbye/sadiepy"
|
|
39
|
+
Issues = "https://github.com/malbye/sadiepy/issues"
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build.targets.wheel]
|
|
42
|
+
packages = ["src/sadiepy"]
|
|
43
|
+
|
|
44
|
+
# --- pytest -----------------------------------------------------------------
|
|
45
|
+
[tool.pytest.ini_options]
|
|
46
|
+
testpaths = ["tests"]
|
|
47
|
+
addopts = ["-ra", "--strict-markers", "--strict-config"]
|
|
48
|
+
markers = [
|
|
49
|
+
"validation: comparisons against published data (tolerances in tests/validation/targets.yaml)",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
# --- ruff -------------------------------------------------------------------
|
|
53
|
+
[tool.ruff]
|
|
54
|
+
line-length = 100
|
|
55
|
+
target-version = "py310"
|
|
56
|
+
src = ["src", "tests"]
|
|
57
|
+
|
|
58
|
+
[tool.ruff.lint]
|
|
59
|
+
select = [
|
|
60
|
+
"E", # pycodestyle errors
|
|
61
|
+
"W", # pycodestyle warnings
|
|
62
|
+
"F", # pyflakes
|
|
63
|
+
"I", # isort
|
|
64
|
+
"B", # flake8-bugbear
|
|
65
|
+
"UP", # pyupgrade
|
|
66
|
+
"NPY", # numpy-specific rules
|
|
67
|
+
"D", # pydocstyle
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[tool.ruff.lint.pydocstyle]
|
|
71
|
+
convention = "numpy"
|
|
72
|
+
|
|
73
|
+
[tool.ruff.lint.per-file-ignores]
|
|
74
|
+
"tests/**" = ["D"]
|
|
75
|
+
|
|
76
|
+
# --- mypy -------------------------------------------------------------------
|
|
77
|
+
[tool.mypy]
|
|
78
|
+
python_version = "3.10"
|
|
79
|
+
strict = true
|
|
80
|
+
files = ["src", "tests"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""SADIE: Simulation, Analysis, and Design In Ecohydraulics.
|
|
2
|
+
|
|
3
|
+
Physics-based prediction of wave damping by vegetation, with tradespace tools for
|
|
4
|
+
designing and analysing flume experiments.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from importlib.metadata import version as _version
|
|
8
|
+
|
|
9
|
+
__version__ = _version("sadiepy")
|
|
10
|
+
|
|
11
|
+
__all__ = ["__version__"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Analysis: post-experiment processing of flume data."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Simulation: linear wave theory, vegetation description, drag closures and solver."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Design: pre-experiment evaluation and tradespace analysis of flume experiments."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Vegetation presets with full citations."""
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Froude scaling between model and prototype."""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
|
|
3
|
+
import sadiepy
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_version_is_set() -> None:
|
|
7
|
+
assert sadiepy.__version__ == "0.0.1.dev0"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_subpackages_import() -> None:
|
|
11
|
+
for name in ("core", "presets", "scaling", "analysis", "design"):
|
|
12
|
+
importlib.import_module(f"sadiepy.{name}")
|