Add Poetry support
Since it seems like the author wants to get this project into better shape, I might as well do my part by fixing up the package management.
This PR:
- Adds a
pyproject.tomlutilizing poetry (and generates apoetry.lockfile) - Moves source files into
dcolor/and exposes names viadcolor/__init__.py - Fixes examples, when run using
poetry run python- Adding ".." to
sys.pathonly works when runningpythonfromexamples/. Poetry at least provides the guarantee of matching to the correct virtual environment, and works from anywhere in the project tree
- Adding ".." to
- Runs black to format all Python files in the project
- Removes the
__pycache__and.DS_Storefiles (filesystem ephemera), and adds them to the.gitignore
thanks! admittedly I don't know much about the python ecosystem these days, so was asking some colleagues for their input on this as well. just one comment
Incidentally, while working on one of said other branches, I got interested in generating the images in the README programmatically. It seems like images/hsvcolor.png is incorrect. When I generate it, I get something identical to dcolor.png visually (although the binary contents differ).
Tool used: https://www.diffchecker.com/image-compare/
@hernanat Wanted to make sure you saw the commits I added to this. I also left a big list of things I suggested working toward in the issue linked above (#5). I have a branch based on this one which has a more imperative feel (and makes it easier to generate examples for the README), but I don't want to make this PR any harder to review.
@hernanat Wanted to make sure you saw the commits I added to this. I also left a big list of things I suggested working toward in the issue linked above (#5). I have a branch based on this one which has a more imperative feel (and makes it easier to generate examples for the README), but I don't want to make this PR any harder to review.
hey there! Thank you, yes I did see. Sorry -- I have been on vacation & traveling a bunch. I will try to get to all of this in the next few days when I have some free time.
thank you again for all of this!