-
Notifications
You must be signed in to change notification settings - Fork 12
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
CLI: Adding new command 'configuration' #741
Conversation
Hi @SatyamMattoo, thank you for this but shouldn't you be spending your time on the DMP job writing service? |
Hello @josephjclark, Best regards, |
hmm, Ok. Unfortunately this is a very low priority feature. I would have preferred your day had been spent on DMP. Having had a quick glance I notice you're downloading definitions from jsdelivr. But the CLI already has the ability to download adaptor versions to a local repo. Rather than download the data each time, I think we should be using the local repo. We already have similar functionality with the At the very least we should be doing some caching of results here. The slower the service is, the less useful it is to users. I'll come back and look at this when I have a bit more time. |
Hi @SatyamMattoo - please don't maintain this PR for the time being. It is not worth your time. I will look at it when I have time and give you feedback so that we can merge it in. |
Hello @josephjclark, Sorry, I was just updating the main branch for my fork. Moving forward, I’ll make sure to branch off the main and work on separate branches as needed. |
@SatyamMattoo No need to apologise! You've done nothing wrong. If you want to keep a fork of If you're planing on making more contributions I'd appreciate it if you messaged me first. I really don't have much capacity over the next few weeks and my priority is to work out how to merge your DMP branch. I just want to make sure you spend your time effectively. |
@josephjclark Sure, I’ll branch it off as suggested. For the DMP, if I can assist with anything related to the merge or the feature, I’d be happy to help. I have some free time and can focus on speeding up the process. |
Short Description
Added a new configuration command that retrieves and displays the configuration of a specified adaptor. The command supports flags to return the sample schema, full schema, or both.
Related issue
Fixes #711
Implementation Details
Added a new configuration command to fetch and display adaptor configurations.
The command accepts an adaptor name (with or without a version) and retrieves the full configuration from the CDN.
Constructs a sample configuration using required fields and their examples from the full schema.
Supports
--schema
,--sample
and--both
(default) flags to specify the desired output.Command:
openfn configuration @openfn/language-dhis2 -o tmp/output.json --schema
QA Notes
Unit tests added for the command options and the configuration handler function. Tested locally with various adaptors to ensure correctness.
Checklist before requesting a review