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

Requirements for cleanup script #283

Open
k-nut opened this issue Feb 4, 2016 · 4 comments
Open

Requirements for cleanup script #283

k-nut opened this issue Feb 4, 2016 · 4 comments
Labels
enhancement infrastructure A point concerning the public instance or general infrastructure

Comments

@k-nut
Copy link
Contributor

k-nut commented Feb 4, 2016

As announced in #282 I am currently creating a validation/cleanup script to run if new data is submitted.

The goal is to make sure that the geojson does not contain too many properties. The question that I have now is which properties should be allowed. It seems that most files contain the following: [ 'name', 'created_at', 'updated_at', 'cartodb_id' ]. Should I check for those? Also, are created_at and updated_at mandatory?

@mwichary
Copy link
Contributor

mwichary commented Feb 7, 2016

I don’t think so, but I think CartoDB outputs them by default.

@mwichary
Copy link
Contributor

mwichary commented Feb 7, 2016

Note that there are also some multilingual files. Those have more valid columns (the names of those columns are in the json file).

@k-nut
Copy link
Contributor Author

k-nut commented Feb 14, 2016

I created a first version that does validation. It reads all the geojson files in the public/data directory and checks their metadata to see which languages should be in the geojson.
It then reads the geojson and sees if there are any additional fields.

I added this as a build step on travis and imagine it running whenever someone sends a pull request. Ideally the script does not return any warnings but if the pull request introduces new unnecessary fields one would be made aware of it.

An example of the output can be found here: https://travis-ci.org/k-nut/click_that_hood#L170
The code is in my branch

What do you think of this?

@k-nut
Copy link
Contributor Author

k-nut commented May 14, 2016

@mwichary any feedback on this? I still think that it could be useful if you would like to keep the file size small and not include any unnecessary fields. But I am also open to other ideas or you saying that you do not see a need for this.

@fnogatz fnogatz added enhancement infrastructure A point concerning the public instance or general infrastructure labels Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement infrastructure A point concerning the public instance or general infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants