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

problems with requirements #80

Closed
djarecka opened this issue Jul 17, 2019 · 12 comments · Fixed by #81
Closed

problems with requirements #80

djarecka opened this issue Jul 17, 2019 · 12 comments · Fixed by #81
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@djarecka
Copy link
Collaborator

I'm having issue with installing the package and the way we specify the requirements. I wasn't paying attention to this, I know that we used to have requirements.txt, but it has disappeared and now everything is in __about__. It was fine, but I'm doing something wrong in #76, where I've started exposing some objects to the user in the __init__ files. Suggestions will be appreciated!

@djarecka djarecka added help wanted Extra attention is needed question Further information is requested labels Jul 17, 2019
@djarecka
Copy link
Collaborator Author

@effigies
Copy link
Contributor

The problem is in setup.py, where we import from pydra, which means the entire project will get imported, producing a chicken-egg problem. I think when I wrote setup.py we didn't have any non-stdlib dependencies, so it was safe to import pydra. Other projects (including nipype) that use an __about__.py or info.py or similar read and evaluate that file without importing the package.

We've been re-packaging our stuff lately to use setup.cfg, rather than an __about__.py, which doesn't suffer from the same problems. If you like, I can submit a PR to do that.

@djarecka
Copy link
Collaborator Author

@effigies - thank you for your answer. It would be great if you can create PR!

@djarecka
Copy link
Collaborator Author

djarecka commented Aug 2, 2019

@effigies - i've decided to ping you again, since I'm trying to understand what is advantage of putting requirements in setup.cfg instead of setup.py. Could you help me with this?

My question was initially motivated by issues with mybinder - i believe it checks setup.py, but not setup.cfg.

@effigies
Copy link
Contributor

effigies commented Aug 2, 2019

The advantage to setup.cfg is just that it's declarative, rather than dynamic. But if you have a system that can't use it (meaning it uses setuptools < 30.3.0), then you'll have to put it back into setup.py.

Is it parsing it directly, rather than executing it? If it's executing, then it should be giving a warning about the setup_requires. But I don't know anything about mybinder.

@djarecka
Copy link
Collaborator Author

djarecka commented Aug 2, 2019

thanks for the answer. Binder creates a container from the requirements it gets from the repo. The problem is that the logs are disappearing after it's done, and I don't know how to see them later...

But I've just run couple tests, and I was wrong that it doesn't collect anything from setup.cfg. It does collect packages from install_requires, I'm just using packages that are in the tests, including downgrading tornado

@effigies
Copy link
Contributor

effigies commented Aug 2, 2019

Does binder have to run from the repository root? What if you put a requirements.txt in tutorials/? And will binder run with multiple notebooks?

@djarecka
Copy link
Collaborator Author

djarecka commented Aug 2, 2019

I've tested this last night, but didn't work. But I've joined the gitter room, will try to get some advice from them.

@effigies
Copy link
Contributor

effigies commented Aug 2, 2019

I can corner Holdgraf next week if needed.

@effigies
Copy link
Contributor

effigies commented Aug 2, 2019

But just another thought: We can make the tutorials separate repos for binder, but pull them in for testing.

@djarecka
Copy link
Collaborator Author

djarecka commented Aug 2, 2019

ok, will let you know if I get any answer.

I actually like the idea to have a separate repo, I know @satra wanted it here, but I'm not sure if he had any good reason other than testing.

@djarecka
Copy link
Collaborator Author

djarecka commented Aug 4, 2019

they suggested me to put requirements.txt to binder/requirements.txt, but when I did it, it mybinder couldn't find pydra (https://mybinder.org/v2/gh/djarecka/pydra/mybinder_req)...
I'm away from power/wifi entire week, so won't be checking if they have any other suggestions. If you see Holdgraf next week, you can ask in person as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants