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

Exclusion of json files with non-standard or compliant META prefixes #2

Open
M-DOREL opened this issue Oct 10, 2024 · 0 comments
Open

Comments

@M-DOREL
Copy link

M-DOREL commented Oct 10, 2024

Hello Maggot Team,

I tried to push files from Dataverse into Filebrowser and prefixed them with META to test if Maggot can handle them.

The result is an error parsing the file in the pdg_data/ directory (line with regex.sub(’ ’, value) in db-insert.py).

I understand that this is not the way to name the files. If the files have not been generated by Maggot, then there will be no ‘META_’ prefix.

But you can avoid this type of error for users in Filebrowser as I have done. If a user renames their file with the ‘META_’ prefix, there will be no files scanned and there will be an error.

I suggest creating :

  • a "scan.log" file in the directory to track inconveniences.
    (something with the logging module in python)
  • In the scan script (db-insert.py), check whether the ‘profile’ key is present in the json file scanned and check whether it ends with ‘maggot-schema.json’.

I hope this helps

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

No branches or pull requests

1 participant