From d3dedb330916c25b51a0c0dbe1cff69ed64f63d1 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 13:52:03 -0700 Subject: [PATCH 01/10] Added initial tox configuration; Added setup.py for packaging release distributions; Added contribution guide --- .github/CONTRIBUTING.md | 191 ++++++++++++++++++++++++++++++++++++++++ README.md | 89 ++++--------------- setup.py | 95 ++++++++++++++++++++ tox.ini | 13 +++ 4 files changed, 316 insertions(+), 72 deletions(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 setup.py create mode 100644 tox.ini diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..c25ce6dd2 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,191 @@ +# Contributing | Firebase Admin Python SDK + +Thank you for contributing to the Firebase community! + + - [Have a usage question?](#question) + - [Think you found a bug?](#issue) + - [Have a feature request?](#feature) + - [Want to submit a pull request?](#submit) + - [Need to get set up locally?](#local-setup) + + +## Have a usage question? + +We get lots of those and we love helping you, but GitHub is not the best place for them. Issues +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/) + +If the official documentation doesn't help, try asking a question on the +[Firebase Google Group](https://groups.google.com/forum/#!forum/firebase-talk/) or one of our +other [official support channels](https://firebase.google.com/support/). + +**Please avoid double posting across multiple channels!** + + +## Think you found a bug? + +Yeah, we're definitely not perfect! + +Search through [old issues](https://github.com/firebase/firebase-admin-python/issues) before +submitting a new issue as your question may have already been answered. + +If your issue appears to be a bug, and hasn't been reported, +[open a new issue](https://github.com/firebase/firebase-admin-python/issues/new). Please use the +provided bug report template and include a minimal repro. + +If you are up to the challenge, [submit a pull request](#submit) with a fix! + + +## Have a feature request? + +Great, we love hearing how we can improve our products! Share you idea through our +[feature request support channel](https://firebase.google.com/support/contact/bugs-features/). + + +## Want to submit a pull request? + +Sweet, we'd love to accept your contribution! +[Open a new pull request](https://github.com/firebase/firebase-admin-python/pull/new/master) and fill +out the provided template. + +**If you want to implement a new feature, please open an issue with a proposal first so that we can +figure out if the feature makes sense and how it will work.** + +Make sure your changes pass our linter and the tests all pass on your local machine. +Most non-trivial changes should include some extra test coverage. If you aren't sure how to add +tests, feel free to submit regardless and ask us for some advice. + +Finally, you will need to sign our +[Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +before we can accept your pull request. + + +## Need to get set up locally? + + +### Initial Setup + +Run the following commands from the command line to get your local environment set up: + +```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 +$ pip install -U pylint # globally install pylint code quality checker +``` + +### Running Linters + +We use [pylint](https://pylint.org/) for verifying source code format, and +enforcing other Python programming best practices. Install pylint 1.6.4 or +higher using pip: + +``` +pip install -U pylint +``` + +Specify a pylint version explicitly if the above command installs an older +version: + +``` +pip install pylint==1.6.4 +``` + +Once installed, you can check the version of the installed binary by running +the following command: + +``` +pylint --version +``` + +There is a pylint configuration file (`.pylintrc`) at the root of this Git +repository. This enables you to invoke pylint directly from the command line: + +``` +pylint firebase +``` + +However, it is recommended that you use the `lint.sh` bash script to invoke +pylint. This script will run the linter on both `firebase` and the corresponding +`tests` module. It suprresses some of the noisy warnings that get generated +when running pylint on test code. Note that by default `lint.sh` will only +validate the locally modified source files. To validate all source files, +pass `all` as an argument. + +``` +./lint.sh # Lint locally modified source files +./lint.sh all # Lint all source files +``` + +Ideally you should not see any pylint errors or warnings when you run the +linter. This means source files are properly formatted, and the linter has +not found any issues. If you do observe any errors, fix them before +committing or sending a pull request. Details on how to interpret pylint +errors are available +[here](https://pylint.readthedocs.io/en/latest/user_guide/output.html). + +Our configuration files suppress the verbose reports usually generated +by pylint, and only output the detected issues. If you wish to obtain the +comprehensive reports, run pylint from command-line with the `-r` flag. + +``` +pylint -r yes firebase +``` + +### Unit Testing + +We use [pytest](http://doc.pytest.org/en/latest/) for writing and executing +unit tests. Download pytest 3.0.6 or higher using pip: + +``` +pip install -U pytest +``` + +All source files containing test code is located in the `tests/` +directory. Simply launch pytest from the root of the Git repository, or from +within the `tests/` directory to execute all test cases. + +``` +pytest +``` +Refer to the pytest [usage and invocations guide](http://doc.pytest.org/en/latest/usage.html) +to learn how to run a subset of all test cases. + +### Testing on Different Platforms + +Sometimes we may want to run unit tests in multiple environments (e.g. different +Python versions), and ensure that the SDK works as expected in each of them. +We use [tox](https://tox.readthedocs.io/en/latest/) for this purpose. Install +the latest version of tox using pip: + +``` +pip install -U tox +``` + +Now you can execute the following command from the root of the repository: + +``` +tox +``` + +This command will read a list of target environments from the `tox.ini` file +in the Git repository, and execute test cases in each of those environments. +We currently define the following target environments in `tox.ini`: + + * python 2.7 + + +### Repo Organization + +Here are some highlights of the directory structure and notable source files + +* `firebase/` - Source directory for the `firebase` module. +* `tests/` - Unit tests. + * `data/` - Provides mocks for several variables as well as mock service account keys. +* `.github/` - Contribution instructions as well as issue and pull request templates. +* `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. diff --git a/README.md b/README.md index aa57b3060..a99e7713e 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,29 @@ # Firebase Admin Python SDK -The Firebase Admin Python SDK enables server-side (backend) Python developers -to integrate [Firebase](https://firebase.google.com) into their services -and applications. Currently this SDK provides Firebase custom authentication -support. +## Table of Contents + * [Overview](#overview) + * [Documentation](#documentation) + * [License and Terms](#license-and-terms) -## Unit Testing -We use [pytest](http://doc.pytest.org/en/latest/) for writing and executing -unit tests. Download pytest 3.0.6 or higher using pip: +## Overview -``` -pip install -U pytest -``` +[Firebase](https://firebase.google.com) provides the tools and infrastructure +you need to develop apps, grow your user base, and earn money. The Firebase +Admin Python SDK enables server-side (backend) Python developers to integrate +Firebase into their services and applications. Currently this SDK provides +Firebase custom authentication support. -All source files containing test code is located in the `tests/` -directory. Simply launch pytest from the root of the Git repository, or from -within the `tests/` directory to execute all test cases. +For more information, visit the +[Firebase Admin SDK setup guide](https://firebase.google.com/docs/admin/setup/). -``` -pytest -``` -Refer to the pytest [usage and invocations guide](http://doc.pytest.org/en/latest/usage.html) -to learn how to run a subset of all test cases. +## Documentation +* [Setup Guide](https://firebase.google.com/docs/admin/setup/) -## Running Linters -We use [pylint](https://pylint.org/) for verifying source code format, and -enforcing other Python programming best practices. Install pylint 1.6.4 or -higher using pip: -``` -pip install -U pylint -``` +## License and Terms -Specify a pylint version explicitly if the above command installs an older -version: - -``` -pip install pylint==1.6.4 -``` - -Once installed, you can check the version of the installed binary by running -the following command: - -``` -pylint --version -``` - -There is a pylint configuration file (`.pylintrc`) at the root of this Git -repository. This enables you to invoke pylint directly from the command line: - -``` -pylint firebase -``` - -However, it is recommended that you use the `lint.sh` bash script to invoke -pylint. This script will run the linter on both `firebase` and the corresponding -`tests` module. It suprresses some of the noisy warnings that get generated -when running pylint on test code. Note that by default `lint.sh` will only -validate the locally modified source files. To validate all source files, -pass `all` as an argument. - -``` -./lint.sh # Lint locally modified source files -./lint.sh all # Lint all source files -``` - -Ideally you should not see any pylint errors or warnings when you run the -linter. This means source files are properly formatted, and the linter has -not found any issues. If you do observe any errors, fix them before -committing or sending a pull request. Details on how to interpret pylint -errors are available -[here](https://pylint.readthedocs.io/en/latest/user_guide/output.html). - -Our configuration files suppress the verbose reports usually generated -by pylint, and only output the detected issues. If you wish to obtain the -comprehensive reports, run pylint from command-line with the `-r` flag. - -``` -pylint -r yes firebase -``` +Your use of Firebase is governed by the +[Terms of Service for Firebase Services](https://firebase.google.com/terms/). diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..f0837edf5 --- /dev/null +++ b/setup.py @@ -0,0 +1,95 @@ +"""Setup file for distribution artifacts.""" +from os import path +from setuptools import setup, find_packages + + +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 ' + 'SDK provides Firebase custom authentication support.') + +setup( + name='firebase', + + # 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', + + description='Firebase Admin Python SDK', + long_description=long_description, + + # The project's main homepage. + url='https://github.com/pypa/sampleproject', + + # Author details + author='Firebase Team', + author_email='firebase-talk@googlegroups.com', + + # Choose your license + license='Apache Software License 2.0', + + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + # How mature is this project? Common values are + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 3 - Alpha', + + # Indicate who your project is intended for + 'Intended Audience :: Developers', + 'Topic :: Software Development :: Build Tools', + + # Pick your license as you wish (should match "license" above) + 'License :: OSI Approved :: Apache Software License', + + # Specify the Python versions you support here. In particular, ensure + # that you indicate whether you support Python 2, Python 3 or both. + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + ], + + # What does your project relate to? + keywords='firebase cloud development', + + packages=find_packages(exclude=['tests']), + + # List run-time dependencies here. These will be installed by pip when + # your project is installed. For an analysis of "install_requires" vs pip's + # requirements files see: + # https://packaging.python.org/en/latest/requirements.html + install_requires=['oauth2client'], + + # List additional groups of dependencies here (e.g. development + # dependencies). You can install these using the following syntax, + # for example: + # $ pip install -e .[dev,test] + #extras_require={ + # 'dev': ['check-manifest'], + # 'test': ['coverage'], + #}, + + # If there are data files included in your packages that need to be + # installed, specify them here. If using Python 2.6 or less, then these + # have to be included in MANIFEST.in as well. + #package_data={ + # 'sample': ['package_data.dat'], + #}, + + # Although 'package_data' is the preferred approach, in some case you may + # need to place data files outside of your packages. See: + # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa + # In this case, 'data_file' will be installed into '/my_data' + #data_files=[('my_data', ['data/data_file'])], + + # To provide executable scripts, use entry points in preference to the + # "scripts" keyword. Entry points provide cross-platform support and allow + # pip to create the appropriate form of executable for the target platform. + #entry_points={ + # 'console_scripts': [ + # 'sample=sample:main', + # ], + #}, +) diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..b27c99c4a --- /dev/null +++ b/tox.ini @@ -0,0 +1,13 @@ +# Tox (https://tox.readthedocs.io/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py27 + +[testenv] +commands = pytest +deps = + pytest + oauth2client From ea16d3d4fd8a35d01efad21861f9219c6f6e61f5 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 14:14:33 -0700 Subject: [PATCH 02/10] Updated licensing information (removing OSS license info temporarily) --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index f0837edf5..f3ffcabf8 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ author_email='firebase-talk@googlegroups.com', # Choose your license - license='Apache Software License 2.0', + license='https://firebase.google.com/terms/', # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ @@ -42,9 +42,6 @@ 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', - # Pick your license as you wish (should match "license" above) - 'License :: OSI Approved :: Apache Software License', - # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 2', From d0b5666cd852a38de10b84a04cecc739ac494e95 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 14:21:06 -0700 Subject: [PATCH 03/10] Updated project URL --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f3ffcabf8..60723ca74 100644 --- a/setup.py +++ b/setup.py @@ -20,8 +20,7 @@ description='Firebase Admin Python SDK', long_description=long_description, - # The project's main homepage. - url='https://github.com/pypa/sampleproject', + url='https://github.com/firebase/firebase-admin-python', # Author details author='Firebase Team', From f98d5534be299af49bd550e44541aa780589bab2 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 16:29:22 -0700 Subject: [PATCH 04/10] Added requirements file for local setup; Updates to setup.py and documentation --- .github/CONTRIBUTING.md | 46 +++++++--------------------------------- .github/requirements.txt | 3 +++ README.md | 2 +- setup.py | 8 +++---- 4 files changed, 15 insertions(+), 44 deletions(-) create mode 100644 .github/requirements.txt diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c25ce6dd2..e10c3c590 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -15,7 +15,7 @@ We get lots of those and we love helping you, but GitHub is not the best place f 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/) +- Read the full [API reference](https://firebase.google.com/docs/reference/admin/python/) If the official documentation doesn't help, try asking a question on the [Firebase Google Group](https://groups.google.com/forum/#!forum/firebase-talk/) or one of our @@ -71,35 +71,14 @@ Run the following commands from the command line to get your local environment s ```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 -$ pip install -U pylint # globally install pylint code quality checker +$ cd firebase-admin-python # go to the firebase-admin-python directory +$ pip install -r .github/requirements.txt # Install additional tools and dependencies ``` ### Running Linters We use [pylint](https://pylint.org/) for verifying source code format, and -enforcing other Python programming best practices. Install pylint 1.6.4 or -higher using pip: - -``` -pip install -U pylint -``` - -Specify a pylint version explicitly if the above command installs an older -version: - -``` -pip install pylint==1.6.4 -``` - -Once installed, you can check the version of the installed binary by running -the following command: - -``` -pylint --version -``` - +enforcing other Python programming best practices. There is a pylint configuration file (`.pylintrc`) at the root of this Git repository. This enables you to invoke pylint directly from the command line: @@ -137,19 +116,14 @@ pylint -r yes firebase ### Unit Testing We use [pytest](http://doc.pytest.org/en/latest/) for writing and executing -unit tests. Download pytest 3.0.6 or higher using pip: - -``` -pip install -U pytest -``` - -All source files containing test code is located in the `tests/` +unit tests. All source files containing test code is located in the `tests/` directory. Simply launch pytest from the root of the Git repository, or from within the `tests/` directory to execute all test cases. ``` pytest ``` + Refer to the pytest [usage and invocations guide](http://doc.pytest.org/en/latest/usage.html) to learn how to run a subset of all test cases. @@ -170,12 +144,8 @@ Now you can execute the following command from the root of the repository: tox ``` -This command will read a list of target environments from the `tox.ini` file -in the Git repository, and execute test cases in each of those environments. -We currently define the following target environments in `tox.ini`: - - * python 2.7 - +This command will read a list of target environments from the [`tox.ini`](../tox.ini) +file in the Git repository, and execute test cases in each of those environments. ### Repo Organization diff --git a/.github/requirements.txt b/.github/requirements.txt new file mode 100644 index 000000000..3f188c624 --- /dev/null +++ b/.github/requirements.txt @@ -0,0 +1,3 @@ +pytest >= 3.0.6 +pylint >= 1.6.4 +oauth2client >= 4.0.0 diff --git a/README.md b/README.md index a99e7713e..541a4ae4c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ For more information, visit the ## Documentation * [Setup Guide](https://firebase.google.com/docs/admin/setup/) - +* [API Reference](https://firebase.google.com/docs/reference/admin/python/) ## License and Terms diff --git a/setup.py b/setup.py index 60723ca74..dbcb3b420 100644 --- a/setup.py +++ b/setup.py @@ -6,8 +6,7 @@ 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 ' - 'SDK provides Firebase custom authentication support.') + 'to integrate Firebase into their services and applications.') setup( name='firebase', @@ -20,11 +19,10 @@ description='Firebase Admin Python SDK', long_description=long_description, - url='https://github.com/firebase/firebase-admin-python', + url='https://firebase.google.com/docs/admin/setup/', # Author details - author='Firebase Team', - author_email='firebase-talk@googlegroups.com', + author='Firebase', # Choose your license license='https://firebase.google.com/terms/', From eb9bb8ffeb220b6baad8caadaa341ad598abf467 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 16:35:21 -0700 Subject: [PATCH 05/10] Added tox to the list of tooling requirements --- .github/CONTRIBUTING.md | 11 +++-------- .github/requirements.txt | 4 +++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e10c3c590..3ded94b53 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -131,14 +131,9 @@ to learn how to run a subset of all test cases. Sometimes we may want to run unit tests in multiple environments (e.g. different Python versions), and ensure that the SDK works as expected in each of them. -We use [tox](https://tox.readthedocs.io/en/latest/) for this purpose. Install -the latest version of tox using pip: - -``` -pip install -U tox -``` - -Now you can execute the following command from the root of the repository: +We use [tox](https://tox.readthedocs.io/en/latest/) for this purpose. +You can execute the following command from the root of the repository to +launch tox: ``` tox diff --git a/.github/requirements.txt b/.github/requirements.txt index 3f188c624..2e3e634a3 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,3 +1,5 @@ -pytest >= 3.0.6 pylint >= 1.6.4 +pytest >= 3.0.6 +tox + oauth2client >= 4.0.0 From e046db389954912e07e94408a967401d2524fa0a Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 16:39:13 -0700 Subject: [PATCH 06/10] Updated title --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3ded94b53..fae550552 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -127,7 +127,7 @@ pytest Refer to the pytest [usage and invocations guide](http://doc.pytest.org/en/latest/usage.html) to learn how to run a subset of all test cases. -### Testing on Different Platforms +### Testing in Different Environments Sometimes we may want to run unit tests in multiple environments (e.g. different Python versions), and ensure that the SDK works as expected in each of them. From e846bb89838d9b479af59d73e31bea13930ded57 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Thu, 23 Mar 2017 16:42:01 -0700 Subject: [PATCH 07/10] Added more links to referred files --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index fae550552..dc015e470 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -79,14 +79,14 @@ $ pip install -r .github/requirements.txt # Install additional tools and depend We use [pylint](https://pylint.org/) for verifying source code format, and enforcing other Python programming best practices. -There is a pylint configuration file (`.pylintrc`) at the root of this Git +There is a pylint configuration file ([`.pylintrc`](../.pylintrc)) at the root of this Git repository. This enables you to invoke pylint directly from the command line: ``` pylint firebase ``` -However, it is recommended that you use the `lint.sh` bash script to invoke +However, it is recommended that you use the [`lint.sh`](../lint.sh) bash script to invoke pylint. This script will run the linter on both `firebase` and the corresponding `tests` module. It suprresses some of the noisy warnings that get generated when running pylint on test code. Note that by default `lint.sh` will only From f862f45ee5dcddef2654103c4fc007e63e3ef03a Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Fri, 24 Mar 2017 11:43:07 -0700 Subject: [PATCH 08/10] Setting minimal version for tox --- .github/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/requirements.txt b/.github/requirements.txt index 2e3e634a3..46fb7102c 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,5 +1,5 @@ pylint >= 1.6.4 pytest >= 3.0.6 -tox +tox >= 2.6.0 oauth2client >= 4.0.0 From 06738545f1dba8535f53706beb021cd39d6bc5e8 Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Sat, 25 Mar 2017 12:11:12 -0700 Subject: [PATCH 09/10] Moved requirements.txt to the root of the repo --- .github/CONTRIBUTING.md | 5 +++-- .github/requirements.txt => requirements.txt | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename .github/requirements.txt => requirements.txt (100%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index dc015e470..0158b4ede 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -71,8 +71,8 @@ Run the following commands from the command line to get your local environment s ```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 +$ cd firebase-admin-python # go to the firebase-admin-python directory +$ pip install -r requirements.txt # Install additional tools and dependencies ``` ### Running Linters @@ -152,5 +152,6 @@ Here are some highlights of the directory structure and notable source files * `.github/` - Contribution instructions as well as issue and pull request templates. * `lint.sh` - Runs pylint to check for code quality. * `.pylintrc` - Default configuration for pylint. +* `requirements.txt` - Requirements specification for installing project dependencies via pip. * `setup.py` - Python setup script for building distribution artifacts. * `tox.ini` - Tox configuration for running tests on different environments. diff --git a/.github/requirements.txt b/requirements.txt similarity index 100% rename from .github/requirements.txt rename to requirements.txt From e08c62ff5d1bc449b503df1cfaa39dafa61f5014 Mon Sep 17 00:00:00 2001 From: hiranya911 Date: Sat, 25 Mar 2017 12:25:41 -0700 Subject: [PATCH 10/10] Added some info on installing pip --- .github/CONTRIBUTING.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0158b4ede..75fa15088 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -67,7 +67,14 @@ before we can accept your pull request. ### Initial Setup -Run the following commands from the command line to get your local environment set up: +We recommend using [pip](https://pypi.python.org/pypi/pip) for installing the necessary tools and +project dependencies. Most recent versions of Python ship with pip. If your development environment +does not already have pip, use the software package manager of your platform (e.g. apt-get, brew) +to download and install it. Alternatively you may also follow the official +[pip installation guide](https://pip.pypa.io/en/stable/installing/). + +Once pip is installed, run the following commands from the command line to get your local +environment set up: ```bash $ git clone https://github.com/firebase/firebase-admin-python.git