google / brax

Massively parallel rigidbody physics simulation on accelerator hardware.
Apache License 2.0
2.34k stars 255 forks source link

Add PyPI package for `pip install` #5

Closed danielsuo closed 3 years ago

danielsuo commented 3 years ago

We currently do this manually for deluca, but set up the automated process using a .github/workflow to upload each time we push a tagged version to GitHub.

I can do it manually for now and we can get more sophisticated as time goes on?

danielsuo commented 3 years ago

Here's an example: https://pypi.org/project/brax/

Let me know if there's a PyPI user for me to add ownership for!

erikfrey commented 3 years ago

Thanks so much for doing this! This will make installing brax easier for folks.

Please add ownership for PyPI user 'erikfrey'

danielsuo commented 3 years ago

Done!

On Thu, Jun 24, 2021 at 3:57 PM Erik Frey @.***> wrote:

Thanks so much for doing this! This will make installing brax easier for folks.

Please add ownership for PyPI user 'erikfrey'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/brax/issues/5#issuecomment-867912334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAURLVRLJPQXRE4S7QB75W3TUOE3RANCNFSM47IQQAWA .

erikfrey commented 3 years ago

Thanks again!

erikfrey commented 3 years ago

Hi @danielsuo - I noticed the pypi release has the directory brax/envs but no others. It should have:

brax/envs
brax/training
brax/io
brax/tools
brax/tests
brax/physics

Do you know why that is? Let me know how I can help.

danielsuo commented 3 years ago

Ah! That's because none of these directories have an __init__.py file (even a blank one). It is totally my fault for not raising it earlier. I thought it might be intentional, but of course, the package would break without at least physics.

Simply adding an empty __init__.py file would resolve these issues. Shall I add?

(Of course, this would also bump us to 0.0.3 at least...FWIW, many Python projects I've seen expend their early patch numbers to PyPI uploading issues...perhaps I am the common factor...)

erikfrey commented 3 years ago

Derp, good catch. Happy to add the init's on Tuesday, but if you're blocked feel free to open the PR now and I'll review today, thanks. No big deal bumping patch numbers - we could bump them to infinity and it won't bother anyone if it's not a breaking change.

danielsuo commented 3 years ago

Put up 0.0.3!

erikfrey commented 3 years ago

Just tried it out and works great - did pip install brax, then imported it, created an env, and stepped through it. Thanks!