-
Notifications
You must be signed in to change notification settings - Fork 69
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
Turn it into a proper Python package #611
Turn it into a proper Python package #611
Conversation
@larsoner Now it actually installs and creates an entry-point: ❯ mne-bids-pipeline
ERROR: Missing required flags: {'config'}
Usage: mne-bids-pipeline <flags>
optional flags: --config
required flags: --steps | --root_dir | --subject | --session |
--task | --run | --interactive | --n_jobs | --debug |
--cache
additional flags are accepted
For detailed information on this command, run:
mne-bids-pipeline -- --help |
Nice! Since all the |
|
95bee84
to
74463b0
Compare
cb6d16a
to
a78d5e3
Compare
51f996e
to
4a32380
Compare
This comment was marked as resolved.
This comment was marked as resolved.
@larsoner Using MNE's |
Why do you need run_subprocess? |
I only use it in run_tests.py to ensure all tests are run through the CLI! |
Re logging, I've opened a bug upstream: mne-tools/mne-python#11218 |
@larsoner @agramfort The changes here allow installation of the pipeline via In followup PRs, we can add features like "please create a template config file" etc. Once we have done that, I believe it's time for a first release! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoechenberger thanks
can you see if the doc needs any update?
@@ -316,5 +316,9 @@ def process( | |||
logger.info('Done running 👆', extra=extra) | |||
|
|||
|
|||
if __name__ == '__main__': | |||
def main(): | |||
fire.Fire(process) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run.py is still useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it was one of my goals here to get everything working with as few changes as possible!
But see #611 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A remarkably small diff actually!
I would prefer that we change the folder structure to reflect the standard scientific Python folder layout, i.e., nest all Python under a mne_bids_pipeline/*
rather than at the repo root. The root would then just have docs
, mne_bids_pipeline
, and pyproject.toml
.
@@ -30,7 +30,7 @@ jobs: | |||
- name: Lint config.py with flake8 | |||
run: make flake-config | |||
- name: Install codespell | |||
run: pip install codespell | |||
run: pip install "codespell @ https://github.com/Freed-Wu/codespell/archive/refs/heads/iss2055.zip" tomli # fork that supports pyproject.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 on this, let's push for codespell-project/codespell#2055 instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... I see why you did this, so you could get rid of setup.cfg
entirely. Let's keep it then and I'll fix this once the upstream PR is merged
BUILDING.md
Outdated
* Create `sdist` distribution: | ||
|
||
```shell | ||
python -m build --sdist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should always also create a wheel so that --only-binary ":all:"
works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually never build wheels, thanks for the pointer
I actually actively wanted to avoid this until now, to cause as little disruption as possible to long-term users who expect to use |
@larsoner I will probably be busy for the next few days, please feel free to take over and coordinate with @agramfort if you want Otherwise you'll just to have to wait for me :) |
I think a lot of the internal mechanics might be simplified if we can make everything private by moving
If we support |
Okay I'll leave the refactor to a follow-up PR since it's going to be a lot of |
Yep! That code will become much easier to maintain |
Sounds good to me! |
Thanks @hoechenberger ! |
* upstream/main: Turn it into a proper Python package (mne-tools#611)
isn't it just asking people to use mne_bids_pipeline instead of run.py ?
… Message ID: ***@***.***>
|
@agramfort I don't know the context of your response :) do you mean how we would need to update the docs? We already did do that! |
Sorry this email was sent with a delay from my iPad … |
Fixes #580
Very much WIP at this stage, just trying to get the ball rolling.
cc @larsoner
Before merging …
docs/source/changes.md
)