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

Feature: move database to modern .JSON format #25

Merged
merged 6 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}${{ matrix.dev }}
- name: Install pytest
- name: Install test requirements
run: |
python -m pip install pytest pytest-cov
python -m pip install --upgrade pip
pip install -e ".[testing]"
- name: Run tests
run: |
pip install -e .
pytest --cov=src/pyEQL --cov-report=xml
- uses: codecov/codecov-action@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/upgrade_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Only open a PR if the branch is not attached to an existing one
# note that this auto-created PR will not trigger the testing workflow, which
# is an intentional limitation imposed by GitHub. See
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
# The simplest workaround is to close and immediately re-open the Auto PR
run: |
PR=$(gh pr list --head auto-dependency-upgrades --json number -q '.[0].number')
if [ -z $PR ]; then
Expand Down
2 changes: 1 addition & 1 deletion docs/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ expect certain parameter names. The following are the currently-used internal
names:

- 'diffusion_coefficient' - diffusion coefficient
- 'pitzer_parameters_activity' - coefficients for the Pitzer model for activity correction
- 'model_parameters.activity_pitzer' - coefficients for the Pitzer model for activity correction
- 'pitzer_parameters_volume'- coefficients for the Pitzer model for partial molar volume
- 'erying_viscosity_coefficients' - coefficients for an Erying-type viscosity correction model
- 'partial_molar_volume'- the partial molar volume (used if Pitzer parameters are not available)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ no_implicit_optional = false
[tool.codespell]
ignore-words-list = "nd"
skip = 'tests/test_files/*'
exclude = 'src/pyEQL/database/pyeql_db.json'
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ install_requires =
pymatgen>=2022.0.17
iapws
monty
maggma

[options.packages.find]
where = src
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""
Setup file for pyEQL.
Use setup.cfg to configure your project.
Setup file for pyEQL.
Use setup.cfg to configure your project.

This file was generated with PyScaffold 4.5.
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
This file was generated with PyScaffold 4.5.
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""
from setuptools import setup

Expand Down
6 changes: 0 additions & 6 deletions src/pyEQL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,5 @@
# set the default string formatting for pint quantities
unit.default_format = "P~"

# this must be imported after instantiating the UnitRegistry()
from pyEQL.database import Paramsdb # noqa

# initialize the parameters database
paramsDB = Paramsdb()

from pyEQL.functions import * # noqa: E402, F403
from pyEQL.solution import Solution # noqa: E402
Loading