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

Update local authorities data #219

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

slawosz
Copy link
Contributor

@slawosz slawosz commented Nov 13, 2024

Due to a size of the LocalAuthority data file, I had to split it to few files to avoid using Large File Storage.

Copy link

Review app deployed to https://cpd-tsh-review-219.test.teacherservices.cloud/

@slawosz slawosz force-pushed the 2165-update-local-authorities-data branch from 9698d2b to 37226d1 Compare November 13, 2024 11:17
Copy link

@jebw jebw left a 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
Comment on lines 28 to 40
```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
```
Copy link

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?

@slawosz slawosz force-pushed the 2165-update-local-authorities-data branch from 37226d1 to 2b2c36f Compare November 13, 2024 15:13
@slawosz slawosz force-pushed the 2165-update-local-authorities-data branch from 2b2c36f to e739112 Compare November 13, 2024 15:36
@slawosz slawosz added this pull request to the merge queue Nov 13, 2024
Merged via the queue into main with commit cedc4ab Nov 13, 2024
9 checks passed
@slawosz slawosz deleted the 2165-update-local-authorities-data branch November 13, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants