Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
809 commits
Select commit Hold shift + click to select a range
73679cf
debug
Sep 26, 2022
0781855
add elifs
Sep 26, 2022
e3c1e8c
correct the match length
Sep 26, 2022
ccd6cc8
indicate enclsosure in IF
Sep 26, 2022
bd95f18
fix add to d
Sep 26, 2022
b922560
clean up if-then draft
Sep 27, 2022
43eb193
debug off
Sep 27, 2022
2541963
newline
rburghol Sep 27, 2022
be77ee6
ignore hdf5 in case someone tests in tree
rburghol Sep 27, 2022
76d4370
Merge pull request #102 from HARPgroup/psa
PaulDudaRESPEC Sep 30, 2022
9ae42b7
try fix to operation being stored as number instead of char
Oct 3, 2022
723830d
Merge branch 'psa' of github.com:HARPgroup/HSPsquared into psa
Oct 3, 2022
7227e35
pass by investigations
jdkleiner Oct 3, 2022
43b802b
OUTDGT, pass-by, hydr h5
jdkleiner Oct 3, 2022
4972094
Merge pull request #28 from HARPgroup/jk0923
jdkleiner Oct 3, 2022
fe04e36
Merge pull request #29 from respec/develop
rburghol Oct 4, 2022
1344e37
add tests
rburghol Oct 7, 2022
136b585
Merge branch 'specl' into psa
rburghol Oct 7, 2022
427a49e
Merge pull request #103 from HARPgroup/psa
PaulDudaRESPEC Oct 11, 2022
37882a3
Merge branch 'develop' of github.com:HARPgroup/HSPsquared into develop
jdkleiner Oct 19, 2022
8889841
SPECL initial PR
jdkleiner Oct 19, 2022
7b0f087
Update 3_DataVisualizationDemo.ipynb
aufdenkampe Oct 24, 2022
e656746
Merge pull request #104 from HARPgroup/specl
PaulDudaRESPEC Jan 11, 2023
06208d8
against develop this time
rburghol Mar 17, 2023
cee7f77
Merge pull request #110 from HARPgroup/hinit
PaulDudaRESPEC Mar 17, 2023
3ffc70e
correct OPNID lengths 8 and 12, make length 10 consistently
PaulDudaRESPEC Mar 17, 2023
c0cbeb3
Fix pip install bug when jupyter lab version restricted to 3.0.*
rburghol Jun 21, 2023
3132b9c
Fix pip install bug when jupyter lab version restricted to 3.0.*
rburghol Jun 21, 2023
98f9486
Fix pip install bug when jupyter lab version restricted to 3.0.*
rburghol Jun 21, 2023
4d1e023
remove extraneous debugging info
Jun 23, 2023
a2bcd05
removed testing code for OUTDGT set in ts
rburghol Jun 26, 2023
970840b
Merge branch 'develop' into fixjup
rburghol Jun 26, 2023
d1ae4b5
Merge pull request #69 from respec/develop
rburghol Jun 28, 2023
f58e4e0
Merge pull request #70 from HARPgroup/fixjup
rburghol Jun 28, 2023
a608414
Merge pull request #114 from HARPgroup/fixjup
PaulDudaRESPEC Jun 29, 2023
cf6342b
cleaned up specl and slimmed, restore OS setting
rburghol Jun 29, 2023
57021ea
Merge pull request #117 from HARPgroup/devfix
PaulDudaRESPEC Jun 29, 2023
137d40e
Merge pull request #75 from respec/develop
rburghol Jun 29, 2023
ebd6c78
Add support for STATE in HYDR, and specl and dynamic scripting for STATE
rburghol Jun 29, 2023
b76865b
add defaults
Jun 29, 2023
5b9ccf2
move comment
Jun 29, 2023
492b3a4
improve comments
Jun 29, 2023
07afbb8
ParseTable.csv -- correction for some UCI field widths
PaulDudaRESPEC Aug 29, 2023
b692c49
Merge pull request #119 from HARPgroup/devstate
PaulDudaRESPEC Aug 29, 2023
4306b26
remove files that were mistakenly committed here
PaulDudaRESPEC Sep 11, 2023
f89b478
implement constand value gener operations
PaulDudaRESPEC Sep 21, 2023
ea282fe
PSTEMP.py, PWATER.py, RQUAL_Class.py, utilities.py
PaulDudaRESPEC Sep 22, 2023
66efe6a
PQUAL.py, IQUAL.py, utilities.py -- small bug fix for proper computat…
PaulDudaRESPEC Sep 25, 2023
e6741f9
HTRCH small fix to conversion factor to better match HSPF
PaulDudaRESPEC Sep 27, 2023
d4ff5d1
HSP2_Driver.py -- add option for different save levels
PaulDudaRESPEC Sep 29, 2023
2bd17dc
first draft of segment expander script
PaulDudaRESPEC Oct 3, 2023
75dc4c3
first draft of segment expander script
PaulDudaRESPEC Oct 3, 2023
09833c1
IQUAL.py and PQUAL.py -- make sure NQUALS is an integer
PaulDudaRESPEC Oct 5, 2023
e6ffe97
SegmentExpander.py -- clear out unused P/I Ids after expansion
PaulDudaRESPEC Oct 5, 2023
3b0af99
utilities.py -- small fixes for get_gener_timeseries
PaulDudaRESPEC Oct 18, 2023
70d743c
HBNOutput.py -- small cleanup
PaulDudaRESPEC Oct 20, 2023
a6a73db
state.py -- modify messages
PaulDudaRESPEC Oct 24, 2023
ae969b0
Merge pull request #120 from respec/develop
PaulDudaRESPEC Oct 24, 2023
f813604
rename so custom code is not used automatically
PaulDudaRESPEC Oct 24, 2023
a9e2bdd
Merge pull request #121 from respec/develop
PaulDudaRESPEC Oct 24, 2023
8ff41fb
first cut at implementing other gener operations
PaulDudaRESPEC Oct 31, 2023
2d523ac
first draft of enhancement to allow output aggregated to daily, month…
PaulDudaRESPEC Nov 1, 2023
5121c90
Update _version.py
phobson Nov 27, 2023
531a6c0
Merge pull request #122 from phobson/patch-1
PaulDudaRESPEC Nov 27, 2023
d500044
small clean-ups to fully implement GENER operations
PaulDudaRESPEC Nov 27, 2023
385d7c3
Added a couple R files to ignore to keep the repo clean when includin…
rburghol Nov 29, 2023
6f0e3ba
Merge pull request #124 from HARPgroup/devignore
PaulDudaRESPEC Dec 1, 2023
edaf42a
Merge pull request #125 from respec/master
PaulDudaRESPEC Dec 15, 2023
1ca03cf
clean up details of ParseTable.csv
PaulDudaRESPEC Dec 15, 2023
86a6e5e
add hdf5 file name to output message
PaulDudaRESPEC Dec 20, 2023
f895dd9
refinements to include multiple canopy layer enhancement
PaulDudaRESPEC Dec 20, 2023
bc3909c
Changed package name from HSPsquared to hsp2 for a better name on pypi.
timcera Jan 18, 2024
5dc3112
Merge pull request #130 from timcera/package_name
PaulDudaRESPEC Jan 18, 2024
7f90ddb
Create python-app.yml
rburghol Feb 12, 2024
92bf071
Update python-app.yml
rburghol Feb 12, 2024
12d80e2
Update python-app.yml
rburghol Feb 12, 2024
dd6416e
Update python-app.yml
rburghol Feb 12, 2024
4b84b2e
Update python-app.yml
rburghol Feb 12, 2024
59247d0
Update python-app.yml
rburghol Feb 26, 2024
7024915
Create python-app1.yml
rburghol Feb 26, 2024
228fb6f
Update python-app.yml
rburghol Feb 26, 2024
dd149a3
Update python-app.yml
rburghol Feb 26, 2024
7d557fa
Update python-app.yml
rburghol Feb 26, 2024
2b8f2bd
delete superfluous workflow
Feb 26, 2024
1ba6520
add actions folder to see if it fixes
Feb 26, 2024
9e779ea
Update python-app.yml
rburghol Feb 26, 2024
72582a5
Update python-app.yml
rburghol Feb 26, 2024
b26d428
disable the custom action yml to see if it still works (as tutorial s…
Feb 26, 2024
5ee2d3a
Merge branch 'master' of github.com:HARPgroup/HSPsquared
Feb 26, 2024
a097fdb
Update python-app.yml
rburghol Feb 26, 2024
609c423
Update python-app.yml
rburghol Feb 26, 2024
263eb38
Update python-app.yml
rburghol Feb 26, 2024
acf78a3
Update python-app.yml
rburghol Feb 26, 2024
c3152c6
add ptest
Feb 26, 2024
3ed9ad4
Merge branch 'master' of github.com:HARPgroup/HSPsquared
Feb 26, 2024
4a6685d
Update python-app.yml
rburghol Feb 26, 2024
7cf9cc2
Update python-app.yml
rburghol Feb 26, 2024
3cdb10d
Update python-app.yml
rburghol Feb 26, 2024
42aee45
Update python-app.yml
rburghol Feb 26, 2024
f8975c4
Update python-app.yml
rburghol Feb 27, 2024
a05260c
Update environment.yml
rburghol Feb 27, 2024
6b2704b
Update environment.yml
rburghol Feb 27, 2024
8a9cba8
Update python-app.yml
rburghol Feb 27, 2024
8d78ac4
Update python-app.yml
rburghol Feb 27, 2024
7ed255a
Create hsp2_dev_env
rburghol Feb 28, 2024
101f5cc
Update python-app.yml
rburghol Feb 28, 2024
37e0420
Update hsp2_dev_env
rburghol Feb 28, 2024
05a3cba
Update hsp2_dev_env
rburghol Feb 28, 2024
cbc26b1
dev environment test yml file
Feb 28, 2024
e36b2ac
Update hsp2-install-dev.yml
rburghol Feb 28, 2024
4cff9f8
Update hsp2-install-dev.yml
rburghol Feb 28, 2024
d045118
Update hsp2-install-dev.yml
rburghol Feb 28, 2024
a7dc209
Update hsp2-install-dev.yml
rburghol Feb 28, 2024
0ad9f20
dont save test h5 files
Feb 28, 2024
1b0bd68
initial set of tests for CI
Feb 28, 2024
0c43a1c
Merge pull request #90 from HARPgroup/testx
rburghol Feb 28, 2024
31746e4
update test file with hsp2 run
Feb 28, 2024
9436df3
add test of hdf5 exists
Feb 28, 2024
5341f76
add test of hdf5 exists
Feb 28, 2024
c64c8cc
rename pytest
Feb 28, 2024
371c1bd
rename pytest call
Feb 28, 2024
d2f5cae
add a failing test
Feb 28, 2024
2070ac2
format
Feb 28, 2024
dd89d8a
disble purposely failing test
Feb 28, 2024
095969c
adding new dev config from dependency_options branch
Feb 29, 2024
a20586b
set py to 3.11 in dev
Feb 29, 2024
771ae5f
info
Feb 29, 2024
6028aff
rename scripts to show install env (i.e. pip / conda)
Feb 29, 2024
99bb5f6
attempt a conda install tester
Feb 29, 2024
6b011a9
attempt a conda install tester
Feb 29, 2024
715af46
attempt a conda install tester
Feb 29, 2024
3dceaad
try looking for hsp2 in the CONDA path
Feb 29, 2024
c9e5a16
call hsp wihtout path
Feb 29, 2024
ad4bb22
Merge pull request #144 from respec/master
PaulDudaRESPEC Mar 5, 2024
2fab619
merge in minor additions
PaulDudaRESPEC Mar 6, 2024
f14ffec
merging in changes from HARPgroup
PaulDudaRESPEC Mar 6, 2024
ffda6b9
Merge branch 'develop' into testx
rburghol Mar 6, 2024
3e71d53
Merge pull request #142 from HARPgroup/testx
PaulDudaRESPEC Mar 6, 2024
b869306
only run tests on 3 branches
Mar 18, 2024
89896aa
Merge pull request #148 from HARPgroup/testx
PaulDudaRESPEC Apr 2, 2024
7f5ed03
Create CONTRIBUTING.md
PaulDudaRESPEC Apr 3, 2024
a213e4a
Update README.md
PaulDudaRESPEC Apr 3, 2024
5b8c4fe
ACIDPH.py is not yet valid python, preserving wip as text
austinorr Apr 19, 2024
a0e06cc
prepare for disabling the jit during tests to enable code coverage
austinorr Apr 19, 2024
ea815b0
tests passing for IWater and PWater under pytest with ~70% code coverage
austinorr Apr 19, 2024
3a410d9
(feat) change to a pyproject.toml to publish to pypi
timcera Apr 22, 2024
511ee65
(ci) update github workflows to work with pyproject.toml.
timcera Apr 23, 2024
cd16f0b
(fix) replaced mando with cltoolbox
timcera Apr 23, 2024
2d5b775
Merge pull request #151 from Geosyntec/ipwater-tests
PaulDudaRESPEC Apr 23, 2024
6612a73
Merge pull request #152 from timcera/pypi_package
PaulDudaRESPEC Apr 23, 2024
e883a44
README.md -- restore this file temporarily while resolving a merge co…
PaulDudaRESPEC Apr 23, 2024
dfca12d
Merge pull request #153 from respec/master
PaulDudaRESPEC Apr 23, 2024
f1b20d6
Delete README.md after resolving merge conflict
PaulDudaRESPEC Apr 23, 2024
08a53c7
misc fixes
timcera Apr 30, 2024
f830d74
fixes for publish.py and pyproject.toml
timcera Apr 30, 2024
781d026
this action does not work, it hangs indefinately
austinorr Apr 30, 2024
f7d361f
this action is not yet needed, should likely be a simple matrix in th…
austinorr Apr 30, 2024
492a3a1
Merge pull request #160 from Geosyntec/cleanup-actions
PaulDudaRESPEC Apr 30, 2024
df97557
OXRX_Class.py -- explicitly set tcginv and len_ to avoid future issue…
PaulDudaRESPEC May 1, 2024
19efe9d
Test10 -- fixed sedment option flag in the UCI
PaulDudaRESPEC May 1, 2024
9de9ad8
utilities.py and io.py -- small improvements to get into the next rel…
PaulDudaRESPEC May 1, 2024
aa76148
Merge pull request #159 from timcera/fix
PaulDudaRESPEC May 3, 2024
4516b2f
readUCI.py -- go back to old way fix_df for now
PaulDudaRESPEC May 3, 2024
099b56a
added pytest to deps and python application ci job
austinorr Apr 29, 2024
23e1b83
tests/test10/HSP2results fails due to df.append in readUCI line 86; p…
austinorr Apr 29, 2024
c1d2a68
rm no-op pytest since there is now an actual test to call
austinorr Apr 29, 2024
bbf7ceb
use this to manually hide personal files; todo: rm all the personal p…
austinorr May 4, 2024
314aa76
(fix) cleanup the utilities.versions function so that it can't fail a…
austinorr May 4, 2024
8262502
add pytest apparatus that works with test10, and hopefully others. mu…
austinorr May 4, 2024
06959de
refactor commands for reuse in test helpers
austinorr May 4, 2024
8e44644
lint pyproject.toml
austinorr May 4, 2024
84d2e11
support pandas versions 1.5-2+
austinorr May 5, 2024
5c1afaa
fix packaging bug that excluded data files for HSP2tools
austinorr May 5, 2024
e2e42f6
parallelize ci tests & lint; test python 3.9-3.12; test pandas<1.5 & …
austinorr May 5, 2024
e32573a
fix test suite to include 3.9
austinorr May 5, 2024
0ef882a
fix quotes for pandas version
austinorr May 5, 2024
8f4da0f
speed up tests not under coverage
austinorr May 5, 2024
d2aaa9a
Merge pull request #156 from Geosyntec/pytest
PaulDudaRESPEC May 6, 2024
5cf36b6
just hsp2/om specific stuff
May 6, 2024
35859d6
just hsp2/om specific stuff
May 6, 2024
c5cb65e
special actions and support files state and om
May 6, 2024
bdfaf47
special actions and support files state and om
May 6, 2024
4e8f0d3
change endings for HYDR.py
May 6, 2024
3f24431
change endings for SEDTRN.py
May 6, 2024
3718393
change endings for main.py
May 6, 2024
3ab1666
change endings for state.py
May 6, 2024
ceae46b
added test10specl.uci
May 7, 2024
4e7d50b
Merge changes that were reverted from https://github.com/respec/HSPsq…
May 7, 2024
acfa1e7
load specific functions instead of blanket import
May 7, 2024
bf7ebe9
load functions for ModelObject and SimTimer
May 7, 2024
657b805
load required functions for state into om
May 7, 2024
c898c9f
load required functions for state/om/specl explicitly into HYDR and S…
May 7, 2024
67d1031
corrected typo in the comment/header line in the specl UCIs
May 7, 2024
ed1d67f
added new UCI test from Paul
May 8, 2024
af9b71e
restored reversion for SEDTRN specl execution, fixed precision mismat…
May 8, 2024
ea60772
tests for spec actions
austinorr May 8, 2024
162c248
Merge pull request #100 from Geosyntec/spec-act
rburghol May 8, 2024
22a0233
better example in comments, no functional change
May 9, 2024
62d3118
Removed global ModelObject class attriutes. Fixed special actions tre…
May 9, 2024
573195a
cleaned up a couple remaining import statements
May 10, 2024
17f32c2
Renamed ModelConstant to ModelVariable since ModelConstant should be …
May 14, 2024
4f38c7a
Deleeted superfluous files
May 14, 2024
7dc3336
Deleted superfluous files
May 14, 2024
b8d07a8
Merge pull request #161 from HARPgroup/develop-spec-lean
PaulDudaRESPEC May 20, 2024
ce49ea2
Move to single python package "hsp2"
timcera May 22, 2024
bc587f8
Merge pull request #166 from timcera/develop
PaulDudaRESPEC May 24, 2024
7424140
remove some unneeded files prior to merging into main, comment out so…
PaulDudaRESPEC May 28, 2024
a86edc0
Merge pull request #167 from respec/develop
PaulDudaRESPEC Jun 19, 2024
249054e
Update pyproject.toml
PaulDudaRESPEC Jun 19, 2024
4145f6e
Merge pull request #169 from timcera/develop
PaulDudaRESPEC Jul 19, 2024
b0f342e
Merge pull request #169 from timcera/develop
PaulDudaRESPEC Jul 19, 2024
6e1cec2
Reformat/restyle files according to rules in .pre-commit-config.yaml
timcera Jul 27, 2024
3225f03
Reformat/restyle files according to rules in .pre-commit-config.yaml
timcera Jul 27, 2024
79a626b
Merge pull request #174 from timcera/ruff
PaulDudaRESPEC Aug 14, 2024
7279e8f
Merge pull request #174 from timcera/ruff
PaulDudaRESPEC Aug 14, 2024
9c72a2a
revised om.py from eq branch
Oct 1, 2024
5ef2dc2
migrate the rest of the changed things. state now passed in to all o…
Oct 1, 2024
65c0af9
added json test of equation to be parallel to SPECL tests
Oct 1, 2024
3eb17c0
finished draft testing of test10eq appears matching. Need to add data…
Oct 1, 2024
d0c420d
debug off
Oct 2, 2024
a5c2c42
debug off
Oct 2, 2024
f255726
ruff it
Oct 2, 2024
283148f
added pyparsing as requirement to run Equation
Oct 2, 2024
6115bfb
added pyparsing into pyproject.toml to enable Equation
Oct 2, 2024
e99feb6
Merge pull request #178 from HARPgroup/develop-eq
PaulDudaRESPEC Dec 3, 2024
d019b19
Added "pandas_offset_by_version" to address deprecated offset codes.
timcera Dec 15, 2024
378c9f7
Fixed example Notebook 1; updated conda env yml files
aufdenkampe Dec 16, 2024
77a1777
Example 2 & 3 notebooks run!
aufdenkampe Dec 16, 2024
1c2b894
Restore `__version__` in `__init__.py`
aufdenkampe Dec 16, 2024
30f8c9e
env minor typo
aufdenkampe Dec 16, 2024
4201ea9
Merge pull request #184 from respec/conda_tweaks
PaulDudaRESPEC Dec 17, 2024
2080d59
Merge pull request #183 from timcera/develop
PaulDudaRESPEC Dec 17, 2024
c8a15d7
Update env yml files to further release constraints & follow conventions
aufdenkampe Dec 17, 2024
9c1608c
Fixed version attribute for all modules for develop mode; Add module …
aufdenkampe Dec 17, 2024
3701c3d
Merge pull request #185 from respec/conda_tweaks
PaulDudaRESPEC Dec 17, 2024
177b75c
Merge branch 'develop' of github.com:HARPgroup/HSPsquared into develop
Mar 6, 2025
8b066c5
Merge branch 'develop' of github.com:HARPgroup/HSPsquared into develop
Mar 7, 2025
2c432ca
add function to grab batches of state values
Mar 7, 2025
054d95c
added demo stuff and some useful functions
Mar 7, 2025
736a0bb
organized files for demo
Mar 7, 2025
5f685aa
enabled equation SPECL component and added demo files for equation/sp…
Mar 8, 2025
009d61b
moved quation loop demo to examples
Mar 8, 2025
c627cee
apply ruff to changed files
Mar 10, 2025
fd78867
Merge pull request #187 from HARPgroup/develop-step
PaulDudaRESPEC Mar 12, 2025
f5ef8c4
SEDTRN.py, RQUAL_Class.py, GQUAL.py, HBNAliases.csv -- OSED subscript…
PaulDudaRESPEC Mar 25, 2025
7da710b
SEDMNT.py, state.py, main.py -- enable special actions from the PERL…
PaulDudaRESPEC Mar 25, 2025
8d401ba
RQUAL.py, RQUAL_Class.py, state.py, main.py -- enable special action…
PaulDudaRESPEC Mar 28, 2025
ebfdff9
GENER.py -- use default if k not set
PaulDudaRESPEC Apr 2, 2025
ab1ef2a
GENER.py and hdf.py -- implement GENER opcode 8 for power series
PaulDudaRESPEC Apr 8, 2025
eb844a7
Refactor "uci" names.
timcera Sep 12, 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
169 changes: 88 additions & 81 deletions .github/workflows/hsp2-pip-install-test.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,94 @@
---
name: Python application

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master", "develop", "develop-specact" ]
on: # yamllint disable-line rule:truthy
push:
branches: [master]
pull_request:
branches: [master, develop, develop-specact]

permissions:
contents: read
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics --exclude=build/*
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

test-pytest:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
pandas-version: [""]
include:
- python-version: "3.11"
pandas-version: "pandas>2.0"
coverage: true
- python-version: "3.11"
pandas-version: "pandas>1.5,<2.0"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install hsp2
run: |
# install the hsp2 executable
pip install .[dev]
- if: ${{ matrix.pandas-version }}
run: pip install "${{ matrix.pandas-version }}"
- if: ${{ matrix.coverage }}
run: |
# python coverage
NUMBA_DISABLE_JIT=1 pytest --cov --cov-branch --cov-report term-missing
- if: ${{ ! matrix.coverage }}
run: pytest

test-cmd:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install hsp2
run: |
# install the hsp2 executable
pip install .
- name: Run hsp2
run: |
# TODO: find much shorter test case.
hsp2 import_uci ./tests/test10/HSP2results/test10.uci _temp_test10.h5
hsp2 run _temp_test10.h5

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- name: Install dependencies
run: |
pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or
# undefined names
flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 \
--show-source --statistics --exclude=build/*
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 \
--max-line-length=127 --statistics

test-pytest:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
pandas-version: ['']
include:
- python-version: '3.11'
pandas-version: pandas>2.0
coverage: true
- python-version: '3.11'
pandas-version: pandas>1.5,<2.0
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install hsp2
run: |
# install the hsp2 executable
pip install .[dev]
- if: ${{ matrix.pandas-version }}
run: pip install "${{ matrix.pandas-version }}"
- if: ${{ matrix.coverage }}
run: |
# python coverage
NUMBA_DISABLE_JIT=1 pytest --cov --cov-branch --cov-report \
term-missing
- if: ${{ ! matrix.coverage }}
run: pytest

test-cmd:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install hsp2
run: |
# install the hsp2 executable
pip install .
- name: Run hsp2
run: |
# TODO: find much shorter test case.
hsp2 import_uci \
./tests/test10/HSP2results/test10.uci \
_temp_test10.h5
hsp2 run _temp_test10.h5
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tests/GLWACSO/HSP2results/hspp007.uci
tests/test_report_conversion.html

# Omit big files
tests/**/*.h5
tests/**/**/*.h5
tests/testcbp/HSP2results/*.csv

# R files
Expand Down
96 changes: 96 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

exclude: |
(?x)^(
.*\.hbn|
.*\.wdm|
.*\.hdf5|
.*\.h5
)$

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-xml
- id: end-of-file-fixer
exclude: notebooks/tstoolbox_plot_bash.sh
- id: fix-encoding-pragma
args: [--remove]
- id: mixed-line-ending
- id: trailing-whitespace
exclude: notebooks/tstoolbox_plot_bash.sh

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.5
hooks:
# Run the linter.
# Uncomment the following lines to enable the linter.
# Right now way to many things fail.
# - id: ruff
# types_or: [python, pyi, jupyter]
# args: [--fix]

# Run the linter sort imports.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--select, I, --fix]

# Run the formatter.
- id: ruff-format
types_or: [python, pyi, jupyter]

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
args: [--in-place, --spaces-indent-inline-array, '4']

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [--format, parsable, --strict]

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt

- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
args: [-s, bash]

- repo: https://github.com/lovesegfault/beautysh
rev: v6.2.1
hooks:
- id: beautysh
args: [--indent-size, '4']

- repo: https://github.com/asottile/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs

- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.28.0
hooks:
- id: commitizen
stages: [commit-msg]
33 changes: 18 additions & 15 deletions HSP2_Driver.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
import os, sys
import os
import sys

# print('in HSP2_Driver')
command_line = ""
# print('arg count ' + str(len(sys.argv)))
if len(sys.argv) >= 2:
# see if anything on command line
command_line = sys.argv[1]
print('command line' + command_line)
print("command line" + command_line)

# if given UCI, import to h5 file
# if given WDM, import to h5 file
# if given h5, run HSP2

from PyQt5.QtWidgets import QFileDialog, QApplication
from PyQt5.QtWidgets import QApplication, QFileDialog

application = QApplication(sys.argv)

if command_line == '':
file_filter = "Run HDF5 (*.h5) Full Output;;" \
"Run HDF5 (*.h5) Light Output;;" \
"Import UCI to HDF5 (*.uci);;" \
"Import WDM to HDF5 (*.wdm)"
filename, filetype = QFileDialog.getOpenFileName(None, 'HSP2 Open File...', '', file_filter)
if command_line == "":
file_filter = (
"Run HDF5 (*.h5) Full Output;;"
"Run HDF5 (*.h5) Light Output;;"
"Import UCI to HDF5 (*.uci);;"
"Import WDM to HDF5 (*.wdm)"
)
filename, filetype = QFileDialog.getOpenFileName(
None, "HSP2 Open File...", "", file_filter
)
else:
filename = command_line
filetype = ''
filetype = ""

file_ext = filename[-3:]
dir_name = os.path.dirname(filename)
Expand All @@ -33,12 +38,14 @@
if file_ext.upper() == "UCI":
h5_name = filename[:-3] + "h5"
from hsp2.hsp2tools.readUCI import readUCI

readUCI(filename, h5_name)
# readUCI('HSPF.uci', 'test.h5')

if file_ext.upper() == "WDM":
h5_name = filename[:-3] + "h5"
from hsp2.hsp2tools.readWDM import readWDM

readWDM(filename, h5_name)
# readWDM('GRICM.wdm', 'test.h5')
# readWDM('ZUMBROSCEN.WDM', 'test.h5')
Expand All @@ -52,11 +59,7 @@
io_manager = IOManager(hdf5_instance)

SaveLevel = True
if 'Light' in filetype:
if "Light" in filetype:
SaveLevel = False
main(io_manager, saveall=SaveLevel, jupyterlab=False)
# main('test.h5', saveall=True)




Loading
Loading