-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update local authorities data #219
Conversation
Review app deployed to https://cpd-tsh-review-219.test.teacherservices.cloud/ |
9698d2b
to
37226d1
Compare
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.
Looks good but a rake task seems like a better option than documenting the required code
README.md
Outdated
```ruby | ||
file = Rails.root.join("db/data/authorities.json").freeze | ||
|
||
size = 80 | ||
5.times do |i| | ||
data = JSON(File.read(file)) | ||
data["features"] = data["features"][(size*i)...(size*(i+1))] | ||
|
||
filename = Rails.root.join("db/data/authorities_#{i+1}.json") | ||
File.open(filename, 'w') { |file| file.write(data.to_json) } | ||
end | ||
``` |
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.
This can be a rake task the developer can just run locally?
37226d1
to
2b2c36f
Compare
2b2c36f
to
e739112
Compare
Due to a size of the
LocalAuthority
data file, I had to split it to few files to avoid usingLarge File Storage
.