Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate interfaces #2808

Closed
wants to merge 5 commits into from
Closed

Conversation

Lestropie
Copy link
Member

Proposed extension of #2678 (PR uses that as the base branch).
As discussed in #2798.
Relevant for #2665, which will expand upon the content here to store Pydra interfaces alongside the legacy outputs of __print_full_usage__.

As per #2798, would like to know people's thoughts on incorporating this into the repository. I'm proposing it as part of #2678 as in the absence of that changeset the Python scripts fail to conform to the precedent of __print_full_usage__ due to the absence of more complex custom command-line argument types. The additional documentation here should be one mechanism by which the validity of those changes is manually checked.

Lestropie and others added 5 commits February 19, 2024 12:33
New script interfaces/generate_interfaces.sh executes the secret command-line option __print_full_usage__ for all commands, and saves them in interfaces/legacy/.
Consistency of these contents with that generated by compiled commands is verified by CI.
Files ending with .txt are ignored by git due to the contents of .gitignore.
To get around this, interface text files are written with no file extension.
This however would have resulted in a collision between the interface files generated for Python script algorithm interfaces, and the sub-directories for the algorithms contained within.
To get around thhis, files for the former are written into their own sub-directories.
@Lestropie Lestropie added this to the 3.1.0 updates milestone Feb 19, 2024
@Lestropie Lestropie self-assigned this Feb 19, 2024
@Lestropie Lestropie requested a review from a team February 26, 2024 02:58
@Lestropie
Copy link
Member Author

Seeking feedback from any @MRtrix3/mrtrix3-devs who may have opinions on this; would like to proceed with merging into #2678.

@Lestropie
Copy link
Member Author

Following discussion in #2665 and a bit more thought on the topic:

We are not going to generate and store the software interfaces within the main repository.
I do however want to make sure that the interface generation processes are robust.

In #2678, 8065803 adds unit tests for the C++ CLI that mirror those added for the evaluation of typed Python CLI. The interface of this dummy command as generated in multiple formats can be manually reviewed. Any changes that may affect CLI parsing, eg. addition of new types, should be verified using these tests (or potentially more).

@Lestropie Lestropie closed this Mar 11, 2024
@Lestropie Lestropie deleted the generate_interfaces branch March 11, 2024 11:17
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