-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Move requirements to pyproject.toml
#12178
Merged
larsoner
merged 39 commits into
mne-tools:main
from
hoechenberger:move-requirements-to-pyproject.toml
Nov 14, 2023
Merged
Changes from 37 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a6b737f
Run linter & autoformatter
hoechenberger e7a74e1
Move requirements*.txt dependencies to pyproject.toml
hoechenberger f8a1a47
Adjust all references to requirements*.txt files
hoechenberger 56ddbeb
Add `[dev]` variant
hoechenberger 80a4faa
Merge branch 'main' into move-requirements-to-pyproject.toml
hoechenberger ae54537
Don't install build dependencies that should be automatically install…
hoechenberger 934f949
Use "build" to build sdist and wheel
hoechenberger ce62c00
Add Dan as maintainer
hoechenberger 58128f1
Restore accidentally deleted "version" entry
hoechenberger 8ea6ddb
FIX: Try
larsoner 3988faa
FIX: Build
larsoner fa7a577
FIX: Where
larsoner 2caea06
FIX: Namespaces
larsoner db1194c
FIX: Submodules
larsoner 9bf4775
FIX: Why not
larsoner 28e5df1
FIX: space
larsoner d29fc04
FIX: Which
larsoner f62f460
Merge remote-tracking branch 'upstream/main' into move-requirements-t…
larsoner f92a0b2
FIX: toml
larsoner 97b09fe
FIX: Reorg
larsoner e614cb4
FIX: Doc guide
larsoner 2a92f75
FIX: Name
larsoner c63d11c
FIX: More
larsoner 0ff37f5
FIX: Try again
larsoner 936cda6
FIX: Unify
larsoner 9158870
FIX: Circle
larsoner dff4ad2
FIX: Bar
larsoner 2cec7e9
FIX: req
larsoner 24b4e73
FIX: Req
larsoner c6373d4
FIX: Try again
larsoner c83d06e
FIX: Spacing
larsoner fafe851
FIX: Tests
larsoner a48b283
FIX: Try/except
larsoner 2c50bfe
Merge remote-tracking branch 'upstream/main' into move-requirements-t…
larsoner 8dfe427
MAINT: Bye bye notebook
larsoner 17494d6
Merge remote-tracking branch 'upstream/main' into move-requirements-t…
larsoner ec47ba5
FIX: Which
larsoner 770e225
FIX: Alphabetize
larsoner 6cb5a06
FIX: Versionadded
larsoner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,8 @@ jobs: | |
brew install [email protected] | ||
which python | ||
which pip | ||
pip install --upgrade pip setuptools wheel | ||
pip install --upgrade --only-binary "numpy,scipy,dipy,statsmodels" -ve . -r requirements.txt -r requirements_testing.txt -r requirements_testing_extra.txt PyQt6 | ||
pip install --upgrade pip | ||
pip install --upgrade --only-binary "numpy,scipy,dipy,statsmodels" -ve .[full,test_extra] | ||
# 3D too slow on Apple's software renderer, and numba causes us problems | ||
pip uninstall -y vtk pyvista pyvistaqt numba | ||
mkdir -p test-results | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
behavior change: now install full install + full set up test dependencies
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 don't think we should advertise this variant actually because it will force people to install PyQt6. Conda users -- including those of our installers -- will have PyQt5
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.
@drammock this is also an issue with the monolithic
dev
-- we can't directly recommend using it because it usesfull
which in turn installs PyQt6There 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.
Can you point me at a discussion of why this fractionation exists? My naive question is why can't we harmonize what gets installed by the standalone installer, conda-forge recipe and pip (i.e., can't we always install PyQt5 regardless of install route)
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.
PyQt6 isn't available on on conda forge yet. PySide6 doesn't support interactive updates well. We could use PyQt5 everywhere but PyQt6 should be better as it's newer and has more features etc (so why not use it and promote it where we can).
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.
PyQt5 doesn't receive any updates or bug fixes. I've encountered text rendering bugs that will never be fixed, so I decided to support only PySide6 in MNELAB. PyQt6 should also work, but I'd really stay away from Qt5 stuff.
👍 for recommending pip over conda.
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.
Yeah we don't explicitly use any Qt6 features yet but it's more about general GUI library usability, features, etc. Qt6 came out almost 3 years ago so it's disappointing to recommend that people use Qt5. We have no choice for our installers at the moment, though, since PyQt6 isn't available there yet 😞 If we change
full
to install PyQt5 then people who usepip
/venv
(and previously usedrequirements.txt
) will experience a bit of a step back.We could recommend using a
venv
but I think that's a harder step for most people in terms of remembering to activate, relationship to conda envs, etc. So it depends a bit on how advanced/experienced our audience is for thedev
part.To keep things simple and easy for us (in terms of maintenance) and the less experienced devs (in terms of what they need to do), we could focus on supporting what's required for development assuming you're using our installers. In 1.6 at least these will fortunately come with a lot of what's needed:
https://github.com/mne-tools/mne-installers/blob/46a2a7b205cfdfbc1b6969f6436ee3229fedb9f7/recipes/mne-python/construct.yaml#L157
If we consider others with different sys configs (like those using pip venvs) as "advanced" devs, maybe it's okay to expect them to use pytest
SKIP
statements to see what they need when they need it. If this is acceptable, then recommending in our docs that people dopip install -e .[test]
orpip install -e .[test,docs]
might be sufficient and easier than trying to roll an all-encompassingdev
option.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.
Do we even still need conda? I mean, for testing and in our install instructions.
I believe @cbrnr only uses pip to install everything these days, right?
I personally use conda every day still, but as I'm moving all my development into dev containers, I started using pipx and pip more, for easier setup.
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.
Yes, I've been using pip (and venv) exclusively for a long time now, and I haven't had any major problems. Note that I haven't really tested PyVista though, since I don't need it in my daily workflow. If we recommend VS Code, by default venvs are auto-activated, so I don't think this will be a huge issue.
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.
what I meant by the "however you like" in "please create an empty venv (however you like)" was that e.g., conda users could do
...so no need to require new knowledge of
venv
if they understand at least one way of creating environments. Or stated differently: "recommend that contributors install via pip in their dev environment even if they use conda to manage environments".-0.5 on this; the installers contain a LOT of stuff that is not needed for MNE dev work (tensorflow, plotly, etc).