DiffEqML / torchdyn

A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
https://torchdyn.org
Apache License 2.0
1.4k stars 130 forks source link

explicit package definition #193

Closed josephdviviano closed 1 year ago

josephdviviano commented 1 year ago

Added torchdyn explicitly to setup.py in order for pip install to correctly handle installation.

I would propose a follow up PR where pyproject.toml is changed from depending to poetry to setuptools, and removing setup.py entirely, so there is only a single build for the project to manage.

Specifically, I am referring to using the setuptools build system, as seen here.

But I will only do this if the maintainers agree it is worthwhile.

Zymrael commented 1 year ago

Thanks @josephdviviano, this seems useful. To clarify, are you suggesting we change the build system specified in pyproject.toml to setuptools?

josephdviviano commented 1 year ago

I would propose this as a follow up PR so that you can remove setup.py entirely and no longer depend on poetry. Poetry is fun, but for minimal maintenance setuptools is good and compatible with pypy.

This PR, as is, is to fix issues https://github.com/DiffEqML/torchdyn/issues/190 and https://github.com/DiffEqML/torchdyn/issues/183, which I think arise because pip install does not properly resolve the package directory automagically - it just needed a nudge in the right direction I think. AFAIK, pip install ignores pyproject.toml poetry entries, so it just relies on setup.py. I noticed some differences in the package requirements between the two files, which is one reason I'd suggest moving to a single pyproject.toml file in the long run.

josephdviviano commented 1 year ago

Let me know if I can do anything to help with the verification of this PR :)