Skip to content

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

Merged
merged 10 commits into from
Mar 27, 2017

Conversation

hiranya911
Copy link
Contributor

  • 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)

Copy link

@jwngr jwngr left a 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.

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/)
Copy link

Choose a reason for hiding this comment

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

s/node/python

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

```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
Copy link

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?

Copy link
Contributor Author

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.

higher using pip:

```
pip install -U pylint
Copy link

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.

Copy link
Contributor Author

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.

unit tests. Download pytest 3.0.6 or higher using pip:

```
pip install -U pytest
Copy link

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

```
pytest
```
Refer to the pytest [usage and invocations guide](http://doc.pytest.org/en/latest/usage.html)
Copy link

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.

Copy link
Contributor Author

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 '
Copy link

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.

Copy link
Contributor Author

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',
Copy link

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.

Copy link
Contributor Author

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',
Copy link

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.

Copy link
Contributor Author

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',
Copy link

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.

Copy link
Contributor Author

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',
Copy link

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.

Copy link
Contributor Author

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.

@hiranya911
Copy link
Contributor Author

Made the suggested changes.

```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
Copy link

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.

Copy link
Contributor Author

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.
Copy link

Choose a reason for hiding this comment

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

Fair enough. SGTM.

* `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.
Copy link

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jwngr jwngr assigned hiranya911 and unassigned jwngr Mar 25, 2017
@hiranya911
Copy link
Contributor Author

Applied suggested changes

@hiranya911 hiranya911 assigned jwngr and unassigned hiranya911 Mar 25, 2017
Copy link

@jwngr jwngr left a comment

Choose a reason for hiding this comment

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

LGTM!

@jwngr jwngr assigned hiranya911 and unassigned jwngr Mar 27, 2017
@hiranya911 hiranya911 merged commit 6e26886 into master Mar 27, 2017
@hiranya911 hiranya911 deleted the hkj-packaging-setup-2 branch March 27, 2017 18:48
ifielker added a commit that referenced this pull request Jan 30, 2020
pragatimodi added a commit that referenced this pull request May 26, 2023
# 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.
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.

2 participants