Skip to content

Move most of explore script to a module#88

Open
guillon wants to merge 4 commits into
xtc-tools:mainfrom
guillon:dev/cguillon/explore-lib
Open

Move most of explore script to a module#88
guillon wants to merge 4 commits into
xtc-tools:mainfrom
guillon:dev/cguillon/explore-lib

Conversation

@guillon
Copy link
Copy Markdown
Member

@guillon guillon commented Jun 3, 2026

Motivation

The objective is to refactor in the end most of explore script.

For now, it is mainly a move to the explore script code into the xtc.explore.Exploration class,
the point is to first move everything mostly as is, before refactoring in order to simplify merge conflicts with parallel devs.

Note that in addition, it required to change the tutorial explore_optimizers.py, in order to enforce this, I also added tutorials tests to run it from command line.

Description

Move explore script to a class and updated related code.

Commits

  • explore: move exploration to xtc.search.explore: main move
  • tutorials: make explore_optimizers executable: fix marimo to make it also executable from python CLI for tests
  • tests: add check of tutorials: add tests which actually run the tutorial in several variants
  • optimizers: fix management of config_file: fix an issue with the random model which was passed a config_file from explore.rearrenge classes for better typing

Discussion

Further PR will actually split Exploration class into several modules.

TODO in futher PRs:

  • modularize Exploration class

guillon added 3 commits June 3, 2026 19:24
Add support for python CLI execution with arguments for testing.
Add check-tutorials target executed by make check.
Runs the scripts in scripts/tutorials.
@guillon guillon force-pushed the dev/cguillon/explore-lib branch from 04ae191 to 9951a0c Compare June 4, 2026 10:36
@guillon guillon requested a review from liamsemeria June 4, 2026 10:38
@guillon guillon added the refactor Refactoring or simplification of code label Jun 4, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 4, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 68.50490% with 257 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/xtc/search/explore.py 66.30% 200 Missing and 46 partials ⚠️
src/xtc/search/strategies.py 83.82% 9 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Fix config_file argument for random optimizer.
Remove private _sample_batch method from interface.
Rework classes hierarchy for better typing.
@guillon guillon force-pushed the dev/cguillon/explore-lib branch from 9951a0c to 6d43402 Compare June 4, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring or simplification of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants