-
Notifications
You must be signed in to change notification settings - Fork 10
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
USAGOV-432: state directory import #690
Conversation
…in/dev' into USAGOV-432-state-directory-import
…and update prep script
…s_import_prep.php
… state directory records
…breviations field
…in/dev' into USAGOV-432-state-directory-import
…in/dev' into USAGOV-432-state-directory-import
…ers in the Docker CMS container
Well, this was a rabbit hole. It turns out "iconv" doesn't work the same way on all platforms. It's not the php function, but rather libiconv. musl-libc does not support the //TRANSLIT suffix. Mentioned here: codecasts/php-alpine#39 , which links to this explanation: https://wiki.musl-libc.org/functional-differences-from-glibc.html#iconv (they do it differently on purpose). I've removed //TRANSLIT from my iconv target encoding; at least for this data set, it turned out not to be needed. I've also added "error_reporting(-1);" to the script so that iconv errors are reported -- since we call this once per record, this makes it pretty obvious when there's a problem. |
…in/dev' into USAGOV-432-state-directory-import
…lias, rather than using mothership path
…in/dev' into USAGOV-432-state-directory-import
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.
Success!
Jira Task
https://cm-jira.usa.gov/browse/USAGOV-432
Description
This PR adds a script for massaging exports from mothership into a CSV format for import into beta, and a feed configuration for importing that CSV data. There are also some incidental corrections (like the list of "state" abbreviations in the state_directory_record content type) and a bit of documentation.
I'm recommending that PR review consist of making sure the instructions work for someone besides me, and that you wind up with a batch of imported State Directory Records after going through the process. The Content team will look at the actual results of the import once this gets into the dev environment.
This PR includes configuration, so you'll need to "drush cim" before doing the import.
Sample files have already been exported from mothership and can be downloaded from https://drive.google.com/drive/folders/1MRUgvLkfZgNeCh_xL5hgpdG-ues9ij4W (the exports_from_mothership folder).
Refer to the instructions in https://github.com/usagov/usagov-2021/blob/USAGOV-432-state-directory-import/web/modules/custom/usagov_directories/docs/Importing_State_Records.md
The expected result is that you will have a bunch of records (118, since the import data set is known), about half in English and half Spanish:
Checklist for the Developer
Checklist for the Peer Reviewers