ronuchit / pddlgym_planners

PDDL planner interface for PDDLGym.
MIT License
27 stars 15 forks source link

Request `setup.py` for pddlgym_planners #5

Open gabegrand opened 2 years ago

gabegrand commented 2 years ago

Hi @tomsilver - when you get a chance, would you mind adding a setup.py for this repo? I'm building something that uses PDDLGym (+ the planners). I want to create a Conda env file for PDDLGym like below. This requires that pddlgym_planners have a setup.py file like you do in the main pddlgym to enable the pip install. Thanks!

name: pddlgym
channels:
  - conda-forge
  - anaconda
dependencies:
  ...
  - pip:
    - pddlgym
    - git+https://github.com/ronuchit/pddlgym_planners.git
tomsilver commented 2 years ago

Hey @gabegrand thanks for your interest in these repos :) I just added a setup.py file, can you see if it suits your needs?

ronuchit commented 2 years ago

doesn't pddlgym have to be a dependency too?

tomsilver commented 2 years ago

yeah probably. also, we may need to do a new pypi release for pddlgym. I'll work on this...

gabegrand commented 2 years ago

Incredible -- thanks for doing this insanely quickly. Can confirm that the setup.py that @tomsilver created is sufficient to enable the conda environment, which suits my purposes. I'll leave it to Tom to decide whether you want to keep this issue open.

tomsilver commented 2 years ago

thanks for doing this insanely quickly.

we get over excited when people use our stuff! 😛

I added pddlgym as a dependency and cut a new release of pddlgym. The latter may be necessary because we recently fixed some compatibility issues with the latest version of gym.

Closing now. Thanks!

gabegrand commented 2 years ago

Hey @tomsilver, I think I spoke too soon -- this repo is not yet totally working via pip install. I think it's probably because there is no __init__.py file. This might require restructuring the repo directories as well.

Commands to repro:

> pip install git+https://github.com/ronuchit/pddlgym_planners.git
> python 
>>> from pddlgym_planners.fd import FD
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pddlgym_planners'
gabegrand commented 2 years ago

(I only discovered this when I went to rebuild the conda environment from scratch just now)

tomsilver commented 2 years ago

sorry about that, thanks for reporting. is there any chance you'd be able to contribute the fix? :) if not, we'll try to do it soon!

gabegrand commented 2 years ago

sure! would you mind adding me as a collaborator so I can push a branch and test it out?

ronuchit commented 2 years ago

done!

hmz-15 commented 2 years ago

sure! would you mind adding me as a collaborator so I can push a branch and test it out?

Hi Gabe! I have exactly the same issue. I'm wondering is there any update on this :) Thanks!