Skip to content

fix: CableDyn reader files and OPTIONS, early cable_source check; CableDyn 0.4 docs - #15

Merged
SMI-Lab-Inha merged 1 commit into
devfrom
fix/cabledyn-io-and-docs
Nov 17, 2026
Merged

SMI-Lab-Inha merged 1 commit into
devfrom
fix/cabledyn-io-and-docs

Conversation

@SMI-Lab-Inha

@SMI-Lab-Inha SMI-Lab-Inha commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes to the CableDyn reader and the batch inputs, and the CableDyn description brought up to CableDyn 0.4.x.

Item Before After
read_cabledyn_sections file handles .p.out/.t.out left open after every read (ResourceWarning) and after a failed one every stream closed in a finally; pd.read_csv(chunksize=...) used as a context manager
Files that end on different rows rejected only when a chunk boundary did not hide it always rejected ("different row counts")
OPTIONS uniform 0.0 0.6 0.0 current read as keyword 0.0, value uniform current = uniform 0.0 0.6 0.0
Repeated OPTIONS keyword first record won last record wins, as in CableDyn
Aliases gravity, WtrDnsty/water_density, water_depth, dt ignored (WtrDnsty 1000 gave 1025 kg/m³) set g, rhoW, WtrDpth, dtM
run_sea_state_batch(cable_source=...) checked after every section was computed checked and digested before any run is read

OPTIONS record forms

These follow CableDyn's doc/options.rst:

  • value keyword [commentary]
  • positional records: the model first, then the numbers, then the keyword (current, waves, wavetrain)
  • the keyword-first dynamic_solver row
  • a standalone - starts a description

The keyword is the first token after the first token that is not a number.

Docs

The global–local guide (Sections 1, 2, 2.1 and 7), ARCHITECTURE.md and the reader's module docstring described CableDyn 0.1.x. Each fact was checked against CableDyn dev (doc/driver_format.md, doc/outputs.rst, doc/theory.rst, CHANGELOG.md):

  • finite-EI Ten, Curv and BendMom recovered from nodal equilibrium (since 0.2.0), with OutputRecovery element restoring the element definitions;
  • signed section-axis components CurvX/CurvY (since 0.4.0): how their axes start on lines with and without a torsion restraint, and how a station of a .out file is read with series_from_curvature_components;
  • torsion solved on lines restrained at one end as well as both (since 0.4.0); the reader requires Twist only at two-end restraint and applies Twist wherever it is written;
  • Dec/Azi on finite-EI lines are the node's own Hermite tangent since 0.4.2, the chord before.

The compute_mkappa docstring now states that tension_N is the true wall tension (as in compute_fatigue) and how to convert an effective tension.

Open item, documented and not changed here. The tangent reader places every Dec/Azi value at the mid-arc of its chord. On 0.4.2 output that is right for interior nodes of a uniform mesh but puts an end node's tangent half an element inside the line. Reading the end tangent at the node needs a reader option or version detection, so it is left for a separate change.

Tests

  • New test_reader_closes_every_output_file: a read in several chunks, and a per-line file with an extra row. Both run under ResourceWarning capture with gc.collect() and must leave no file open.
  • New test_deck_options_follow_the_record_forms: positional, commentary, dynamic_solver, aliases and last-wins.
  • New test_cable_source_is_checked_before_any_run_is_read.
  • The first two fail on dev. The third fails on dev once its match names the missing file.

Gates

Gate Result
ruff check, ruff format --check clean
mypy (src) 0 errors
pytest, numba 4397 passed, 4 skipped
pytest, CABLEXSEC_DISABLE_NUMBA=1 4283 passed, 118 skipped

No validation record changes. The branch is rebased on #14, #16 and #17, and the gates above are on the rebased tree. run_validation.py --check reports the committed report as current. Regenerating it changes only round-off cells within their tolerance classes, so it is kept unchanged.

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T16:27:44.973982Z 76ba1fe Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 56281b7392

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@read-the-docs-community

read-the-docs-community Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 CableXSec | 🛠️ Build #35961721 | 📁 Comparing 76ba1fe against latest (240bf9c)

  🔍 Preview build  

17 files changed · ± 17 modified

± Modified

…leDyn 0.4 docs

read_cabledyn_sections left the per-line .p.out and .t.out readers open
after every read (ResourceWarning) and after a failed one: the chunk
streams were zipped and the last of them never reached its end. Each
stream now reads through pd.read_csv as a context manager and every stream
is closed in a finally. The files of one run must also end on the same
row; extra rows hidden by a chunk boundary were dropped before.

read_cabledyn_deck took the second token of every OPTIONS row as the
keyword, so the positional record "uniform 0.0 0.6 0.0 current" became a
keyword "0.0". It now reads CableDyn's record forms (value keyword
[commentary]; model, numbers, keyword; keyword-first dynamic_solver; a "-"
description), the last record of a keyword wins as in CableDyn (the first
won), and the aliases gravity, WtrDnsty/water_density, water_depth and dt
set g, rhoW, WtrDpth and dtM (they were ignored).

run_sea_state_batch checks and digests cable_source before any run is
read; a missing file failed only after every section was computed.

The global-local guide (Sections 1, 2, 2.1 and 7), ARCHITECTURE.md and
the reader's docstring now describe CableDyn 0.4.x: nodal-equilibrium
recovery of tension, curvature and bend moment (since 0.2.0), the signed
section-axis components CurvX/CurvY and torsion of lines restrained at one
end (since 0.4.0), and the node tangent of finite-EI lines in Dec/Azi
(since 0.4.2). The compute_mkappa docstring states that tension_N is the
true wall tension.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha
SMI-Lab-Inha force-pushed the fix/cabledyn-io-and-docs branch from 56281b7 to 76ba1fe Compare November 17, 2026 16:26
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 76ba1fe09d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit 9042f37 into dev Nov 17, 2026
22 of 23 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/cabledyn-io-and-docs branch November 17, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant