Use poetry for dependency specification
I made this package a poetry environment to make it more easily composable with other stuff that I'm working on (including this a local dependency in DecNashPlanning). I'm just leaving this PR here in case that may be interesting to you. Should you be interested in integrating this change, I'm also happy to update the README and make the corresponding PR in DecNashPlanning.
Interested! I'll wait for the draft to be ready and make some tests in the meantime.
Great. Do you prefer to have these changes starting from the main branch or form the DecNashPlanning branch? The latter is where I need them because there would be an easy way to compose everything with the DecNashPlanning repo (I also ported that to poetry).
@jamgochiana I think this is good to go. Here is a rough sketch of the plan:
-
I introduced an environment variable for the
INTERSIM_DATASET_DIRwhich usedutils.pyto set the global DATASET_DIR variable . I also changed all hard-coded occurrences of thedatasetsdir to use that variable and added a fallback to the old./datasetsdir so this change should be fully backward compatible. -
I will move DecNashPlanning also to poetry and add this package as a git dependency in poetry. Thus, you don't have to manually clone the repo to a specific directory anymore. Instead, you can just
poetry installfrom within DecNashPlanning and source anenvfile (which will contain the environment variables for the datasets etc) and everything should "just work" without copying data to specific directories.
Let me know if that sounds like a plan. If so, I'll file a PR to DecNashPlanning.