LucjanJanowski / translator-to-suJSON

Read subjective experiment data to suJSON format.
MIT License
2 stars 1 forks source link

TODOs for proper Python package #3

Closed slhck closed 5 years ago

slhck commented 5 years ago

If we want this to be come a proper Python package that users can install via pip install sujson, we need to:

… and probably other things.

I am happy to take care of this, particularly if you have not done this before, it can be a quite daunting task, but I have released a couple of packages on PyPI so I can lead this task.

Here is an example for a simple, command-line-executable and pip-installable package: https://github.com/slhck/scenecut-extractor

Qub3k commented 5 years ago

Thank you! Indeed, I have not had a chance to prepare any Python code to become a proper package. Nevertheless, I am willing to learn how to do it and help you move through this process.

slhck commented 5 years ago

@Qub3k I'd still like to make some more general changes that would be needed in order to make this a standalone Python package with a few entry points (scripts that can be run by the user) and library code (things that are shared by multiple scripts).

This would include some logic to have default command line arguments and additional config options through config.json.

Also, I would like to know what kind of scripts you plan on having. I imagine that in the beginning we will have:

Can you let me know when you merge the next PR, so that I can go ahead and re-structure a little bit? I guess that whatever my change will be, it would cause conflicts if there is any work done in between. For example, if you tell me that there are not going to be huge changes in the week after QoMEX, I can do my changes then (i.e., starting from June 10th).

Thanks for your great work on this! 👍

slhck commented 5 years ago

We can actually invoke more or less the same code via different commands without having to provide separate Python files. See, e.g.:

https://github.com/wireservice/csvkit/blob/master/setup.py#L55

We could have these three entrypoints all pointing to the same sujson.parser class, and implement more parsers as we go.

Qub3k commented 5 years ago

I like the idea with a single parser (and three entry points). 👍 I will merge the pull request no later than the beginning of next week (around Monday - Tuesday).

We do not plan any major changes soon. Only some extensions to what is already present in the repo. 🙂

slhck commented 5 years ago

Fixed in #11