diff --git a/CHANGELOG.md b/CHANGELOG.md index c20582a..089be85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/CITATION.cff b/CITATION.cff index 036fb34..3e11535 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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: >- @@ -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 @@ -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: >- diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a38a071..99d6b64 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -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) diff --git a/README.md b/README.md index 90be06b..c4a9eb3 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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. +> + +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 diff --git a/doc/citing.rst b/doc/citing.rst index 590fbfc..b4e9b56 100644 --- a/doc/citing.rst +++ b/doc/citing.rst @@ -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} diff --git a/doc/index.rst b/doc/index.rst index b99a6a3..2533d65 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -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 `_. Every comparison with published data, including the comparisons that do not meet their diff --git a/doc/installation.rst b/doc/installation.rst index 3748c1e..21680d4 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -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 `_, compare +Download ``cablexsec-0.2.4-py3-none-any.whl`` and ``SHA256SUMS.txt`` from the +`v0.2.4 release `_, 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`): diff --git a/doc/local_analysis_guide.md b/doc/local_analysis_guide.md index 69e43b7..8df6659 100644 --- a/doc/local_analysis_guide.md +++ b/doc/local_analysis_guide.md @@ -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, . ## 1. What CableXSec computes diff --git a/doc/tutorials/04_contact_and_fretting.md b/doc/tutorials/04_contact_and_fretting.md index 305402d..f9877ed 100644 --- a/doc/tutorials/04_contact_and_fretting.md +++ b/doc/tutorials/04_contact_and_fretting.md @@ -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 @@ -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. diff --git a/pyproject.toml b/pyproject.toml index 9e2057d..6e57a70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/src/cablexsec/__init__.py b/src/cablexsec/__init__.py index cc75ece..5c1ce92 100644 --- a/src/cablexsec/__init__.py +++ b/src/cablexsec/__init__.py @@ -342,7 +342,7 @@ WaveKinematicsWarning, ) -__version__ = "0.2.3" +__version__ = "0.2.4" from cablexsec.project import ( # noqa: E402 PROJECT_FORMAT_VERSION, diff --git a/src/cablexsec/project.py b/src/cablexsec/project.py index b311bcb..791ee8d 100644 --- a/src/cablexsec/project.py +++ b/src/cablexsec/project.py @@ -12,6 +12,7 @@ from __future__ import annotations +import errno import hashlib import os import platform @@ -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() @@ -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( @@ -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: diff --git a/tests/test_project.py b/tests/test_project.py index f0646ec..7755001 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -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", [ diff --git a/validation/README.md b/validation/README.md index fe05ea6..f7c30d0 100644 --- a/validation/README.md +++ b/validation/README.md @@ -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 | diff --git a/validation/RELEASE_0_2_4.md b/validation/RELEASE_0_2_4.md new file mode 100644 index 0000000..8befa24 --- /dev/null +++ b/validation/RELEASE_0_2_4.md @@ -0,0 +1,55 @@ + + +# CableXSec v0.2.4 release record + +This record lists what was built and tested for the v0.2.4 release: the environments, the test +results and the release checks. Case definitions and pass criteria are in +[`VALIDATION.md`](../VALIDATION.md). The SHA-256 hashes of the published assets are those of +the `SHA256SUMS.txt` that the release workflow attaches to the GitHub release. + +## Source + +| Item | Value | +| --- | --- | +| CableXSec | `0.2.4` | +| Scope | the solver kernel (`cablexsec`) and its post-processing tools, the `cablexsec-batch` command, the tests, examples, validation data and scripts; no desktop application | +| Changes since 0.2.3 | the companion article, Seo (2026), *Ocean Engineering* 376, 129821, is cited as published (`CITATION.cff` preferred citation, README, How to cite with BibTeX, local-analysis guide, paper-data README); `Project.save` and `Project.load` given a directory raise `IsADirectoryError` naming the path on every platform. Mechanical, thermal, fatigue and contact results are unchanged; see [`CHANGELOG.md`](../CHANGELOG.md) | + +## Environments of the local gates + +Each environment is a new conda environment (conda-forge Python) into which the package and its +`dev`, `fast` and `contact` extras were installed with pip from the package index, as in CI. + +| Item | Python 3.11 | Python 3.12 | +| --- | --- | --- | +| Operating system | Windows 11 (x86-64), one thread per process (`OMP_NUM_THREADS`, `MKL_NUM_THREADS`, `OPENBLAS_NUM_THREADS`, `NUMBA_NUM_THREADS` = 1) | same | +| Python | 3.11.18 | 3.12.16 | +| Runtime | NumPy 2.4.6, SciPy 1.17.1, pandas 3.1.2, Pydantic 2.14.4, Matplotlib 3.11.2, PyYAML 6.0.4, rainflow 3.3.0 | NumPy 2.5.5, SciPy 1.18.1, pandas 3.1.2, Pydantic 2.14.4, Matplotlib 3.11.2, PyYAML 6.0.4, rainflow 3.3.0 | +| Optional | numba 0.68.1, Clarabel 0.11.1 | numba 0.68.1, Clarabel 0.11.1 | +| Tools | pytest 9.2.0, pytest-cov 7.1.0, pytest-xdist 3.8.0, Ruff 0.15.22, mypy 2.4.1, build 1.6.1, Twine 7.0.0, setuptools 84.2.1 | the same, and Sphinx 9.0.4, MyST-Parser 5.1.0 | + +## Test results + +The gates ran on at most four worker processes on a machine that was also running other solver +jobs. + +| Gate | Result | +| --- | --- | +| Test suite, Python 3.12 (`python -m pytest -n 4`) | 5156 tests collected: 5153 passed, 3 skipped (the three `test_distributed_fast` tests that replace kernel functions and so run only without numba; the coverage pass with `NUMBA_DISABLE_JIT=1` runs them); exit status 0 | +| Line and branch coverage of `cablexsec`, Python 3.11 (`release/check_coverage.py -n 4`: whole suite, then the kernel tests with `NUMBA_DISABLE_JIT=1`) | 96.40 %; gate 95 % | +| Ruff lint and format check (`src`, `tests`, `examples`, `validation`, `release`, `doc`), Python 3.11 and 3.12 | clean | +| mypy, strict, package `cablexsec` (the CI configuration, Python 3.11 with NumPy 2.4.6) | no issues in 124 source files | +| Validation report (`validation/scripts/run_validation.py --check --jobs=4`, Python 3.11 and 3.12) | the committed report is current in both environments; 73 rows: 50 pass, 7 fail (BM1-loop, BM1-ID, Z-EI, HU-3PB, WITZ-ID, SV11-PLANE, SV11-GJ; registered targets unchanged), 13 stated without a target (info), 1 partial (BM5), 1 not comparable (HU-uniform), 1 not validated (BM4); taxonomy 1426 `analytical_sanity`, 105 `independent_method`, 63 `full_scale` tests. The script exits with status 1 while registered FAIL rows exist, as in CI | +| Sphinx documentation (`-W --keep-going`), Python 3.12 | built with no warnings | +| Release-tree audit (`release/audit_release_tree.py --tree .` and `--archive-ref HEAD`) | passed | +| Release metadata (`release/check_release_metadata.py`) | passed | +| Python distributions (`python -m build` with `SOURCE_DATE_EPOCH` set, `twine check`) | sdist and wheel pass; both carry LICENSE and NOTICE; the wheel holds only `cablexsec` and its metadata | +| Wheel in a new conda environment (Python 3.12), sdist in another (Python 3.11), each with the `fast` extra | in both: `cablexsec` imported from the environment, not the source tree; `release/smoke_test_wheel.py`; `cablexsec-batch --help`; the README quick start, with output identical to the README; all twelve examples, the four tutorial and the ten how-to scripts of the manual, from an exported copy of the release tree without `src/` | + +Against 0.2.3, the validation table and the test taxonomy are unchanged: no row is added or removed, +and no row changes status or value. The test suite grows by one `Project` test (a directory given +to `save` or `load`), which carries no taxonomy marker. + +The CI matrix (`.github/workflows/python.yml`: Ubuntu, Windows and macOS with Python 3.11 and +3.12, a run without numba, coverage, the validation report, distributions and documentation) +runs on the release pull request. diff --git a/validation/paper_data/README.md b/validation/paper_data/README.md index af1012c..3215ba4 100644 --- a/validation/paper_data/README.md +++ b/validation/paper_data/README.md @@ -3,7 +3,8 @@ # Data of the companion article These files are the numerical data behind the CableXSec calculations of the companion -journal article (under review in *Ocean Engineering*), restricted to what can be +journal article (Seo 2026, *Ocean Engineering* 376, 129821, +), restricted to what can be published: digitised data of published experiments, inputs on published cables, and the results CableXSec computed from them. File names keep the prefixes of the article's figure scripts (`figN_`, `revision_`, `revision2_`, `revision3_`) so that every figure