Skip to content

Conversation

@dwhswenson
Copy link
Member

This changes the result of the INIT_CONDS.get() method so that it always returns a list of a trajectories. Since this is usually then consumed by scheme.initial_conditions_from_trajectories, this approach will always give a workable result. This is an API break, but since the result on the typical consumer is to allow more input types, I'm not concerned with backward compatibility.

The issue was that sometimes, if calling the INIT_CONDS parameter multiple times (e.g., SampleSet or Trajectory objects from different interface sets/interfaces), this would break the input of scheme.initial_conditions_from_trajectories. While it might be good to also modify that function to allow multiple SampleSets and a mixture of types in the input list, it seemed easier to make that change in the CLI for now. Usually, a Python library-level user has more ability to fix up their input types, whereas a CLI user has no such ability.

@dwhswenson dwhswenson added enhancement New feature or request API break labels Aug 25, 2024
@codecov
Copy link

codecov bot commented Aug 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (de53902) to head (ff15749).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #87   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          110       110           
  Lines         5422      5454   +32     
=========================================
+ Hits          5422      5454   +32     

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

@dwhswenson
Copy link
Member Author

This is ready for review and comment. Without review, I will merge this after at least 24 hours, no sooner than Mon 26 Aug 15:00 GMT (17:00 my local).

Copy link
Member

@sroet sroet left a comment

Choose a reason for hiding this comment

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

1 question to make sure implicit casting is not suppoted in OPS, feel free to ignore. LGTM

@dwhswenson dwhswenson merged commit 6f0e2d6 into openpathsampling:main Aug 26, 2024
@dwhswenson dwhswenson deleted the more-flexible-init-conds branch August 26, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API break enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants