-
Notifications
You must be signed in to change notification settings - Fork 332
Setup file for building distributions and tox integration for testing #3
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
Conversation
hiranya911
commented
Mar 23, 2017
- setup.py enables building releases
- tox integration supports testing on different platforms (currently only one platform defined -- python 2.7; more platforms will be introduced in future PRs)
… distributions; Added contribution guide
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 had a handful of mostly minor comments.
.github/CONTRIBUTING.md
Outdated
which just ask about usage will be closed. Here are some resources to get help: | ||
|
||
- Go through the [guides](https://firebase.google.com/docs/admin/setup/) | ||
- Read the full [API reference](https://firebase.google.com/docs/reference/admin/node/) |
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.
s/node/python
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.
Done
.github/CONTRIBUTING.md
Outdated
```bash | ||
$ git clone https://github.com/firebase/firebase-admin-python.git | ||
$ cd firebase-admin-python # go to the firebase-admin-python directory | ||
$ pip install -U pytest # globally install pytest test framework and executor |
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.
Isn't there such thing as a requirements.txt
file that we can use like a package.json
so users can just do something like pip install
?
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.
Turns out there is. Done.
.github/CONTRIBUTING.md
Outdated
higher using pip: | ||
|
||
``` | ||
pip install -U pylint |
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.
This is a bit redundant given the previous section.
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.
Updated the setup instructions to install the proper versions of the tools.
.github/CONTRIBUTING.md
Outdated
unit tests. Download pytest 3.0.6 or higher using pip: | ||
|
||
``` | ||
pip install -U pytest |
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.
Ditto on this being redundant.
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.
Removed.
.github/CONTRIBUTING.md
Outdated
``` | ||
pytest | ||
``` | ||
Refer to the pytest [usage and invocations guide](http://doc.pytest.org/en/latest/usage.html) |
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.
Nit: add a new line after the triple backticks.
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.
Done
setup.py
Outdated
here = path.abspath(path.dirname(__file__)) | ||
|
||
long_description = ('The Firebase Admin Python SDK enables server-side (backend) Python developers ' | ||
'to integrate Firebase into their services and applications. Currently 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.
I'd drop the last sentence entirely.
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.
Done
# Versions should comply with PEP440. For a discussion on single-sourcing | ||
# the version across setup.py and the project code, see | ||
# https://packaging.python.org/en/latest/single_source_version.html | ||
version='0.0.1', |
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.
Fine as is for now, but our first release should be 1.0.0
.
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.
Ack
setup.py
Outdated
description='Firebase Admin Python SDK', | ||
long_description=long_description, | ||
|
||
url='https://github.com/firebase/firebase-admin-python', |
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.
Since this won't be open source at launch, I think this should link to https://firebase.google.com/docs/admin/setup/ for now.
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.
Done
setup.py
Outdated
url='https://github.com/firebase/firebase-admin-python', | ||
|
||
# Author details | ||
author='Firebase Team', |
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'd follow what we do in our other SDKs (e.g. here). Namely, use just "Firebase", no email (unless it's actually required), and the base website URL if that's an option.
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.
Done. No possibility of adding the base URL unfortunately.
# 3 - Alpha | ||
# 4 - Beta | ||
# 5 - Production/Stable | ||
'Development Status :: 3 - Alpha', |
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 not really sure what this is, but this SDK will not be in Alpha. It will be production / stable, so I'd put 5 here.
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.
Will update it to 5, along with the version number when we are at our first release.
Made the suggested changes. |
.github/CONTRIBUTING.md
Outdated
```bash | ||
$ git clone https://github.com/firebase/firebase-admin-python.git | ||
$ cd firebase-admin-python # go to the firebase-admin-python directory | ||
$ pip install -r .github/requirements.txt # Install additional tools and dependencies |
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 think requirements.txt
should live in the root of the folder. .github
is a GitHub-only thing and I see requirements.txt
as equivalent to package.json
.
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.
Done
|
||
Here are some highlights of the directory structure and notable source files | ||
|
||
* `firebase/` - Source directory for the `firebase` module. |
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.
Fair enough. SGTM.
.github/CONTRIBUTING.md
Outdated
* `lint.sh` - Runs pylint to check for code quality. | ||
* `.pylintrc` - Default configuration for pylint. | ||
* `setup.py` - Python setup script for building distribution artifacts. | ||
* `tox.ini` - Tox configuration for running tests on different environments. |
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.
Please add a line explaining requirements.txt
here once you move it into root.
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.
Done
Applied suggested changes |
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.
LGTM!
# This is the 1st commit message: Rename multi_factor_config_mgt.py to multi_factor_config.py # This is the commit message #2: changing name from multi_factor_config_mgt to multi_factor_config # This is the commit message #3: Revert "changing name from multi_factor_config_mgt to multi_factor_config" This reverts commit 45cd3e5.