Skip to content

Commit a9d14da

Browse files
committed
Merge branch 'main' into Feature/ras_1d
2 parents 61a1a7c + 025cf0e commit a9d14da

24 files changed

Lines changed: 436 additions & 107 deletions

.github/workflows/continuous-integration.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
os: ["ubuntu-latest"]
2727

2828
runs-on: ${{ matrix.os }}
29+
environment: ci-env
2930

3031
steps:
3132
- uses: actions/checkout@v4
@@ -45,6 +46,15 @@ jobs:
4546
ruff check
4647
ruff format --check
4748
48-
- name: Test with pytest
49+
- name: Run tests with coverage
4950
run: |
50-
pytest
51+
pytest --cov=src --cov-report term-missing
52+
53+
- name: Run coverage
54+
run: |
55+
coverage xml
56+
57+
- name: Upload coverage reports to Codecov
58+
uses: codecov/codecov-action@v4.0.1
59+
with:
60+
token: ${{ secrets.CODECOV_TOKEN }}

.readthedocs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the OS, Python version and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: mambaforge-latest
13+
14+
# Build documentation in the "docs/" directory with Sphinx
15+
sphinx:
16+
configuration: docs/source/conf.py
17+
18+
# Optionally build your docs in additional formats such as PDF and ePub
19+
# formats:
20+
# - pdf
21+
# - epub
22+
23+
# Optional but recommended, declare the Python requirements required
24+
# to build your documentation
25+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
26+
conda:
27+
environment: docs/environment.yml

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
[![CI](https://github.com/fema-ffrd/rashdf/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/fema-ffrd/rashdf/actions/workflows/continuous-integration.yml)
33
[![Release](https://github.com/fema-ffrd/rashdf/actions/workflows/release.yml/badge.svg)](https://github.com/fema-ffrd/rashdf/actions/workflows/release.yml)
44
[![PyPI version](https://badge.fury.io/py/rashdf.svg)](https://badge.fury.io/py/rashdf)
5+
[![codecov](https://codecov.io/gh/fema-ffrd/rashdf/graph/badge.svg?token=CTIIONEHV1)](https://codecov.io/gh/fema-ffrd/rashdf)
6+
[![Documentation Status](https://readthedocs.org/projects/rashdf/badge/?version=latest)](https://rashdf.readthedocs.io/en/latest/?badge=latest)
57

68
Read data from [HEC-RAS](https://www.hec.usace.army.mil/software/hec-ras/) [HDF](https://github.com/HDFGroup/hdf5) files.
79

810
*Pronunciation: `raz·aitch·dee·eff`*
911

12+
## Documentation
13+
[rashdf on ReadTheDocs](http://rashdf.readthedocs.io/)
14+
1015
## Install
1116
```bash
1217
$ pip install rashdf
@@ -97,9 +102,6 @@ Example: write structures GeoJSON to `stdout`:
97102
$ rashdf structures Potomac.p01.hdf
98103
```
99104

100-
## Documentation
101-
Coming soon.
102-
103105
## Developer Setup
104106
Create a virtual environment in the project directory:
105107
```

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/environment.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: rashdf-docs
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python=3.9
7+
- pip
8+
- pip:
9+
- -e ../[docs]

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/RasGeomHdf.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
RasGeomHdf
2+
==========
3+
.. currentmodule:: rashdf
4+
.. autoclass:: RasGeomHdf
5+
:show-inheritance:
6+
:members: projection,
7+
mesh_area_names,
8+
mesh_areas,
9+
mesh_cell_polygons,
10+
mesh_cell_points,
11+
mesh_cell_faces,
12+
bc_lines,
13+
breaklines,
14+
refinement_regions,
15+
structures,
16+
get_geom_attrs,
17+
get_geom_structures_attrs,
18+
get_geom_2d_flow_area_attrs

docs/source/RasHdf.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
RasHdf
2+
======
3+
.. currentmodule:: rashdf
4+
.. autoclass:: RasHdf
5+
:show-inheritance:
6+
:special-members: __init__,
7+
open_uri

docs/source/RasPlanHdf.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
RasPlanHdf
2+
==========
3+
.. currentmodule:: rashdf
4+
.. autoclass:: RasPlanHdf
5+
:show-inheritance:
6+
:members: get_plan_info_attrs,
7+
get_plan_param_attrs,
8+
get_meteorology_precip_attrs,
9+
get_results_unsteady_attrs,
10+
get_results_unsteady_summary_attrs,
11+
get_results_volume_accounting_attrs

docs/source/_static/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)