yulqen / datamaps

MOVED: Command line interface to yulqen/bcompiler-engine. Used by DfT to collect and clean data using Excel spreadsheets.
https://git.sr.ht/~yulqen/datamaps
MIT License
2 stars 2 forks source link

option to specify datamap document #7

Closed banillie closed 4 years ago

banillie commented 4 years ago

Hi Matt, it would be good if there was some optionality to specify which datamap should be used in the command. You may recall that we actually use one version of the datamap for export and another version for import. It would be handy if we could specify in the command which datamap should be used. Just a thought. Hope you're enjoying the long weekend.
Cheers, Will.

yulqen commented 4 years ago

I'll have a look at that. Great suggestion!

yulqen commented 4 years ago

Implemented option to specify datamap in import in a962f9411eab9f0e55620b8c686279edc254ccc0 and https://github.com/hammerheadlemon/bcompiler-engine/commit/ae1177a48ef944d05a09d4358486bf3ab4629a39.

Will take the form - both are equivalent:

datamaps import templates -m -d "/path/to/datamap_alterative.csv" and datamaps import templates -m --datamap "/path/to/datamap_alterative.csv"

Working on export next. Will soon be ready for testing if you are able?

banillie commented 4 years ago

Yes certainly. :+1:

yulqen commented 4 years ago

Morning @banillie!

When you have a moment, can you please test the updated version of datamaps which now incorporates this feature.

In your terminal:

python -m venv /tmp/dmtest source /tmp/dmtest/bin/activate pip install datamaps pip list - you should have 1.0.5 or both datamaps and bcompiler-engine. datamaps import templates --help - you should see new -d flag. datamaps export master --help - you should see new -d flag.

Test!

When you're done you can raze the virtualenv with deactivate then rm -r /tmp/dmtest.

Let me know all feedback. Good luck.

I will build the Windows exe file once we're happy.

banillie commented 4 years ago

Excellent. Will try and test tonight @hammerheadlemon 👍

banillie commented 4 years ago

Hiya Matt all tested and working successfully. Should make handling the different datasets required for import and export much easier in the future. Great stuff. Congratulations.

yulqen commented 4 years ago

Awesome. Thanks for checking so quickly. Let me know if you hit any problems.

banillie commented 4 years ago

Thank you for re-coding and closing this improvement so quickly.