-
Notifications
You must be signed in to change notification settings - Fork 153
Conversation
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class PullFormFromCentral { |
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.
Is it still conventional to use nouns for classes? If so, how about CentralFormPuller?
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.
CentralFormPuller
wouldn't be correct because this class statically describes a pull operation but it doesn't actually perform it (that's the JobsRunner
's work).
I consider this class to be part of a group of domain operations (actions). The complete name would be PullFormFromCentralAction
but it'd be longer with the Action
suffix and feels redundant.
: response.isNotFound() | ||
? "Error connecting to Central: Central not found" | ||
: "Error connecting to Central"); | ||
return; |
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 starting to like this form of if/else if/…/else if/else. I prefer that the question mark abut the question, as in English, but I accept your style.
Tested with success!! @opendatakit-bot unlabel "needs testing" |
Closes #763
This PR adds new pull from Central and push to Central CLI operations.
This PR deprecates
-url --aggregate_url
(see below)What has been done to verify that this works as intended?
Run both CLI operations using the
all-widgets
form and the Central sandbox at https://sandbox.central.opendatakit.orgWhy is this the best possible solution? Were any other approaches considered?
This PR replicates the same things we already are doing for Aggregate server.
Instead of having shared args for things like the server's url and credentials, I considered having a separate set of args, but it felt bloated and not very reasonable overall.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
To be able to share args for the server's url and credentials, I had to review the language on their shortcode, longcode, and descriptions, and I found an irreconcilable issue with the
-url --aggregate_url
argument. I had to either change the longcode to--server_url
or deprecate it and create a new arg. I opted for the latter, which means that users won't be able to continue using-url
and will be prompted to use the new-U
CLI arg.Does this change require updates to documentation? If so, please file an issue at https://github.com/opendatakit/docs/issues/new and include the link below.
Yes! getodk/docs#1069