Skip to content
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

fix childcare provider import doc #2200

Merged
merged 2 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/acquiring_new_private_childcare_provider_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Acquiring new Private Childcare Provider CSV data for import

1. [Overview](#overview)
1. [Acquiring the ODS files](#acquiring-the-ods-files)
1. [Acquiring the CSV files](#acquiring-the-csv-files)
1. [Extracting the data](#extracting-the-data)
1. [Importing the data](../docs/importing_data.md#importing-private-childcare-provider-data)

Expand All @@ -28,5 +28,5 @@ Download from the above link the CSV files named:
- delete the non-header rows from the files - the first line should be the CSV header

As the exact structure of these files can differ year to year it is worth running these files through the import process locally to ensure the data is being imported correctly before committing the files to the repository. Any changes would mean that the [import rake task](../lib/tasks/private_childcare_providers.rake) would need to be updated to reflect the new structure, these changes would be made in the CSV row wrapper classes:
- [Importers::ImportPrivateChildcareProviders::ChildcareProviderWrappedCSVRow](../app/services/importers/import_private_childcare_providers)
- [Importers::ImportPrivateChildcareProviders::ChildminderAgencyWrappedCSVRow](../app/services/importers/import_private_childcare_providers)
- [Importers::ImportPrivateChildcareProviders::ChildcareProviderWrappedCSVRow](../app/services/importers/import_private_childcare_providers.rb)
- [Importers::ImportPrivateChildcareProviders::ChildminderAgencyWrappedCSVRow](../app/services/importers/import_private_childcare_providers.rb)
4 changes: 3 additions & 1 deletion docs/importing_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ If you need to update all schools you can do this by running the (Sync School Da

See [Acquiring New Private Childcare Provider data](docs/acquiring_new_private_childcare_provider_data.md) for how to acquire new data.

The import should be run on staging and production.

### Locally
- Open a rails console and run the following
- `bundle exec rake 'private_childcare_providers:import[lib/private_childcare_providers/2024-12-31/childcare_providers.csv,childcare_providers]'`
- `bundle exec rake 'private_childcare_providers:import[lib/private_childcare_providers/2024-12-31/childminder_agencies.csv,childminder_agencies]'`

### Production
### Staging and Production
There is no Github Action for this, the above rake tasks need to be called.

## Importing premium pupils data
Expand Down
Loading