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
[WIP] Install optional dependencies by default #405
base: main
Are you sure you want to change the base?
Conversation
I don't think we can avoid that. Quoting from the
Note that there is no mention of Lines 8 to 9 in e397acb
which we need to have |
I wonder if you're suggesting for a monorepo architecture, that is absolutely possible. So I guess we'll need to have two different directories i.e. |
My idea would be to have a
The install should be fairly straight-forward. For a local development environemnt we run
Could you elaborate what you want to test? Do you mean our test suite or something else? If you mean the test suite, why do you want to test both? We should just require
Sure. If we have a clean way to avoid all of the above, I prefer that as well. |
Yes, I was thinking that the test suite might break in case of |
Still, I'm not sure if this'd raise and import issue for optional dependency methods (if it'd we would need to add informative warnings and error and also test |
From these couple of days I've been trying to configure a concurrent |
Depending on a
Meaning, we could do it, but even the official maintainers are advising against it. The exception that they make is for building C extensions, but we are not doing that. For this PR this means: if we cannot do it with just a |
Oh thanks Philip for making it clear in the start. Fortunately I got one more solution while scrolling web today (thanks to this comment) which looks much promising to me as compared to |
I don't understand that. Basically, the only duplication would be the metadata in the Note that the new |
…while symlinking with any of them dynamically
With the current changes I'm able to build
And
|
We can also get rid of |
I see. Sorry, with the comment above I misunderstood that we'd had to have |
Hi, @arjxn-py. I had another idea about how to go about doing this, so I am posting this comment as requested by @pmeier. I would say that having the changes in Even though the The dynamic dependencies currently noted in import os
from setuptools import setup
with open('requirements.txt') as f:
ragna_dependencies = f.read().splitlines()
with open('requirements-base.txt') as f:
base_dependencies = f.read().splitlines()
name = 'ragna-base' if os.environ.get("BUILD_RAGNA_BASE") else 'ragna'
dependencies = base_dependencies if os.environ.get("BUILD_RAGNA_BASE") else ragna_dependencies
setup(
# ...
name=name,
version='',
packages=['ragna'], # or find_packages() with include= and exclude= attributes
install_requires=dependencies,
# and so on
) while the rest of the project metadata stays in This is where you can switch between particular requirements at the time of running the build frontend ( P.S. Sorry, I meant to post this yesterday – I didn't hit the "Comment" button and this comment stayed as a draft, oops! Now that I think of it, to avoid using P.P.S. Another option is to look at how |
Hey @agriyakhetarpal, thanks for such a descriptive comment, much helpful. I'd be happy to integrate the suggested changes and would potentially get rid of nox.
Just to let you know, I've tried to figure out what they've been doing and not been able to get more information about the significant of environment variable they're using and how they're handling it. |
For current changes Build for Ragna package & Build for ragna-base package both builds for ragna in spite of me trying to overwrite the name and dependencies in shim In next commit I'll compare it to the approach using |
With the nox, the build seems pretty fine to me here are the trees for Ragna & ragna-base Note that I'd suggest to not add And if we want to further get rid of the But overall we've one proof of concept ready :) |
This PR aims to give user the total control with
pip install ragna
i.e. which will correspond to currentragna[all]
& also proposes a proof of concept forragna-base
which will give user the fine-grained control i.e. will further correspond to currentragna
.Related to #397
NOTE