-
Notifications
You must be signed in to change notification settings - Fork 179
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
Improve GitHub Action for testing #268
Conversation
Codecov Report
@@ Coverage Diff @@
## master #268 +/- ##
==========================================
- Coverage 97.54% 97.05% -0.50%
==========================================
Files 9 9
Lines 204 204
==========================================
- Hits 199 198 -1
- Misses 5 6 +1
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
setup.py
Outdated
setup_requires = [] | ||
tests_require = ['pytest', 'pytest-runner', 'pytest-cov'] | ||
tests_require = ['pytest', 'pytest-cov', 'coverage'] |
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 think adding coverage
here is unnecessary as this is only used in CI, not on a local dev machine. Happy to remove pytest-runner
though :)
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.
Okay, fair point!
@@ -84,9 +84,9 @@ def get_extensions(): | |||
return extensions | |||
|
|||
|
|||
install_requires = [] | |||
install_requires = ['torch'] |
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 still have my problems with this, but mostly only due to bad experience in the past. For example, it is impossible for me to install the sentence-transformers
library since due to whatever reasons PyTorch will always get re-installed.
It also looks like pip install torch-scatter
will still fail when no PyTorch version is installed, right?
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 will see if I can replicate this problem using some clean virtual environments
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
As I'm trying to figure out why #266 isn't working, I want to try adding a couple less controversial things to the existing testing workflow
pytest
instead ofsetup.py
(the Python Packge Authority has deprecated all usages ofsetup.py
as a scripttorch
toinstall_requires
in thesetup.py
to signify that this package requirestorch
after it's installed. You can always install a specific version oftorch
before trying to installtorch-scatter
and it will respect what's already available in the environment.Things that didn't work:
+cpu
)-e
(editable mode) flag causesImportError: Could not find module '_version_cpu' in /home/runner/work/pytorch_scatter/pytorch_scatter/torch_scatter
torch
tosetup_requires
in thesetup.py
is a bit of a Catch-22: you already have to be executing thesetup.py
to recognize that. Getting this right can probably be done with the declarative setup that I proposed in Add build requirements inpyproject.toml
to make installations easier #266, but that one still needs a few things to be clarified (plus CI to pass)