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
7 changes: 3 additions & 4 deletions doc/design/goals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Transitioning goals

**Schedule:**

1. Introduce v1 as opt-in — warn about behaviour changes on legacy, raise if
opted into v1.
2. Make v1 the default, allow opt-out.
3. linopy 1.0 — drop the legacy convention entirely.
1. linopy 0.10 — introduce v1 as opt-in. Warn about behaviour changes on
legacy, raise if opted into v1.
2. linopy 1.0 — make v1 the only convention and drop legacy entirely.
25 changes: 14 additions & 11 deletions doc/migrating-to-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ Migrating to the v1 arithmetic convention

.. note::

v1 is **opt-in** in this release and legacy remains the default. Nothing
changes until you set ``linopy.options["semantics"] = "v1"``. This guide is
for deciding *when* to opt in and *what* to change when you do.
v1 is **opt-in** in linopy 0.10 and legacy remains the default. linopy 1.0
removes legacy, so 0.10 is the release to migrate in. Nothing changes until
you set ``linopy.options["semantics"] = "v1"``. This guide tells you *what*
to change when you do.

Why v1 exists
-------------
Expand All @@ -28,16 +29,18 @@ per-case bug catalogue is in `issue #714 <https://github.com/PyPSA/linopy/issues
The rollout
-----------

The transition happens over three steps so that no model changes behaviour
The transition happens in two steps, so that no model changes behaviour
without warning first:

#. **Now — opt-in.** v1 is available via ``linopy.options["semantics"] = "v1"``.
Legacy is the default. Under legacy, every operation whose result *would*
change under v1 emits a :class:`linopy.LinopySemanticsWarning` that names the
rule and the fix.
#. **A later minor release — default.** v1 becomes the default; legacy stays
reachable via ``options["semantics"] = "legacy"`` for one more cycle.
#. **linopy 1.0 — legacy removed.** Only v1 remains.
#. **linopy 0.10 — opt-in.** v1 is available via
``linopy.options["semantics"] = "v1"``. Legacy is the default. Under legacy,
every operation whose result *would* change under v1 emits a
:class:`linopy.LinopySemanticsWarning` that names the rule and the fix.
#. **linopy 1.0 — legacy removed.** v1 is the only convention. There is no
opt-out.

Migrate while on 0.10. Every difference between the two conventions is either
warned about under legacy or raised under v1, so no model changes silently.

Who this affects
----------------
Expand Down
Loading
Loading