Skip to content

Commit

Permalink
Merge pull request #133 from pastas/dev
Browse files Browse the repository at this point in the history
Release v1.6.0
  • Loading branch information
dbrakenhoff authored Aug 15, 2024
2 parents 8811db3 + a5b70f7 commit 20a579d
Show file tree
Hide file tree
Showing 26 changed files with 1,545 additions and 705 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,19 @@ jobs:
if: ${{ matrix.python-version == '3.12'}}
run: |
pip install --upgrade pip
pip install numpy
# TODO: remove numpy pin when numba or ? doesn't crash on NaN being deprecated
pip install "numpy<2.0"
pip install ${{ matrix.pastas-version }}
pip install -e .[test_py312]
- name: Run pytest
run: |
pytest -m "not bgmap"
pytest -m "not (bgmap or pastas150)"
- name: Test backgroundmap once
- name: Run all tests once
if: ${{ matrix.python-version == '3.11' && matrix.pastas-version == 'git+https://github.com/pastas/pastas.git@dev' }}
run: |
pytest -m "bgmap"
pytest -m ""
- name: Run codacy-coverage-reporter
if: ${{ github.repository == 'pastas/pastastore' && success() }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,5 @@ venv.bak/
.idea/workspace.xml

*/_old
examples/notebooks/pystore
cov.xml
*.bat
2 changes: 1 addition & 1 deletion docs/connectors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ the other directories when the model is loaded from the database.

ArcticDB
--------
Note: this Connector uses ArcticDB the next-generation version of Arctic. Requires arcticdb Python package.
Note: this Connector uses ArcticDB. Requires arcticdb Python package.

The :ref:`ArcticDBConnector` is an object that creates a
local database. This can be an existing or a new database.
Expand Down
4 changes: 2 additions & 2 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is stored in-memory (in dictionaries)::
import pastastore as pst

# define dict connector
conn = pst.DictConnect("my_db")
conn = pst.DictConnector("my_db")

# create project for managing Pastas data and models
store = pst.PastaStore(conn)
Expand Down Expand Up @@ -50,7 +50,7 @@ a `PastaStore` object::

import pastastore as pst

# define arctic connector
# define ArcticDB connector
uri = "lmdb://./my_path_here/"
conn = pst.ArcticDBConnector("my_db", uri)

Expand Down
14 changes: 11 additions & 3 deletions examples/notebooks/ex01_introduction_to_pastastore_databases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
"PyYAML version : 6.0\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"DeprecationWarning: As of Pastas 1.5, no noisemodel is added to the pastas Model class by default anymore. To solve your model using a noisemodel, you have to explicitly add a noisemodel to your model before solving. For more information, and how to adapt your code, please see this issue on GitHub: https://github.com/pastas/pastas/issues/735"
]
}
],
"source": [
Expand Down Expand Up @@ -1190,7 +1197,7 @@
"- `solve_models`: solve all or selection of models in database\n",
"- `model_results`: get results for all or selection of models in database. Requires the `art_tools` module!\n",
"\n",
"Let's add some more data to the pystore to show how the bulk operations work."
"Let's add some more data to the pastastore to show how the bulk operations work."
]
},
{
Expand All @@ -1202,6 +1209,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"The Time Series 'oseries2' has nan-values. Pastas will use the fill_nan settings to fill up the nan-values.\n",
"The Time Series 'oseries2' has nan-values. Pastas will use the fill_nan settings to fill up the nan-values.\n"
]
}
Expand Down Expand Up @@ -1285,7 +1293,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "15ac33d49a044a7a8367b8145287cc55",
"model_id": "3a1f6710cd1942a78adc916d56280bb4",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -1342,7 +1350,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a694566aa81a4df69a55e4c0d28397c8",
"model_id": "577068d685134722a0208d807122da7b",
"version_major": 2,
"version_minor": 0
},
Expand Down
20 changes: 14 additions & 6 deletions examples/notebooks/ex02_pastastore_plots_and_maps.ipynb

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion examples/notebooks/ex03_pastastore_yaml_interface.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"DeprecationWarning: As of Pastas 1.5, no noisemodel is added to the pastas Model class by default anymore. To solve your model using a noisemodel, you have to explicitly add a noisemodel to your model before solving. For more information, and how to adapt your code, please see this issue on GitHub: https://github.com/pastas/pastas/issues/735"
]
}
],
"source": [
"import logging\n",
"import os\n",
Expand Down
3 changes: 2 additions & 1 deletion pastastore/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,7 @@ def _parse_model_dict(self, mdict: dict, update_ts_settings: bool = False):
else:
msg = "stress '{}' not present in library".format(name)
raise KeyError(msg)

# hack for pcov w dtype object (when filled with NaNs on store?)
if "fit" in mdict:
if "pcov" in mdict["fit"]:
Expand Down Expand Up @@ -1534,7 +1535,7 @@ def _set_series_name(series, name):
if isinstance(series, pd.Series):
series.name = name
# empty string on index name causes trouble when reading
# data from Arctic VersionStores
# data from ArcticDB: TODO: check if still an issue?
if series.index.name == "":
series.index.name = None

Expand Down
Loading

0 comments on commit 20a579d

Please sign in to comment.