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
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,37 @@ All notable changes to CableXSec are recorded in this file. The format follows

## [Unreleased]

## [0.2.4] - 2026-12-04

The Python interfaces are versioned but may change before `1.0.0`. The evidence for
every item below is in
[VALIDATION.md](https://github.com/SMI-Lab-Inha/CableXSec/blob/main/VALIDATION.md); its
generated table is reproduced by `python validation/scripts/run_validation.py`. The
mechanical, thermal, fatigue and contact results are unchanged. This release cites the
published companion article and fixes the error raised when a project is saved to or loaded
from a directory.

### Documentation

- The companion journal article is published: Seo, J. H. (2026), Global-to-local fatigue and
fretting loading analysis of dynamic power cables for floating offshore wind turbines,
*Ocean Engineering* 376, 129821, https://doi.org/10.1016/j.oceaneng.2026.129821.
`CITATION.cff` gives it as the preferred citation; the README, the How to cite page (with
BibTeX), the local-analysis guide and the paper-data README cite it.

### Fixed

- `Project.save` and `Project.load` given a directory raise `IsADirectoryError` naming the path
on every platform; on Windows `save` raised `PermissionError` (WinError 5) from the final
replacement and `load` raised `PermissionError`.

### Known limitations

- The measured comparisons that failed in 0.2.3 (BM1-loop, BM1-ID, Z-EI, HU-3PB, WITZ-ID,
SV11-PLANE, SV11-GJ) still fail; their targets and tolerances are not relaxed. The
validation table has 73 rows: 50 pass, 7 fail, 13 are stated without a target, 1 is
partial (BM5), 1 not comparable and 1 not validated.

## [0.2.3] - 2026-12-03

The Python interfaces are versioned but may change before `1.0.0`. The evidence for
Expand Down Expand Up @@ -1546,6 +1577,9 @@ generated table is reproduced by `python validation/scripts/run_validation.py`.
- A passing test does not establish that the model predicts every physical cable
construction or a validated service life.

[0.2.4]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.4
[0.2.3]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.3
[0.2.2]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.2
[0.2.1]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.1
[0.2.0]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.0
[0.1.0]: https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.1.0
24 changes: 19 additions & 5 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cff-version: 1.2.0
message: >-
If you use CableXSec in academic work, please cite this software entry with
the version you used. The journal article that describes the method is under
review; its reference will be added here when it is published.
If you use CableXSec in academic work, please cite the journal article that
describes the method (preferred-citation) and this software entry with the
version you used.
title: "CableXSec: Component-resolved local cross-section mechanics of dynamic power cables"
type: software
abstract: >-
Expand All @@ -23,8 +23,8 @@ authors:
repository-code: "https://github.com/SMI-Lab-Inha/CableXSec"
url: "https://github.com/SMI-Lab-Inha/CableXSec"
license: Apache-2.0
version: 0.2.3
date-released: 2026-12-03
version: 0.2.4
date-released: 2026-12-04
keywords:
- dynamic power cable
- cross-section mechanics
Expand All @@ -34,6 +34,20 @@ keywords:
- wire fatigue
- fretting
- floating offshore wind
preferred-citation:
type: article
title: >-
Global-to-local fatigue and fretting loading analysis of dynamic power cables for floating offshore wind turbines
authors:
- family-names: Seo
given-names: Jae Hoon
affiliation: "Department of Naval Architecture and Ocean Engineering, Inha University, Incheon, Republic of Korea"
orcid: "https://orcid.org/0000-0003-1047-2119"
journal: Ocean Engineering
year: 2026
volume: 376
start: "129821"
doi: "10.1016/j.oceaneng.2026.129821"
references:
- type: article
title: >-
Expand Down
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ with absolute `https://github.com/SMI-Lab-Inha/CableXSec/blob/main/...` URLs.
python -m build --outdir dist
python -m twine check dist/*
python -m venv wheel-test
wheel-test\Scripts\python -m pip install dist\cablexsec-0.2.3-py3-none-any.whl
wheel-test\Scripts\python release\smoke_test_wheel.py --version 0.2.3
wheel-test\Scripts\python -m pip install dist\cablexsec-0.2.4-py3-none-any.whl
wheel-test\Scripts\python release\smoke_test_wheel.py --version 0.2.4
```

The wheel contains only the `cablexsec` package (with its bundled cable definitions)
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ damage of the armour, the conductor and the metallic sheaths.
It reads the results of global analyses (CableDyn runs and time-history CSV exports such
as those of OrcaFlex) and turns them into local stresses and damage, and it exports a hysteretic
bending law for use in global analysis. The
current release is `v0.2.3`; interfaces are versioned and may change before `1.0.0`.
current release is `v0.2.4`; interfaces are versioned and may change before `1.0.0`.

## What CableXSec does

Expand Down Expand Up @@ -74,7 +74,7 @@ Install the release wheel from the
3.12), or install straight from the repository:

```powershell
python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.3"
python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.4"
```

The `fast` extra adds `numba` for the compiled slip-stress and rainflow kernels; without it the
Expand Down Expand Up @@ -154,11 +154,16 @@ in [`validation/`](validation/README.md), including the data of the companion jo

## Citation

If you use CableXSec in academic work, please cite the software release (CableXSec 0.2.3);
[CITATION.cff](CITATION.cff) contains the entry (GitHub **Cite this repository**) and the
manual's [How to cite](https://cablexsec.readthedocs.io/en/latest/citing.html) page gives
BibTeX. The journal article that describes the method is under review; its reference will be
added when it is published. Global-to-local studies with CableDyn should also cite CableDyn
If you use CableXSec in academic work, please cite the journal article that describes the
method:

> Seo, J. H. (2026). Global-to-local fatigue and fretting loading analysis of dynamic power cables for floating offshore wind turbines. *Ocean Engineering* 376, 129821.
> <https://doi.org/10.1016/j.oceaneng.2026.129821>

and the software release you used (CableXSec 0.2.4). [CITATION.cff](CITATION.cff) contains both
entries (GitHub **Cite this repository**), and the manual's
[How to cite](https://cablexsec.readthedocs.io/en/latest/citing.html) page gives BibTeX.
Global-to-local studies with CableDyn should also cite CableDyn
([Ocean Engineering 368, 128332, 2026](https://doi.org/10.1016/j.oceaneng.2026.128332)).

## Contributing and support
Expand Down
32 changes: 25 additions & 7 deletions doc/citing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,42 @@
How to cite
===========

If CableXSec contributes to published work, cite the software release with the version you
used. The entry is kept in the repository's ``CITATION.cff``, which GitHub exposes through its
**Cite this repository** function. The journal article that describes the method is under
review; its reference will be added here and to ``CITATION.cff`` when it is published.
If CableXSec contributes to published work, cite the journal article that describes the method
and the software release with the version you used. Both entries are kept in the repository's
``CITATION.cff``, which GitHub exposes through its **Cite this repository** function.

Journal article
---------------

Seo, J. H. (2026). Global-to-local fatigue and fretting loading analysis of dynamic power cables for floating offshore wind turbines. *Ocean Engineering* 376, 129821.
https://doi.org/10.1016/j.oceaneng.2026.129821

.. code-block:: bibtex

@article{Seo2026CableXSec,
author = {Seo, Jae Hoon},
title = {Global-to-local fatigue and fretting loading analysis of dynamic power
cables for floating offshore wind turbines},
journal = {Ocean Engineering},
volume = {376},
pages = {129821},
year = {2026},
doi = {10.1016/j.oceaneng.2026.129821}
}

Software release
----------------

Seo, J. H. (2026). *CableXSec: Component-resolved local cross-section mechanics of dynamic
power cables* (version 0.2.3) [Computer software]. https://github.com/SMI-Lab-Inha/CableXSec
power cables* (version 0.2.4) [Computer software]. https://github.com/SMI-Lab-Inha/CableXSec

.. code-block:: bibtex

@software{CableXSec_0_2_3,
@software{CableXSec_0_2_4,
author = {Seo, Jae Hoon},
title = {{CableXSec}: Component-resolved local cross-section mechanics of
dynamic power cables},
version = {0.2.3},
version = {0.2.4},
year = {2026},
url = {https://github.com/SMI-Lab-Inha/CableXSec},
license = {Apache-2.0}
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ turns them into the fatigue damage of the armour, the conductor and the metallic
.. admonition:: Release status
:class: note

CableXSec ``v0.2.3`` is the current release. It is distributed as a source
CableXSec ``v0.2.4`` is the current release. It is distributed as a source
repository and a pure-Python wheel on the
`GitHub release page <https://github.com/SMI-Lab-Inha/CableXSec/releases>`_. Every
comparison with published data, including the comparisons that do not meet their
Expand Down
10 changes: 5 additions & 5 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ is distributed through its GitHub repository; it is not published on a package i
From a release
--------------

Download ``cablexsec-0.2.3-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the
`v0.2.3 release <https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.3>`_, compare
Download ``cablexsec-0.2.4-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the
`v0.2.4 release <https://github.com/SMI-Lab-Inha/CableXSec/releases/tag/v0.2.4>`_, compare
the checksum, and install the wheel with its optional extras:

.. code-block:: powershell

Get-FileHash cablexsec-0.2.3-py3-none-any.whl -Algorithm SHA256
python -m pip install "cablexsec-0.2.3-py3-none-any.whl[fast]"
Get-FileHash cablexsec-0.2.4-py3-none-any.whl -Algorithm SHA256
python -m pip install "cablexsec-0.2.4-py3-none-any.whl[fast]"

From the repository
-------------------

.. code-block:: powershell

python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.3"
python -m pip install "cablexsec[fast] @ git+https://github.com/SMI-Lab-Inha/CableXSec.git@v0.2.4"

or, for development, clone the repository and install it in editable mode (see
:doc:`development`):
Expand Down
5 changes: 3 additions & 2 deletions doc/local_analysis_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Stress is tensile-positive; pressure is positive in compression. The code
blocks run as written, except those that read your own files. The blocks of
one section run in sequence in one Python session; each section starts afresh.

A companion journal article describing the method is under review; its
reference will be added when it is published.
The method is described in the companion journal article: Seo, J. H. (2026), Global-to-local
fatigue and fretting loading analysis of dynamic power cables for floating offshore wind
turbines, *Ocean Engineering* 376, 129821, <https://doi.org/10.1016/j.oceaneng.2026.129821>.

## 1. What CableXSec computes

Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/04_contact_and_fretting.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fretting life.

Nor is it the {term}`Ruiz parameter` (Ruiz et al. 1984), which is formed from the
local surface shear traction and slip and, in its second form, the local
tangential stress. CableXSec 0.2.3 does not compute Ruiz parameters.
tangential stress. CableXSec 0.2.4 does not compute Ruiz parameters.

## 8. The SWT critical plane next to a crossing

Expand Down Expand Up @@ -298,7 +298,7 @@ Points nearer the surface at the edge itself need a higher quadrature order.
converge; it never returns an unconverged stress.

`compute_swt_cycle` also returns a formal life from a strain-life law
(`SWTLifeConstants`). The SWT constants registered in CableXSec 0.2.3
(`SWTLifeConstants`). The SWT constants registered in CableXSec 0.2.4
(`sn_curves.SWT_LIFE`) are those of copper, and none are for armour steel, so
the script passes a placeholder law and prints no life. With constants from a
source, `result.life_cycles` gives it.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cablexsec"
version = "0.2.3"
version = "0.2.4"
description = "Component-resolved local cross-section mechanics and fatigue of dynamic power cables"
readme = "README.md"
requires-python = ">=3.11,<3.13"
Expand Down
2 changes: 1 addition & 1 deletion src/cablexsec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
WaveKinematicsWarning,
)

__version__ = "0.2.3"
__version__ = "0.2.4"

from cablexsec.project import ( # noqa: E402
PROJECT_FORMAT_VERSION,
Expand Down
14 changes: 14 additions & 0 deletions src/cablexsec/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from __future__ import annotations

import errno
import hashlib
import os
import platform
Expand Down Expand Up @@ -260,6 +261,17 @@ def _name(value: str) -> None:
)


def _not_a_directory(path: Path, action: str) -> None:
# a directory gives PermissionError on Windows and IsADirectoryError elsewhere;
# name the problem the same way on every platform
if path.is_dir():
raise IsADirectoryError(
errno.EISDIR,
f"{action} needs a project file path, not a directory",
str(path),
)


def _digest(value: str) -> str:
return hashlib.sha256(value.encode("utf-8")).hexdigest()

Expand Down Expand Up @@ -716,6 +728,7 @@ def save(self, path: str | Path) -> Path:
}
)
target = Path(path)
_not_a_directory(target, "Project.save")
temporary: Path | None = None
try:
with tempfile.NamedTemporaryFile(
Expand All @@ -739,6 +752,7 @@ def save(self, path: str | Path) -> Path:
@classmethod
def load(cls, path: str | Path) -> Project:
"""Load versions 1 and 2; reject unknown versions and inconsistent contents."""
_not_a_directory(Path(path), "Project.load")
try:
text = Path(path).read_bytes().decode("utf-8")
except UnicodeDecodeError as error:
Expand Down
15 changes: 15 additions & 0 deletions tests/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,21 @@ def test_load_rejects_corruption_and_native_missing_file(tmp_path):
cx.Project.load(tmp_path / "missing")


def test_save_and_load_name_a_directory_on_every_platform(tmp_path):
folder = tmp_path / "results"
folder.mkdir()
with pytest.raises(
IsADirectoryError, match="Project.save needs a project file path"
):
project().save(folder)
with pytest.raises(
IsADirectoryError, match="Project.load needs a project file path"
):
cx.Project.load(folder)
assert list(folder.iterdir()) == []
assert not list(tmp_path.glob(".cablexsec-*.tmp"))


@pytest.mark.parametrize(
"mutation",
[
Expand Down
3 changes: 2 additions & 1 deletion validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ global simulation files are not redistributed.
| Path | Contents |
| --- | --- |
| [`validation_report.md`](validation_report.md) | The generated table of every analytical gate and benchmark, with targets, values and status |
| [`RELEASE_0_2_3.md`](RELEASE_0_2_3.md) | Environment, test results and gate results for v0.2.3 |
| [`RELEASE_0_2_4.md`](RELEASE_0_2_4.md) | Environment, test results and gate results for v0.2.4 |
| [`RELEASE_0_2_3.md`](RELEASE_0_2_3.md) | The same record for the 0.2.3 release |
| [`RELEASE_0_2_2.md`](RELEASE_0_2_2.md) | The same record for the 0.2.2 release |
| [`RELEASE_0_2_1.md`](RELEASE_0_2_1.md) | The same record for the 0.2.1 release |
| [`RELEASE_0_2_0.md`](RELEASE_0_2_0.md) | The same record for the 0.2.0 release |
Expand Down
Loading
Loading