-
Notifications
You must be signed in to change notification settings - Fork 1
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
config file provided before command #458
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #458 +/- ##
==========================================
- Coverage 39.22% 39.00% -0.23%
==========================================
Files 11 11
Lines 1968 1974 +6
==========================================
- Hits 772 770 -2
- Misses 1084 1092 +8
Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
There shuld be no IFs here, the config must be set before any action i.e. sda-cli -config cli.conf ACTION -FLAGS
should be the only functioning command.
Config can be as a file or as ENV flags.
Usage
for all commands needs to be updated to match the new setup.
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.
Good work, @pahatz! Works well as far as I can tell!
I agree that it is a bit confusing that you can provide two configs, though... unless there's a use case I'm missing, it's probably cleaner to only allow one.
The README also needs some updates (apart from the Usage
sections in the go files, that Jocke mentioned).
I changed the behavior to work only for the config to be provided before the command. |
cdf06cf
to
14cbb58
Compare
14cbb58
to
072234b
Compare
Co-authored-by: Joakim Bygdell <[email protected]>
1d3f898
to
4b57b91
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.
I have just added a comment regarding path concatenation, otherwise, it looks great!
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 good to me. It's weird that the integration test failed even after I reran it. Maybe a rebase to the main will fix the problem.
|
v0.3.158 is the latest released version |
Co-authored-by: Joakim Bygdell <[email protected]>
Related issue(s) and PR(s)
This PR closes #442 .
Description
The user should be able to provide the config file location argument ONLY before the subcommand of the cli.
How to test
For test coverage, some of the existing tests have been altered to follow the new allowed order of providing the config, i.e. before the subcommand.
To manually test, one should test individually the cli commands that are affected. Those are the ones that are using the config as an argument(upload, list htsget, download).