Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Ranger a python package #21

Merged
merged 2 commits into from Nov 21, 2019
Merged

Conversation

mpariente
Copy link
Contributor

As discussed in #20, it would be really practical to have these optimizers in a package. This PR makes that possible. ranger can be installed and imported in all python projects, no need to copy paste the ranger optimizer anymore. This also allows to give you proper credit where it is used (I'll add it in the requirements in asteroid for example).

I also updated the README with the install and usage instruction.
You can clone the repo, then install it with pip in editable mode (pretty practical for research) or not.

Note : In the __init__.py I imported the three optimizers so that they can be imported from the package directly (from ranger import RangerQH instead of from ranger.rangerqh import RangerQH). Both ranger.py and ranger913A.py had the same name for the class, so I changed the class in ranger913A.py to RangerVA (for versionA).

I'd like to here from you, this would be very practical to have it as a package.

@lessw2020 lessw2020 merged commit 6fde475 into lessw2020:master Nov 21, 2019
@lessw2020
Copy link
Owner

Hi @mpariente,
Thanks a ton for this. I just responded on the other thread before seeing this linked in.
I'm merging it in now and thanks for fixing the naming collision. :)

@mpariente
Copy link
Contributor Author

mpariente commented Nov 21, 2019

It's a pleasure, thanks to you.
Just to be clear, this cannot be installed with pip just yet.
In order to pip install ranger, the package needs to be uploaded to PyPI but I added to instructions to install it from git in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants