InteractionSimulator icon indicating copy to clipboard operation
InteractionSimulator copied to clipboard

Use poetry for dependency specification

Open lassepe opened this issue 4 years ago • 3 comments

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.

lassepe avatar Aug 29 '21 20:08 lassepe

Interested! I'll wait for the draft to be ready and make some tests in the meantime.

jamgochiana avatar Aug 30 '21 15:08 jamgochiana

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).

lassepe avatar Aug 30 '21 15:08 lassepe

@jamgochiana I think this is good to go. Here is a rough sketch of the plan:

  1. I introduced an environment variable for the INTERSIM_DATASET_DIR which used utils.py to set the global DATASET_DIR variable . I also changed all hard-coded occurrences of the datasets dir to use that variable and added a fallback to the old ./datasets dir so this change should be fully backward compatible.

  2. 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 install from within DecNashPlanning and source an env file (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.

lassepe avatar Aug 30 '21 19:08 lassepe