Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/linttest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: ["3.11", "3.12", "3.13", "3.14"]
pyver: ["3.12", "3.13", "3.14", "3.15"]

steps:
- name: Checkout
uses: actions/checkout@v6
Expand All @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
pyver: ["3.11", "3.12", "3.13", "3.14"]
pyver: ["3.12", "3.13", "3.14", "3.15"]

steps:
- name: Checkout
Expand All @@ -53,14 +53,14 @@ jobs:
container-name: "solver-blobs"
blob-name: "cplex_22.1.1.0-1_amd64.deb"
download-path: "."

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: ${{ matrix.pyver }}

- name: Install Dependencies
run: |
run: |
uv sync
sudo apt install -f ./cplex_22.1.1.0-1_amd64.deb

Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@
- Adds support for unconnected (dangling) ports by setting `all_dangling_port` to True.
- Adds support for `ECHO_DISABLE_PATH_WARNING` environment variable. This is enabled by default when running pytest.
- Adds [attrs](https://www.attrs.org/en/stable/index.html) as a project dependency.
- Adds support for Python 3.15 (drop support for Python 3.11)

#### Changes

- Prevent warnings for unconnected (dangling) ports on EVs.
- NewSolar node renamed ScaledSolar.
- Decomposes the large model modules into smaller more manageable modules.
- Decomposes the large model modules into smaller more manageable modules.
- Trying to add a port to a model with import/export contraints set to `FlowConstraint.Series` or `FlowConstraint.InRange` now raises a `NotImplementedError`.
- When setting active periods on a Port, the `set_active_periods_from_array` method now accepts a list of booleans in addition to a list of 0's and 1's.
- The `get_port` method on Node now returns None rather than raising a ValueError, if no such port with that name can be found.
- `verify_node` now called when adding nodes to models and `verify_node` modified to now verify not only check the node but also verify (via call to `verify_port`) any ports attached to the node.
- `verify_node` now called when adding nodes to models and `verify_node` modified to now verify not only check the node but also verify (via call to `verify_port`) any ports attached to the node.
- Fix: BoundedLoads call `nonnegative_load` validator instead of incorrect `nonnegative_costs` validator.
- Major: Migrated the codebase from pydantic V1 to [attrs](https://www.attrs.org/en/stable/index.html). See [Attrs Migration Guide](https://github.com/bsgip/echo/blob/main/attrs-migration.md) for more details.
- The ArrayType Class is replaced by a type alias (this was necessary for the migration from pydantic to attrs)

#### Removes

- Pydantic project dependency.
- Removes support for Python 3.11 (adds support for Python 3.15)


## Releases
Expand Down
20 changes: 20 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Testing echo across multiple python versions
# Run with:
# > just test
#
# Requisites:
# - uv (https://docs.astral.sh/uv/)
# - just (https://just.systems/man/en/)
Comment thread
mikejturner marked this conversation as resolved.
Resolved
#
# Warning:
# The 'uv run' command used in the recipe below, removes any existing uv-managed virtual environment
# and rebuilds it with the requested python version (passed with --python).
# Depending on the order of python versions in this script, this might result in the venv
# having a different python version that before the justfile recipe was run.
#
test:
#!/usr/bin/env bash
for version in 3.15 3.14 3.13 3.12; do # This will leave the uv-managed venv with Python 3.12 installed
echo "================================= Python $version ================================="
uv run --python $version pytest -q || exit 1
done
28 changes: 13 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,29 @@ classifiers = [
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",

"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
]
dependencies = [
"deprecated>=1.3.1,<2",
"matplotlib>=3.11.2,<4",
"networkx>=3.1,<4",
"numpy>=1.26,<2",
"orjson>=3.9,<4",
"pandas>=2.1,<3",
"plotly>=5.22,<6",
"pyomo>=6.6,<7",
"scikit-learn>=1.3,<2",
"seaborn>=0.12,<1",
"shortuuid>=1.0.11,<2",
"typing-extensions>=4.7,<5",
"scipy>=1.14.1,<2",
"networkx>=3.7,<4",
"numpy>=2.5.2,<3",
"orjson>=3.13,<4",
"pandas>=2.3,<3",
"plotly>=5.24,<6",
"pyomo>=6.10,<7",
"scikit-learn>=1.9,<2",
"seaborn>=0.13,<1",
"shortuuid>=1.0.13,<2",
"typing-extensions>=4.16,<5",
"scipy>=1.18.1,<2",
"attrs>=26.1.0",
]
requires-python = ">= 3.11"
requires-python = ">= 3.12"
authors = [
{ name = "Ruth Kravis" },
{ name = "Johannes Hendriks" },
Expand Down Expand Up @@ -78,7 +77,6 @@ all = [{ include-group = "dev" }, { include-group = "docs" }]
version = { attr = "echo.__version__" }
readme = { file = ["README.md"], content-type = "text/markdown" }


[tool.bandit]
exclude_dirs = ["tests"]

Expand Down
Loading