diff --git a/.gitignore b/.gitignore index f5e8694..993db7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,77 +1,241 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so -_site/ - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[codz] +*$py.class -# Logs and databases # -###################### -*.log -*.sql -*.sqlite +# C extensions +*.so -# OS generated files # -###################### -.DS_Store -.DS_Store? -.Spotlight-V100 -.Trashes -Icon? -ehthumbs.db -Thumbs.db - -# Vim swap files # -################## -*.swp - -# Python # -################# -*.pyc +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ *.egg-info/ -__pycache__/ -*.py[cod] -.env -.python-version +.installed.cfg +*.egg +MANIFEST -# pyenv # -######### -.python-version +# 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 -# Django # -################# -*.egg-info -.installed.cfg +# 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 +*.py.cover +.hypothesis/ +.pytest_cache/ +cover/ -# Front-End # -############# -node_modules/ -bower_components/ -.grunt/ -src/vendor/ -dist/ +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +#docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .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 + +# UV +# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +uv.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock +#poetry.toml + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python. +# https://pdm-project.org/en/latest/usage/project/#working-with-version-control +#pdm.lock +#pdm.toml +.pdm-python +.pdm-build/ + +# pixi +# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control. +#pixi.lock +# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one +# in the .venv directory. It is recommended not to include this directory in version control. +.pixi + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.envrc +.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/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +*.idea +*.iml +# Abstra +# Abstra is an AI-powered process automation framework. +# Ignore directories containing user credentials, local state, and settings. +# Learn more at https://abstra.io/docs +.abstra/ + +# Visual Studio Code +# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore +# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore +# and can be added to the global gitignore or merged into this file. However, if you prefer, +# you could uncomment the following to ignore the entire vscode folder +# .vscode/ + +# Ruff stuff: +.ruff_cache/ + +# PyPI configuration file +.pypirc + +# Data +data/* + +# Cursor +# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to +# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data +# refer to https://docs.cursor.com/context/ignore-files +.cursorignore +.cursorindexingignore + +# Marimo +marimo/_static/ +marimo/_lsp/ +__marimo__/ + +_version.py + +*.zip +*.dbf +*.shp +*.prj +*.shx +*.gpkg +*.gpkg-shm +*.gpkg-wal +*.csv +*.parquet +*.tif +*.tfw +*.aux +*.htm +*.ovr +*.aux.xml +*.nc +*.vrt + +Pipfile +.vscode +.DS_Store + +# configs +config/ + +# logs +logs/ diff --git a/README.md b/README.md index 9c7fa93..643627b 100644 --- a/README.md +++ b/README.md @@ -1,107 +1,45 @@ -#### OWP Open Source Project Template Instructions +# Reference-Builds -1. Create a new project. -2. [Copy these files into the new project](#installation) -3. Update the README, replacing the contents below as prescribed. -4. Add any libraries, assets, or hard dependencies whose source code will be included - in the project's repository to the _Exceptions_ section in the [TERMS](TERMS.md). +This repo is meant to take OCONUS reference data products and convert them into reference-files that can be used in the [NGWPC/nhf-builds](https://github.com/NGWPC/nhf-builds/) Repository -- If no exceptions are needed, remove that section from TERMS. +## Data sources: +### Science Base +The NHDPlusHR is used for *PRVI* and *HI* and can be downloaded in HUC4 form through: +https://www.sciencebase.gov/catalog/item/57645ff2e4b07657d19ba8e8 -5. If working with an existing code base, answer the questions on the [open source checklist](opensource-checklist.md) -6. Delete these instructions and everything up to the _Project Title_ from the README. -7. Write some great software and tell people about it. +the zipped geopackage is required -> Keep the README fresh! It's the first thing people see and will make the initial impression. +Since reference 0.1.6, The USGS Reference Hydrofabric is used for *AK* and can be downloaded for the entire state here (as VPU 19). This change was made to include more coastal areas for better NWM support: +https://www.sciencebase.gov/catalog/item/6644f800d34e1955f5a42da9 -## Installation +the reference_19 geopackage is required -To install all of the template files, run the following script from the root of your project's directory: +### GeoGlows +Prior to reference 0.1.6, GeoGlows v2 was used for the *AK* reference and the code to use it is still present. The source files can be downloaded from the following location: +- http://geoglows-v2.s3-website-us-west-2.amazonaws.com/#hydrography/vpu=801/ +- http://geoglows-v2.s3-website-us-west-2.amazonaws.com/#hydrography/vpu=802/ +- http://geoglows-v2.s3-website-us-west-2.amazonaws.com/#hydrography/vpu=803/ +- http://geoglows-v2.s3-website-us-west-2.amazonaws.com/#hydrography/vpu=705/ -``` -bash -c "$(curl -s https://raw.githubusercontent.com/NOAA-OWP/owp-open-source-project-template/open_source_template.sh)" -``` - ---- - -# Project Title - -**Description**: Put a meaningful, short, plain-language description of what -this project is trying to accomplish and why it matters. -Describe the problem(s) this project solves. -Describe how this software can improve the lives of its audience. - -Other things to include: - -- **Technology stack**: Indicate the technological nature of the software, including primary programming language(s) and whether the software is intended as standalone or as a module in a framework or other ecosystem. -- **Status**: Alpha, Beta, 1.1, etc. It's OK to write a sentence, too. The goal is to let interested people know where this project is at. This is also a good place to link to the [CHANGELOG](CHANGELOG.md). -- **Links to production or demo instances** -- Describe what sets this apart from related-projects. Linking to another doc or page is OK if this can't be expressed in a sentence or two. - -**Screenshot**: If the software has visual components, place a screenshot after the description; e.g., - -![](https://raw.githubusercontent.com/NOAA-OWP/owp-open-source-project-template/master/doc/Screenshot.png) - -## Dependencies - -Describe any dependencies that must be installed for this software to work. -This includes programming languages, databases or other storage mechanisms, build tools, frameworks, and so forth. -If specific versions of other software are required, or known not to work, call that out. - -## Installation - -Detailed instructions on how to install, configure, and get the project running. -This should be frequently tested to ensure reliability. Alternatively, link to -a separate [INSTALL](INSTALL.md) document. - -## Configuration - -If the software is configurable, describe it in detail, either here or in other documentation to which you link. - -## Usage +the `catchment.parquet` and `streams_mapping.gpkg` files are required from each VPU -Show users how to use the software. -Be specific. -Use appropriate formatting when showing code snippets. +### saved location -## How to test the software +This data only needs to be unzipped in it's "domain" folder for it to be picked up by the example scripts +![alt text](docs/img/hierarchy.png) -If the software includes automated tests, detail how to run those tests. -## Known issues +## Quick Start -Document any known significant shortcomings with the software. - -## Getting help - -Instruct users how to get help with this software; this might include links to an issue tracker, wiki, mailing list, etc. - -**Example** - -If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker. - -## Getting involved - -This section should detail why people should get involved and describe key areas you are -currently focusing on; e.g., trying to get feedback on features, fixing certain bugs, building -important pieces, etc. - -General instructions on _how_ to contribute should be stated with a link to [CONTRIBUTING](CONTRIBUTING.md). - ---- - -## Open source licensing info - -These links must be included in the final version of your project README (keep this section, -as is, but remove this sentence): - -1. [TERMS](TERMS.md) -2. [LICENSE](LICENSE) - ---- +All dependencies can be installed through +``` +uv sync +``` -## Credits and references +and the example configs can be used to create the references once the data is downloaded -1. Projects that inspired you -2. Related projects -3. Books, papers, talks, or other sources that have meaningful impact or influence on this project +``` +uv run python builds/build_reference.py --config config/example_prvi.yaml +uv run python builds/build_reference.py --config config/example_hi.yaml +uv run python builds/build_reference.py --config config/example_ak.yaml +```