Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
c202587
add Intent.md (#20)
ktarbet Sep 15, 2023
dc39994
Intent (#21)
ktarbet Sep 15, 2023
fcee841
18 organize code into python package (#19)
FlowMatric Sep 22, 2023
278fe64
fixes issue #24
ktarbet Oct 10, 2023
9b64d78
support python 3.7, add another test
ktarbet Oct 10, 2023
097abd1
uncomment all tests
ktarbet Oct 10, 2023
e7c6ad0
Bump urllib3 from 2.0.4 to 2.0.6 (#25)
dependabot[bot] Oct 11, 2023
ee3945d
Bump urllib3 from 2.0.6 to 2.0.7 (#27)
dependabot[bot] Dec 4, 2023
7dace9c
start using unittest, add method for reading grids, and several clean…
ktarbet Dec 5, 2023
53ed262
add rainfall parser example program
ktarbet Mar 29, 2024
5f89566
refactoring/renames as suggested by @jvanaalsburg
ktarbet Mar 29, 2024
b634b8b
rename TimeSeries.dsspath to TimeSeries.id
ktarbet Mar 29, 2024
67f3716
fix duplicate Time
ktarbet Apr 17, 2024
a029c38
example: trim string data with strip() method
ktarbet Apr 17, 2024
ab9f9df
replace missing year =2007 in input file.
ktarbet Apr 19, 2024
e20dc60
add debug feature to rainfall_sim_parser.py
ktarbet Apr 19, 2024
02a2f1d
fix endTime in HecDSS
ktarbet Apr 23, 2024
945c963
support for paired data - includes several tests and another DSS exam…
ktarbet Apr 29, 2024
22da174
start grid branch
ktarbet Apr 29, 2024
524e439
example rainfall parser program updates
ktarbet May 2, 2024
20babeb
Added gridded data record type
oskarhurst May 2, 2024
6fd31f3
example rainfall parser program updates
ktarbet May 2, 2024
2715eb1
example rainfall parser program updates
ktarbet May 3, 2024
8248764
GriddedData Generate Range Table
oskarhurst May 6, 2024
55e5b9c
Added numpy and toml file
oskarhurst May 8, 2024
b2931f4
testing github actions
oskarhurst May 10, 2024
69b464c
Update publish-to-test-pypi.yml
oskarhurst May 10, 2024
7172c1b
Remove poetry
oskarhurst May 13, 2024
8cc8dea
update upload artifact version
oskarhurst May 13, 2024
134f486
makes sure uniform naming of artifact
oskarhurst May 13, 2024
3fe30f0
added testing
oskarhurst May 13, 2024
107a26f
file path fix
oskarhurst May 13, 2024
c26877a
install numpy
oskarhurst May 13, 2024
386cc1d
Testing on windows
oskarhurst May 13, 2024
30782da
add dll to repo
oskarhurst May 13, 2024
4f86edb
Update .gitignore
oskarhurst May 13, 2024
fc14966
Delete src/hecdss/lib/hecdss.dll
oskarhurst May 13, 2024
5f32f29
test downloading dll
oskarhurst May 13, 2024
a39b79d
install dependencies
oskarhurst May 13, 2024
064cbc7
remove zipfile
oskarhurst May 13, 2024
580f3a0
reorder testing
oskarhurst May 13, 2024
3410197
Update download_hecdss.py
oskarhurst May 13, 2024
36d2402
test on linux
oskarhurst May 13, 2024
7d92992
Update publish-to-test-pypi.yml
oskarhurst May 13, 2024
678c908
Update publish-to-test-pypi.yml
oskarhurst May 13, 2024
ca6c490
Update setup.cfg
oskarhurst May 13, 2024
9c1ee56
add email
ktarbet May 14, 2024
142a93b
Update setup.cfg
ktarbet May 14, 2024
7174a6a
Merge branch 'feature/grid'
oskarhurst May 14, 2024
ae5b769
Merge pull request #31 from HydrologicEngineeringCenter/feature/grid
oskarhurst May 14, 2024
21fee71
added Irregular timeseries and regular timeseries
oskarhurst May 22, 2024
1846e35
Readme updates
oskarhurst May 28, 2024
92b0617
add test for writing time-series data (#32)
ktarbet Jun 11, 2024
51e8efa
Merge pull request #34 from HydrologicEngineeringCenter/dev
oskarhurst Jun 24, 2024
712540c
fixing timeseries RecordTypeDict Checking (#35)
oskarhurst Jun 24, 2024
bb51185
update hecdss version (#36)
ktarbet Jun 24, 2024
b66d4d9
add support for Quality flags and update readme (#37)
ktarbet Jun 26, 2024
42781ee
update example (#38)
ktarbet Jul 3, 2024
490b73e
Update setup.cfg
ktarbet Aug 1, 2024
41a3dd0
Merge pull request #39 from HydrologicEngineeringCenter/ktarbet-patch-1
oskarhurst Aug 1, 2024
99ca9e5
Update __init__.py
ktarbet Aug 1, 2024
d124afe
Update setup.cfg
ktarbet Aug 1, 2024
48df006
Update setup.cfg
ktarbet Aug 1, 2024
7a1d932
Merge pull request #40 from HydrologicEngineeringCenter/ktarbet-patch-2
oskarhurst Aug 2, 2024
51cc153
rename file_manager (it is not a test)
ktarbet Aug 5, 2024
111b38b
add missing_data.dss
ktarbet Aug 5, 2024
7e47ad8
work in progress on DSS arrays
ktarbet Aug 6, 2024
2319287
some functionality of DSS arrays
ktarbet Aug 6, 2024
3a12bf2
Merge pull request #41 from HydrologicEngineeringCenter/housekeeper
oskarhurst Aug 7, 2024
0788864
finish initial implementation of arrays
ktarbet Aug 7, 2024
58ad777
Merge pull request #42 from HydrologicEngineeringCenter/feature/array
oskarhurst Aug 7, 2024
9da4207
tuneup RegularTimeSeries and it's test
ktarbet Aug 7, 2024
eb9250f
Merge pull request #43 from HydrologicEngineeringCenter/feature/array
oskarhurst Aug 7, 2024
151591e
Add testing for Pull Requests (#44)
ktarbet Aug 22, 2024
7a8e6e8
add CwmsUtility class for converting between DSS paths and CWMS time-…
ktarbet Aug 27, 2024
f8a5381
add __str__ method to dss_type (#46)
ktarbet Aug 28, 2024
c5b9cac
remove some LD_LIBRARY_PATH magic, and PATH hacking (#47)
ktarbet Aug 30, 2024
538b1da
start documentation (#48)
ktarbet Sep 5, 2024
8af7bd4
some simple cleanup (#51)
ktarbet Sep 5, 2024
6e295b4
fix gridded data import (#57)
sclaw Oct 18, 2024
bf95ea5
irregular_timeseries fix
oskarhurst Nov 13, 2024
ca34317
Added tests, fixed irregular and regular ts bugs, sec granularity
oskarhurst Dec 11, 2024
31bcaee
update version
oskarhurst Dec 11, 2024
66f8b8f
Update src/hecdss/dateconverter.py
oskarhurst Dec 11, 2024
1bc61ec
Update src/hecdss/dateconverter.py
oskarhurst Dec 11, 2024
d37b5e0
Update src/hecdss/dateconverter.py
oskarhurst Dec 11, 2024
2038f32
Update tests/test_regular_timeseries.py
oskarhurst Dec 11, 2024
7e958b6
Update second granularity system
oskarhurst Dec 12, 2024
7032556
Restructure array container and add Charles suggestions
oskarhurst Dec 12, 2024
adeb784
Update sample7.dss
oskarhurst Dec 12, 2024
f0ca7f5
Update src/hecdss/dateconverter.py
oskarhurst Dec 12, 2024
d8de66e
Update dateconverter.py
oskarhurst Dec 12, 2024
41e678b
Update hecdss.py
oskarhurst Dec 13, 2024
17616bc
Merge pull request #59 from HydrologicEngineeringCenter/Irregular_tim…
oskarhurst Dec 13, 2024
dbfc0c2
Update publish-to-test-pypi.yml (#61)
oskarhurst Dec 16, 2024
66f27f8
run all tests in directory
ktarbet Dec 16, 2024
eb7a27e
Merge pull request #63 from HydrologicEngineeringCenter/workflow/tests
oskarhurst Dec 16, 2024
33256e0
Path file auto close (#64)
oskarhurst Dec 17, 2024
a691db5
Fix for case insensitive catalog (#62)
ktarbet Dec 17, 2024
d89c089
update tests and readme to use context manager protocol (with) (#66)
ktarbet Jan 8, 2025
ca9580c
rename method (#68)
ktarbet Jan 27, 2025
aef5af0
Added support for numpy arrays with NaN values in GriddedData.create …
akadlof Feb 18, 2025
18c0884
update hecdss.dll to 7-IU-6 (#72)
ktarbet Feb 19, 2025
34c0a8c
Time path and get full period bug fix
oskarhurst Feb 19, 2025
7afb732
add empty block test
oskarhurst Feb 19, 2025
0f660ab
change version
oskarhurst Feb 19, 2025
f545787
Merge pull request #73 from HydrologicEngineeringCenter/TimePattern/G…
oskarhurst Feb 20, 2025
6b1f954
documentation for user classes (#75)
ktarbet Mar 20, 2025
d2cf5bd
Update test_gridded_data.py (#76)
ktarbet Mar 21, 2025
732b953
add notes and methods to cwms_utility.py (#78)
ktarbet Mar 21, 2025
2eeb2ad
Add support for location info
oskarhurst Apr 9, 2025
96a17dd
delete commented tests
oskarhurst Apr 9, 2025
7c934a1
Merge branch 'main' into location_info
oskarhurst Apr 9, 2025
bf0e289
Update test_location_info.py
oskarhurst Apr 16, 2025
b54d5fd
Merge pull request #79 from HydrologicEngineeringCenter/location_info
oskarhurst Apr 16, 2025
c932c6c
Misc updates
perrymanmd Apr 17, 2025
9faab97
Misc updates (#80)
perrymanmd Apr 17, 2025
4629af3
Merge branch 'main' of https://github.com/HydrologicEngineeringCenter…
perrymanmd Apr 17, 2025
cdcbd7e
Adjust start/end times to valid range for RegularTimeSeries retrieval
perrymanmd Apr 21, 2025
8f55338
Fix time window handling for regular TS retrieve and add optional tri…
perrymanmd Apr 23, 2025
da14ec3
Fix logic bust
perrymanmd Apr 23, 2025
f9ddefb
Merge pull request #85 from HydrologicEngineeringCenter/fix+enhance/_…
perrymanmd Apr 24, 2025
1377a82
Delete-and-TimeZone
oskarhurst Apr 24, 2025
bb96419
Merge branch 'main' into Delete-and-TimeZone
oskarhurst Apr 24, 2025
75aacc8
Update hecdss.py
oskarhurst Apr 24, 2025
976b62d
Update test.yml
oskarhurst Apr 24, 2025
3ba9e1e
Update test.yml
oskarhurst Apr 24, 2025
b75ab16
Merge pull request #86 from HydrologicEngineeringCenter/Delete-and-Ti…
oskarhurst Apr 25, 2025
09e3cc4
TS Pattern (#87)
oskarhurst May 21, 2025
bd9f227
Ts pattern (#88)
oskarhurst May 21, 2025
825a4c9
Update regular_timeseries.py
oskarhurst Jun 13, 2025
a4ffefd
Fix value order for paired data w/ multiple curves
perrymanmd Jun 20, 2025
307a994
Update version to 0.1.23
perrymanmd Jun 20, 2025
3e16570
Fix mult-curve value order when storing to DSS
perrymanmd Jun 20, 2025
34a1175
Merge pull request #93 from HydrologicEngineeringCenter/bugfix/paired…
perrymanmd Jun 20, 2025
b64eeb0
update setup.cfg to version 0.1.23
perrymanmd Jun 20, 2025
f74d870
Merge pull request #94 from HydrologicEngineeringCenter/update/v_0.1.23
perrymanmd Jun 20, 2025
b8adab0
Set `pythonpath = "./src"` on `pytest.ini_options`
dwr-zroy Jun 30, 2025
cb4ef15
Remove modifications to `sys.path`, run `isort`
dwr-zroy Jun 30, 2025
d19d731
Merge pull request #95 from dwr-zroy/tests/clean-imports
oskarhurst Jul 2, 2025
fc91e14
Merge pull request #92 from HydrologicEngineeringCenter/1month
oskarhurst Jul 2, 2025
eb97f25
Gridded data publish (#96)
oskarhurst Jul 3, 2025
1887a34
Update issue templates
oskarhurst Jul 3, 2025
0e9f3c3
Correct computation of date/times for most-used calendar intervals (#97)
perrymanmd Jul 9, 2025
39b22f8
send data pointer and use excedence mask
oskarhurst Jul 16, 2025
6d55f43
update version
oskarhurst Jul 16, 2025
3fcd1f5
Merge pull request #98 from HydrologicEngineeringCenter/cumulus_speedup
oskarhurst Jul 16, 2025
82515da
update pip install instructions (#99)
ktarbet Aug 11, 2025
ef39067
Add notes on message levels to docstrings and Readme
mxkpp Sep 12, 2025
0066aef
Catch when bad time zone is found and proceed with out any zone infor…
danhamill Sep 15, 2025
a2ffbc3
Clean up logging traceback to better encorperate ZoneInfo error.
danhamill Sep 15, 2025
76b2e95
Merge pull request #102 from HydrologicEngineeringCenter/Bugfix-ZoneI…
danhamill Sep 16, 2025
5112619
Merge pull request #101 from Dewberry/docs/message_levels
oskarhurst Sep 17, 2025
11b126c
update
oskarhurst Sep 22, 2025
089993b
Merge pull request #105 from HydrologicEngineeringCenter/update-version
oskarhurst Sep 22, 2025
fbe98e2
text data type support (#108)
ktarbet Oct 14, 2025
f478383
Fix for reading text records. (#109)
perrymanmd Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[flake8]
select = B,B9,C,D,DAR,E,F,N,RST,S,W
ignore = E203,E501,RST201,RST203,RST301,W503,D205,D415,S101,RST304
max-line-length = 100
max-complexity = 10
docstring-convention = google
per-file-ignores = tests/*:S101,F401,F811
rst-roles = class,const,func,meth,mod,ref
rst-directives = deprecated
# exclude = tests/*
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/*.so filter=lfs diff=lfs merge=lfs -text
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report---feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report / Feature Request
about: Bug Report / Feature Request
title: ''
labels: ''
assignees: ''

---

# Bug Report

**IMPORTANT**
If your bug involves a specific DSS file, please ZIP it and attach the ZIP archive to your issue.

## Description
A clear and concise description of what the bug is.

## Steps to Reproduce
1. **Environment**
- Python version: e.g. `3.9.12`
- Package version: e.g. `hecdss==0.1.10`
- Operating System: e.g. Windows 10, macOS 12
2. **Script**
```python
from hecdss import HecDss

with HecDss.open("file") as dss:
ts=dss.get("path")
3.**DSS file**
Attach DSS file.

Note: GitHub strips large binaries, so always ZIP before attaching.

Additional Context
Add any other context about the problem here (logs, screenshots, etc.).
212 changes: 212 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
name: Deployment

# The deployment workflow should only run when changes are merged into the `main` branch.
# Since a branch protection rule prevents directly pushing to `main` this workflow will
# only run on a successful merge request.
on:
push:
branches:
- main

# Allow the workflow to be manually triggered from the Actions tab.
workflow_dispatch:

jobs:
# Build and test the distribution before deploying to the various platforms. This allows
# us to store the build artifacts and reuse them in the deployment jobs below.
build:
name: Build Distribution
runs-on: ubuntu-latest

needs: [testing]
steps:
- uses: actions/checkout@v4

- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

# - name: Install Poetry
# uses: abatilo/actions-poetry@v3
#
# - name: Cache Virtual Environment
# uses: actions/cache@v4
# with:
# path: ./.venv
# key: venv-${{ hashFiles('poetry.lock') }}
#
# - name: Install Dependencies
# run: poetry install

# The tests should have already been run in the testing workflow, but we run them
# again here to make sure that we do not deploy a broken distribution.
# - name: Run Tests
# run: poetry run pytest tests/

# Once the tests have passsed we can build the distribution and store it, so it can
# be accessed in the jobs below.
# - name: Build Distribution
# run: poetry build
#
# - name: Store Distribution
# uses: actions/upload-artifact@v4
# with:
# name: package-dist
# path: dist/
- name: Install requests
run: pip install requests

- name: add dll
run: python3 src/hecdss/download_hecdss.py

- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: package-dist
path: dist/

testing:
name: testing HECDSS functions
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install requests
run: pip install requests

- name: add dll
run: python3 src/hecdss/download_hecdss.py

- name: Install Packages
run: pip install pytest

- name: Install numpy
run: pip install numpy

- name: Install tzdata (Python)
run: pip install tzdata

- name: Run tests
run: pytest tests/

# The development distribution is a snapshot of the package and is deployed each time
# changes are merged into the main branch.
deploy-dev:
name: Publish Development Distribution
runs-on: ubuntu-latest

# The distribution will only be published if the tests have passed.
needs:
- build
- testing

# Set up the environment for trusted publishing on PyPI.
environment:
name: development
url: https://test.pypi.org/p/hecdss

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download Distribution
uses: actions/download-artifact@v4
with:
name: package-dist
path: dist/

- name: Publish Distribution To Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

# The release distribution is published whenever a tagged branch is merged into the main
# branch.
deploy-release:
name: Publish Release Distribution
runs-on: ubuntu-latest

# Require a tag push to publish a release distribution.
# if: >
# startsWith(github.ref, 'refs/tags/')
# || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '')

# The distribution will only be published if the tests have passed.
needs:
- build
- testing

# Set up the environment for trusted publishing on PyPI.
environment:
name: release
url: https://pypi.org/p/hecdss

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download Distribution
uses: actions/download-artifact@v4
with:
name: package-dist
path: dist/

- name: Publish Distribution To PyPI
uses: pypa/gh-action-pypi-publish@release/v1

# Upload a GitHub release whenever a release distribution is published.
github-release:
name: Create Signed GitHub Release
runs-on: ubuntu-latest

# GitHub releases are only uploaded for release (tagged) distributions.
needs:
- deploy-release
- build

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download Distribution
uses: actions/download-artifact@v4
with:
name: package-dist
path: dist/

- name: Sign Distribution
uses: sigstore/[email protected]
with:
inputs: |
./dist/*.tar.gz
./dist/*.whl

- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create '${{ github.ref_name }}' \
--repo '${{ github.repository }}' \
--notes ""

- name: Upload GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |-
gh release upload '${{ github.ref_name }}' dist/** \
--repo '${{ github.repository }}'
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
pull_request:
types: [opened, edited, synchronize]

# Allow the workflow to be manually triggered from the Actions tab.
workflow_dispatch:

jobs:
testing:
name: testing HECDSS functions
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v4

# On all platforms install the PyPI tzdata distribution
# (stdlib zoneinfo will auto‐pick it up; the backport will too)
- name: Install tzdata (Python)
run: pip install tzdata

- name: Install runtime dependencies
run: |
pip install requests
pip install numpy
pip install pytest

- name: add dll
run: python3 src/hecdss/download_hecdss.py

- name: Run tests
run: pytest tests

45 changes: 45 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: update-version

# The deployment workflow should only run when changes are merged into the `main` branch.
# Since a branch protection rule prevents directly pushing to `main` this workflow will
# only run on a successful merge request.
on:
# Allow the workflow to be manually triggered from the Actions tab.
workflow_dispatch:
inputs:
tag_name:
description: 'If you want to update the version and release, type an existing or new version tag (eg. 1.2.0)'
required: false
default: ''

jobs:

update-version:
name: Update Version
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != '' }}
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Update version in pyproject.toml
run: |
sed -i "s/^version = .*/version = \"${{ github.event.inputs.tag_name }}\"/" pyproject.toml

- name: Update version in setup.cfg
run: |
sed -i "s/^version = .*/version = ${{ github.event.inputs.tag_name }}/" setup.cfg

- name: Commit and push version update
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml setup.cfg
git commit -m "chore: update version to ${{ github.event.inputs.tag_name }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
__pycache__/**
.mypy_cache/
# /.coverage
# /.coverage.*
# /.nox/
/.python-version
/.pytype/
/dist/
# /docs/_build/
/src/*.egg-info/
__pycache__/
.vscode
tests/data/**/tmp/*
hecdss.dll
libhecdss.so
.idea
.ipynb_checkpoints
9 changes: 9 additions & 0 deletions INTENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


Licensing Intent

The intent is that this software and documentation ("Project") should be treated as if it is licensed under the license associated with the Project ("License") in the LICENSE.md file. However, because we are part of the United States (U.S.) Federal Government, it is not that simple.

The portions of this Project written by United States (U.S.) Federal government employees within the scope of their federal employment are ineligible for copyright protection in the U.S.; this is generally understood to mean that these portions of the Project are placed in the public domain.

In countries where copyright protection is available (which does not include the U.S.), contributions made by U.S. Federal government employees are released under the License. Merged contributions from private contributors are released under the License
File renamed without changes.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include src *
Loading