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

Package for pip install #202

Merged
merged 4 commits into from
Mar 15, 2020
Merged

Package for pip install #202

merged 4 commits into from
Mar 15, 2020

Conversation

devinaconley
Copy link
Contributor

Allow installation of robosat package with pip. This could be hosted on PyPI or installed directly from Github.

e.g.

pip install git+https://github.com/mapbox/robosat.git@master

setup.py Outdated
'toml>=0.10',
'torch>=1.1',
'torchvision>=0.3',
'tqdm>=4.32',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you come up with this list and the versions? List from requirements.in and then manually getting the versions from the requirements.txt lockfile? Then why is it >= above? Can we somehow automate this by parsing the requirements files? Otherwise updating dependencies gets even more complicated than it is already right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep exactly. And I did not want to specify exact versions as the solver will likely need to some flexibility for installation into a larger project. As an alternative to >=, we could specify ~= to enforce a compatible version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the requirements to enforce compatible versions with ~=, except for osmium==2.15.2, which requires an exact version due a known issue with their latest release
osmcode/pyosmium#123

Automatically parsing the requirements.txt is possible, but would need to update for less strict versioning, and is generally not advised

@ocourtin
Copy link
Contributor

Could also worth to add an rs entry point:

 entry_points={"console_scripts": ["rs = robosat.tools.__main__:main"]},

@ocourtin
Copy link
Contributor

@devinaconley Humm, i think @daniel-j-h point is less >= vs ~=
than how to not spread package versions in several places (i.e requirements.* + setup.py).

If you look on robosat.pink project,
we manage it with a single requirements.txt parsed in setup.py
(impliying MANIFEST.in entry)

HTH,

@devinaconley
Copy link
Contributor Author

@ocourtin responded to that part in line with the original comment ^

@daniel-j-h daniel-j-h merged commit e459840 into mapbox:master Mar 15, 2020
@daniel-j-h
Copy link
Collaborator

Thanks!

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.

3 participants