Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytest to deps and CI #5

Open
wants to merge 24 commits into
base: up-develop
Choose a base branch
from
Open

Add pytest to deps and CI #5

wants to merge 24 commits into from

Conversation

austinorr
Copy link

@austinorr austinorr commented Apr 29, 2024

This PR adds pytest to the optional project dependencies, and should get automated tests passing in CI (partially, there's another PR coming that fixes the packaging/install so that the cli works again).

pyproject.toml Outdated
@@ -14,7 +14,7 @@ description = "Hydrological Simulation Program - Python"
dependencies = [
"cltoolbox",
"numba",
"pandas",
"pandas>=1.5,<2",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should refactor all calls to df.append() since it's deprecated. use pandas.concat([df1, df2]) going forward

@@ -46,6 +46,11 @@ keywords = [
license = {file = "LICENSE"}
requires-python = ">=3.10"

[project.optional-dependencies]
slim = ["numba", "pandas"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of this library doesn't depend on the cli, so there can be a slim option. In fact, a better approach would be to move the dependency on cltoolbox to an optional dependency tag called cli = ["cltoolbox"].

timcera and others added 18 commits April 30, 2024 00:56
Fixes
* Allow the HDF filename to be passed to main function instead
  of only io_manager instance.  Having main only accept io_manager
  broke all ipython notebooks.
* Removed "print(table)" from readUCI which I think was a
  debugging statement.
IPython Notebook Fixes
* Edited some of the ipython notebooks that tried to find an
  element time-series with an old name, for example tried to
  find "SURO" instead of the new name "SURO_sum".
* Edited some of the ipython notebooks so that filenames were
  case sensitive.
Deprecations
* The append function is no longer available for DataFrames and
  changed to pd.concat form.
* In pandas 3.0, to_hdf will require the "key" to be a keyword
  argument instead of a positional argument and made that change
  now to silence the deprecation message.
Format
* Removed trailing spaces from some files.
* Fixed not a multiple of 4 spaces indentation in at least one file.
* Renamed files with spaces in their names, replacing spaces with "_".
Documentation
* Additional edits to the README.rst.
* Reshaped some docstrings into Numpy format.
…ease, for GENER operations and outputting mean values
misc fixes...
Merging this one in, will have a few touch-ups afterward to resolve this append/concat issue.
pyproject.toml -- attempt to add version dependency for pandas
…inning to allow test; TODO: refactor readUCI for pandas>=2
@austinorr austinorr force-pushed the pytest branch 2 times, most recently from ce4e237 to 10fcb7a Compare May 5, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants