Enhancement: Add --reload Flag to Load Data from a Specified File
#11
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: nick/753-Data-Sync#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
This enhancement introduces a new command-line argument
--reloadto the data synchronization script. When this flag is used, the script will truncate the specified feature layer in ArcGIS and load data from a specified JSON file instead of fetching it from the API. This feature is useful for scenarios where data needs to be reloaded without making API calls, allowing for quicker testing and data management.Motivation:
In situations where data has already been fetched and stored in a JSON file, it can be inefficient to re-fetch the data from the API. The
--reloadflag provides a way to quickly load existing data into the ArcGIS feature layer, streamlining the data management process.Implementation Details:
Command-Line Argument:
--reloadhas been added to theparse_argumentsfunction.Main Function Logic:
mainfunction has been updated to check for the--reloadflag.Code Changes:
parse_argumentsfunction to include the--reloadflag.mainfunction to handle the loading of data from the specified file.Example Usage:
To run the script in reload mode, use the following command:
Acceptance Criteria:
--reloadflag should be successfully parsed by the script.--reloadflag is used, the script should truncate the specified feature layer.--reloadflag is not provided, the script should continue to function as before, fetching data from the API.Additional Notes:
--reloadflag is not provided.Add `--reload` Flag to Load Data from a Specified Fileto Enhancement: Add `--reload` Flag to Load Data from a Specified FileStatus: This feature is ready for testing. Please verify the functionality as per the acceptance criteria outlined above.
The enhancement has been successfully tested, and all acceptance criteria have been met. The
--reloadflag is functioning as expected, allowing the script to load data from a specified JSON file. Documentation has been updated accordingly. Ready for merging!