Arcadia-Science / arcadia-pycolor

Python package for styling plots according to Arcadia's style guide
MIT License
4 stars 0 forks source link

Use poetry for dependency management and build tooling #10

Closed keithchev closed 4 months ago

keithchev commented 4 months ago

Overview

This PR introduces poetry for dependency management and build tooling. The purpose of this is to allow us to publish the arcadia-pycolor package to PyPI so that it is pip-installable using pip install arcadia-pycolor.

This involves the following changes:

Drive-by changes

Testing

All of this was done manually.

review-notebook-app[bot] commented 4 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

keithchev commented 4 months ago

Should I be using poetry to manage my dev environment dependencies instead of conda? Could someone point me to their favorite resources for making that transition/ what the caveats are?

Do you mean for apc or in general? For apc, I added instructions in the readme that should be easy to follow (I hope). For most projects, I think conda is fine. IMO poetry is only worth using for projects that are python packages that we need to build and release, as it provides build tooling (the poetry build and poetry publish commands) that makes this easier. Its strict dependency management (the lockfiles) is also nice, but conda env files come close enough. Plus many projects have dependencies that are only on conda-forge or bioconda, and poetry won't work for those.

I actually intended usage_examples.ipynb to just be a temporary document I'm using to illustrate the API in detail (and test its functionality in Jupyter notebooks), with the hope that actual demonstration / walkthrough of the API for a user will live somewhere else, such as in the README. Not sure what the best place for that might be, but a mkdocstrings Markdown page might be the easiest. I'd argue that we should have at least a small handful of usage examples in the README in addition to the installation instructions. But in any case, I'm fine with deleting all these files for now to declutter the repo.

Agree re the mkdocs solution and having examples in the README. But we should find a way to avoid making README.md an artifact that has to be generated from a notebook, just because this is a bit messy and hard to maintain.