-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add pip requirements.txt and Pipfile #8
Conversation
Add a requirements.txt for installation via pip, as well as Pipfile/.lock usable by Pipenv and eventual pip Pipfile support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this. I have a few comments.
Pipfile.lock
Outdated
@@ -0,0 +1,29 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was checking https://github.com/pypa/pipfile and it appears that you do not need to supply this file as it should be generated. If it's generated, then this shouldn't be included in the repo. Is there another reason why the lock file is included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Pipfile.lock enables deterministic builds - just meaning that the exact same code will be utilized. We can remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per this - we should probably leave it here unless you don't care about library versioning.
Pipfile
Outdated
verify_ssl = true | ||
|
||
[packages] | ||
python-snappy = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add minimum version requirements?
- python-snappy >= 0.5
- kafka-python >= 1.3.0
- PyYAML >= 3.11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this apply to requirements.txt as well with minimum versions instead of exact (==)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah...
Pipfile
Outdated
@@ -0,0 +1,8 @@ | |||
[[source]] | |||
url = "https://pypi.python.org/simple" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source should be: https://github.com/OpenBMP/openbmp-python-api-message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm like 80% sure that the source should be the source for the project requirements - not the source of the project itself. I can't find any examples of Pipfiles that don't use pypi as a source - it might be too early in its development. https://github.com/pypa/pipfile#pipfile-1
I looked through the code for pipfile and Pipenv, and I can't tell for certain. Need to find a complete spec, which I'm not certain exists right now.
Pipenv automatically converts requirements.txt to Pipfile format.
@TimEvens I have removed the Pipenv related materials and added the minimum versioning requirements to requirements.txt. Installation of dependencies is now just |
Add a pip requirements.txt and Pipfile/.lock to be used for installation of the library dependencies.
This resolves the need to manually install requirements detailed in README.md and can be updated with specific versioning as required. Or updated to automatically use the latest version, just request the change in the current code.