-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update instructions for local development #10
Conversation
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
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.
Looks great! Just one small point—I think this line here also needs updating, as there’s no src/
in our project tree. Could you add that adjustment to this PR as well?
The rest of the changes look excellent and are definitely helpful for local testing. Thanks!
@@ -33,6 +33,10 @@ def get_app(httpx_client=None) -> FastAPI: | |||
get_logger("gen3workflow", log_level=log_level) | |||
|
|||
logger.info("Initializing Arborist client") | |||
if config["MOCK_AUTH"]: |
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'm assuming, Gen3Config would automatically ignore if there is no key MOCK_AUTH
in the actual config, instead of throwing an error here?
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.
The default is False. Defaults are managed by gen3config.
@@ -42,25 +42,44 @@ To use a configuration file in a custom location, you can set the `GEN3WORKFLOW_ | |||
|
|||
## Run Gen3Workflow | |||
|
|||
Update your configuration file to set `LOCAL_MIGRATION` to `true`, so that no attempts to interact with Arborist are made. |
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.
When was this implemented, I tried to even go back in the commit history to see this. Couldn't find it.
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.
That's a copy paste from requestor
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.
😅 Gotcha!
@@ -64,8 +71,10 @@ async def authorize( | |||
resources: list, | |||
throw: bool = True, | |||
) -> bool: | |||
token = self.get_access_token() | |||
if config["MOCK_AUTH"]: |
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.
This is perfect! I was attempting to set up something similar locally to test some functionality. With this change, I won’t need to anymore—appreciate it!
@@ -8,6 +8,9 @@ DOCS_URL_PREFIX: /gen3workflow | |||
# override the default Arborist URL; ignored if already set as an environment variable | |||
ARBORIST_URL: | |||
|
|||
# /!\ only use for development! Allows running gen3workflow locally without Arborist interaction |
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.
Appreciate the warning.
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.
Looks great. Approved
Improvements