-
Notifications
You must be signed in to change notification settings - Fork 52
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
Separate conda-store app instance from config #1023
Conversation
✅ Deploy Preview for conda-store canceled.
|
✅ Deploy Preview for conda-store canceled.
|
9a4f0d2
to
469c060
Compare
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 few general questions about this:
conda_store_server._internal.server.app.CondaStoreServer
still inherits fromtraitlets.config.Application
. Is this needed anymore? Like doestraitlets
actually do anything for theCondaStoreServer
after this change?- There are still configuration options in the
CondaStoreServer
class. Does it make sense to move these toCondaStoreServer.config
? For someone unfamiliar withconda-store
, it will be hard to understand why these config values live on the class while others live on.config
.
I'm definitely in favor of this, but I'll avoid merging until we get feedback from @trallard and possibly others.
config=True, | ||
allow_none=True, | ||
) | ||
class CondaStore: |
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.
Would it be possible to add some documentation about what this is? What does this class do, how is it different from the traitlets/FastAPI CondaStoreServer
application, etc would be very helpful here.
Really this seems like a celery worker manager - maybe a different name could provide a clearer idea what this class is for. Or maybe the webserver should be named differently 🤔 What do you think?
e8c5390
to
4bd2b75
Compare
Yep, it's still needed in order for there to be
Ya, I think we can do that. But I would say it's out of scope for this PR. I think conda-store should be working towards:
in order to achieve these 2 ends we'll need to separate out configuring the |
Awesome, thanks for the explanation, I'm all clear on this now 🚀 |
bd1f4da
to
f80f9e3
Compare
e14c92f
to
38d28f4
Compare
pre req for resolving #1005
Description
This PR refactors
conda_store_server/app.py
to split the config portion and app instance portion of the class. The goal of this refactor is more clearly delineate responsibility between the 2 classes/pieces of functionality. Eventually, this should also make how to approach changes to the config more clear.2 new objects are introduced:
conda_store_config:CondaStore
conda_store:CondaStore
conda_store:CondaStore
get_settings
,set_settings
, etcconda_store_config:CondaStore
Pull request checklist