Skip to content

Test for MNE-Tools actions#13971

Draft
tsbinns wants to merge 94 commits into
mne-tools:mainfrom
tsbinns:test_tools
Draft

Test for MNE-Tools actions#13971
tsbinns wants to merge 94 commits into
mne-tools:mainfrom
tsbinns:test_tools

Conversation

@tsbinns

@tsbinns tsbinns commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Testing to get an idea of how the actions being implemented in MNE-Tools behave (mne-tools/mne-tools#20).

@tsbinns

tsbinns commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Have now tested here all the actions implemented so far in mne-tools, save the old env checking.

There are a couple differences between what happens currently and what the actions do, but only cosmetic, nothing that should affect the function. A summary of differences below:

Syncing dependencies to env yaml

  • Formatting of some specifiers/markers changes because the actions uses packaging's Request object to get str reprs, which has its own ordering logic. However, this is just a cosmetic thing, and it still functions as an env file.

Citation generation

  • Action switches to using pyyaml to format CITATION.CFF instead of manually constructing this. However, pyyaml's behaviour is to not indent lists, e.g.:
# `pyyaml` formatting
my-list:
- item

# current formatting
my-list:
  - item

AFAIK, there isn't a way to get pyyaml to add this indentation. Both are valid yaml formats, just a visual thing, but it does produce a big diff to what there is currently.

  • pyyaml also doesn't wrap multi-word strings in quotes, as is currently done, but this isn't required for the yaml to be valid.

  • Action takes keywords from pyproject.toml, which don't match what is currently used in the citation. Idea was to simplify the args that need to be passed to the action (as specifying loads of keywords gets cumbersome) and this info can be encoded in pyproject.toml.

Codemeta generation

  • Action uses keywords encoded in pyproject.toml rather than requiring these to be passed as args, as well as supported OSs (which can be extracted from the classifier field) and package description. Again, just trying to simplify args by using info already encoded somewhere.

  • Action uses json.dump() to construct codemeta.json rather than manually building this. Ends up fixing some indent and spacing inconsistencies in author names. A cosmetic improvement, but does generate a big diff.

@larsoner

Copy link
Copy Markdown
Member

Those whitespace changes would be okay but in its current form this is a bit tough to review since it just shows a diff... WDYT about putting all of those actions in the autofix.ci job? That way all the proposed changes will actually be committed? I think it's the way we'll probably want to use it in practice anyway, and will facilitate seeing the diffs (e.g., with whitespace changes ommitted or not).

tsbinns and others added 27 commits July 2, 2026 22:26
@tsbinns

tsbinns commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

mne-tools/mne-tools#20 (comment)

Have updated keywords, description, and platform info in pyproject.toml, so CITATION.cff and codemeta.json now more closely reflect their existing form.

Have also replaced the use of local check_qt_import.sh and setup_xvfb.sh with calls to these scripts in the mne-tools repo. I have deleted these local scripts, but I'm not sure if there are other MNE packages calling these scripts (I at least know this isn't the case in MNE-Connectivity).

@larsoner

Copy link
Copy Markdown
Member

I'm not sure if there are other MNE packages calling these scripts (I at least know this isn't the case in MNE-Connectivity).

Want to give a run at a targeted GitHub-wide search? Searching specifically for a tools/setup_xvfb.sh for example should turn up usages in this repo and MNE-BIDS-Pipeline at a minimum...

Comment on lines -6 to +8
./tools/setup_xvfb.sh
curl https://raw.githubusercontent.com/tsbinns/mne-tools/add_tools/tools/setup_xvfb.sh -o setup_xvfb.sh
chmod +x setup_xvfb.sh
./setup_xvfb.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I chose to get the setup_xvfb.sh script in mne-tools within this file rather than as a prior step in the workflow, as I know at least one case outside of MNE-Python (MNE-Connectivity) where circleci_bash_env.sh script is used, so this prevents maintainers of other packages having to make sure setup_xvfb.sh from mne-tools is available.

I'd argue this script could also be a contender to move to mne-tools at some point, since it is used by at least 1 other MNE package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants