Skip to content

Commit

Permalink
Initial BLM Context Model
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMWhitehead authored and philipbaileynar committed Aug 7, 2024
1 parent 3d05625 commit cfc1d81
Show file tree
Hide file tree
Showing 14 changed files with 1,823 additions and 0 deletions.
62 changes: 62 additions & 0 deletions Workspaces/BLMContext.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"folders": [
{
"name": "🚀 BLM Context",
"path": "../packages/blm_context"
},
{
"name": "📦 RSCommons",
"path": "../lib/commons"
},
{
"name": "🤖 Cybercastor Automation Scripts",
"path": "../scripts/automation"
},
{
"name": "🧰 Workspaces",
"path": "."
},
{
"name": "🏠 Git Root",
"path": ".."
},
],
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"[python]": {
"editor.tabSize": 4,
"editor.formatOnSave": true,
},
"autopep8.args": [
"--max-line-length=240",
],
"pylint.args": [
"--extension-pkg-whitelist=pygeoprocessing",
"--disable=C0301,C0114,C0103,W0719,W0718",
"--max-line-length=240"
],
"python.analysis.extraPaths": ["../../lib/commons"],
"python.terminal.activateEnvironment": true,
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": true,
"files.watcherExclude": {
"**/*.egg-info/**": true,
"**/docs/**": true,
"**/*.pytest_cache/**": true,
"**/.venv/**": true,
"**/__pycache__/**": true
},
"search.exclude": {
"**/*.egg-info/**": true,
"**/*.pytest_cache/**": true,
"**/.venv/**": true,
"**/__pycache__/**": true
},
"files.exclude": {
"**/*.egg-info/**": true,
"**/*.pytest_cache/**": true,
"**/.venv/**": true,
"**/__pycache__/**": true
},
}
}
130 changes: 130 additions & 0 deletions packages/blm_context/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
.idea/workspace.xml
.jekyll-metadata
_site/
credentials.json
token.pickle
riverscapes_parameters.pickle

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.env.*
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
84 changes: 84 additions & 0 deletions packages/blm_context/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"inputs": [
{
"type": "promptString",
"id": "HUC",
"description": "What HUC?",
// "default": "17070202" // North Fork John Day
"default": "1706030607" // Really small HUC
// "default": "17060103" // Asotin
},
{
"type": "promptString",
"id": "VPU",
"description": "What VPU?",
// "default": "17070202" // North Fork John Day
"default": "1701" // Really small HUC
// "default": "17060103" // Asotin
}
],
"configurations": [
{
"name": "Generate BLM Context",
"request": "launch",
"type": "debugpy",
"module": "blm_context.blm_context",
"console": "integratedTerminal",
"args":[
"${input:HUC}",
"{env:DATA_ROOT}/blm_context/national",
"{env:DATA_ROOT}/rs_context/${input:HUC}",
"{env:DATA_ROOT}/vbet/${input:HUC}",
"{env:DATA_ROOT}/blm_context/${input:HUC}",
"--verbose",
"--debug"
]
},
{
"name": "BLM Context Metrics",
"type": "python",
"request": "launch",
"module": "blm_context.blm_context_metrics",
"console": "integratedTerminal",
"args": [
"{env:DATA_ROOT}/rs_context/${input:HUC}"
]
},
{
"name": "Write report",
"type": "python",
"request": "launch",
"module": "rscontext.rs_context_report",
"console": "integratedTerminal",
"args": [
"{env:DATA_ROOT}/rs_context/${input:HUC}/project.rs.xml",
"{env:DATA_ROOT}/rs_context/${input:HUC}/rsc_report.html"
]
},
{
"name": "Calculate Metrics",
"type": "python",
"request": "launch",
"module": "rscommons.classes.project_metrics",
"console": "integratedTerminal",
"args": [
"{env:DATA_ROOT}/rs_context/${input:HUC}/hydrology/nhdplushr.gpkg",
"{env:DATA_ROOT}/rs_context/${input:HUC}/project.rs.xml"
]
},
{
"name": "Version Bump",
"type": "python",
"module": "rscommons.version",
"args": [
"${workspaceFolder}/rscontext/__version__.py"
],
"request": "launch",
"console": "integratedTerminal"
}
]
}
Loading

0 comments on commit cfc1d81

Please sign in to comment.