Skip to content

Updated feasible_point to search over scan points - #4552

Open
j-a-foster wants to merge 1 commit into
mainfrom
4550-createpy-only-lets-you-create-a-new-indat-from-the-first-point-in-a-scan
Open

Updated feasible_point to search over scan points#4552
j-a-foster wants to merge 1 commit into
mainfrom
4550-createpy-only-lets-you-create-a-new-indat-from-the-first-point-in-a-scan

Conversation

@j-a-foster

Copy link
Copy Markdown
Collaborator

Description

Updates create.py to allow creating new IN.DATs from any point in a scan.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@j-a-foster
j-a-foster requested a review from a team as a code owner August 25, 2026 09:02
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.46%. Comparing base (a9358cc) to head (8b48734).

Files with missing lines Patch % Lines
process/core/io/in_dat/create.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4552   +/-   ##
=======================================
  Coverage   49.46%   49.46%           
=======================================
  Files         150      150           
  Lines       30069    30068    -1     
=======================================
  Hits        14874    14874           
+ Misses      15195    15194    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timothy-nunn timothy-nunn self-assigned this Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I actually think this entire function could do with a re-work.

Even with your fixes there are still a number of issues:

  • Negative indexing only works for -1, any other index defaults to scan point 1.
  • Scan point 0 silently updates to 1.
  • Scan point > number of scans will select the last scan.

I'm also not sure I like the for loop looking for a scan. I think this logic should be simplified so that:

  1. We only support scans [1, num_scans] and -1, anything else raises an error.
  2. We only check the requested scan (position) for feasibility and error if it is infeasible. In my opinion, if the user wants a scan point they should explicitly index it, we shouldn't be silently searching for a feasible one.

Let me know if you disagree, have any suggestions, or questions.

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.

create.py only lets you create a new IN.DAT from the first point in a scan

3 participants