Skip to content

Commit

Permalink
Merge branch 'main' into joss
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Mar 5, 2024
2 parents 3c9f177 + 50b11a6 commit bdeb280
Show file tree
Hide file tree
Showing 74 changed files with 14,078 additions and 4,643 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -38,5 +38,5 @@ jobs:
tox -e clean,build
- name: Upload to PyPi
uses: pypa/[email protected].10
uses: pypa/[email protected].11

10 changes: 5 additions & 5 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
max-parallel: 6
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
platform:
- ubuntu-latest
- macos-latest
Expand All @@ -49,7 +49,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}${{ matrix.dev }}
- name: Install test requirements
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Run tests
run: |
pytest --cov=src/pyEQL --cov-report=xml
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand All @@ -69,7 +69,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install tox
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upgrade_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
package: ["."]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: '^docs/conf.py'
exclude: "^docs/conf.py"

default_stages: [commit]

Expand All @@ -12,10 +12,10 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.13
hooks:
- id: ruff
args: [--fix, --ignore, "D,E501"]
args: [--fix, --ignore, "D,E501", "--show-fixes"]

- repo: https://github.com/psf/black
rev: 23.9.1
Expand All @@ -39,3 +39,8 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
4 changes: 3 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ developed and maintained by the Kingsbury Lab at Princeton University.

Other contributors, listed alphabetically, are:

* @DhruvDuseja
* Kirill Pushkarev (@kirill-push)
* Dhruv Duseja (@DhruvDuseja)
* Andrew Rosen (@arosen93)
* Hernan Grecco (@hgrecco)

(If you think that your name belongs here, please let the maintainer know)
102 changes: 97 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,99 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed

- `Solution.__add_`: Bugfix in the addition operation `+` that could cause problems with
child classes (i.e., classes that inherit from `Solution`) to work improperly

### Changed

- Removed deprecated `pkg_resources` import in favor of `importlib.resources`

## [0.11.1] - 2023-12-23

### Added

- Add tests for `gibbs_mix` and `entropy_mix` functions. Format docstrings in Google style.

### Fixed

- `Solution.from_preset`: Fixed a packaging error that made this method fail with a `FileNotFoundError`.

### Removed

- `functions.py` is no longer imported into the root namespace. You'll now need to say `from pyEQL.functions import gibbs_mix`
instead of `from pyEQL import gibbs_mix`

## [0.11.0] - 2023-11-20

### Changed

- `PhreeqcEOS`: performance improvements for the `phreeqc` engine. The `EOS` instance now retains
the `phreeqpython` solution object in between calls, only re-initializing it if the composition
of the `Solution` has changed since the previous call.

### Fixed

- `equilibrate`: Fixed several bugs affecting `NativeEOS` and `PhreeqcEOS` in which calling `equilibrate()`
would mess up the charge balance. This was especially an issue if `balance_charge` was set to something
other than `pH`.

### Removed

- `equilibrium.equilibrate_phreeqc()` has been removed to reduce redundant code. All its
was absorbed into `NativeEOS` and `PhreeqcEOS`

## [0.10.1] - 2023-11-12

### Added

- utility function `create_water_substance` with caching to speed up access to IAPWS instances

### Changed

- `Solution.get_diffusion_coefficient`: the default diffusion coefficient (returned when D for a solute is not found in
the database) is now adjusted for temperature and ionic strength.
- `Solution.water_substance` - use the IAPWS97 model instead of IAPWS95 whenever possible, for a substantial speedup.

## [0.10.0] - 2023-11-12

### Added

- `Solution`: Revamped docstrings for `conductivity`, `get_transport_number`, `get_molar_conductivity`, and
`get_diffusion_coefficient`.
- `Solution`: new method `get_diffusion_coefficient` for dedicated retrieval of diffusion coefficients. This method
implements an improved algorithm for temperature adjustment and a new algorithm for adjusting infinite dilution D values
for ionic strengthe effects. The algorithm is identical to that implemented in PHREEQC >= 3.4.
- Database: empirical parameters for temperature and ionic strength adjustment of diffusion coefficients for 15 solutes
- Added tests for temperature and ionic strength adjustment and conductivity
- Docs: new tutorial notebooks
- Docs: remove duplicate contributing pages (Closes [#68](https://github.com/KingsburyLab/pyEQL/issues/68))
- `Solution`: new method `to_file()` for more convenient saving Solution object to json or yaml files. (@kirill-push)
- `Solution`: new method `from_file()` for more convenient loading Solution object from json or yaml files. (@kirill-push)
- `Solution`: new classmethod `from_preset()` to `replace pyEQL.functions.autogenerate()` and instantiate a solution from a preset composition. (@kirill-push)

### Changed

- `Solution`: method af adjusting diffusion coefficients for temperature was updated (same as used in PHREEQC >= 3.4)
- `Solution.conductvity`: improved equation (same as used in PHREEQC >= 3.4) which is more accurate at higher concentrations

### Fixed

- Database errors with `Cs[+1]` diffusion coefficient and `KBr` Pitzer parameters
- Restored filter that suppresses duplicate log messages

### Deprecated

- `replace pyEQL.functions.autogenerate()` is now deprecated. Use `from_preset` instead.

### Removed

- The `activity_correction` kwarg in `get_transport_number` has been removed, because this now occurs by default and is
handled in `get_diffusion_coefficient`.

## [0.9.2] - 2023-11-07

### Fixed
Expand Down Expand Up @@ -122,7 +215,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed


- `pyEQL.unit` was renamed to `pyEQL.ureg` (short for `UnitRegistry`) for consistency with the `pint` documentation and tutorials.

## [v0.6.0] - 2023-08-15
Expand All @@ -142,7 +234,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `pymatgen`, `monty`, and `maggma` as dependencies
- Add `pre-commit` configuration
- Add pull request template, new GitHub actions, and `tox -e autodocs` environment to serve and update docs in real time
- Add pre-commit configuration and lint with `ruff` using rulesets mostly borrowed from `pymatgen`
- Add pre-commit configuration and lint with `ruff` using rulesets mostly borrowed from `pymatgen`
- Add more comprehensive platform testing via `tox`

### Changed
Expand Down Expand Up @@ -172,9 +264,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.5.2] - 2020-04-21

- Fix breaking bug introduced by upstream pint change to avogadro_number
- Format project with black
- Misc. linting and docstring changes
- Fix breaking bug introduced by upstream pint change to avogadro_number
- Format project with black
- Misc. linting and docstring changes

## [0.5.0] 2018-09-19

Expand Down
Loading

0 comments on commit bdeb280

Please sign in to comment.