-
Notifications
You must be signed in to change notification settings - Fork 289
Setting Up the Release Process #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
Changes from 51 commits
428eedb
cfbbd6a
59842b8
fef4ecf
a606833
1d2ed82
8972b1b
e5509c3
0587d52
7f2f470
8ee5cfc
dbc6ee6
c66f35b
f7cbdc2
7715b90
c3591ed
bc54329
75df20f
471d0a9
f692bb6
c368248
a30ae95
7714024
2da7955
094d756
f446c79
952c6b0
594bfbb
5dc413f
738c75e
5e81a8b
922054d
337299f
aa88398
a0ef544
8b2ff85
2da5b03
a24340c
7d39734
5f8e82a
4b0361c
e5eca5c
3d3be22
eefc4ce
d13b1ec
e911387
3c7f98f
7efbd53
59d1689
0dc979c
b47dbf6
78fdef7
f5883d7
21e14d6
e0757cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# 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) | ||
|
||
|
||
## <a name="question"></a>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/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 | ||
other [official support channels](https://firebase.google.com/support/). | ||
|
||
**Please avoid double posting across multiple channels!** | ||
|
||
|
||
## <a name="issue"></a>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! | ||
|
||
|
||
## <a name="feature"></a>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/). | ||
|
||
|
||
## <a name="submit"></a>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. | ||
|
||
|
||
## <a name="local-setup"></a>Need to get set up locally? | ||
|
||
### Initial Setup | ||
|
||
Install Java 7 or higher. You can also use Java 8, but please note that the Firebase Admin SDK must | ||
maintain full Java 7 compatibility. Therefore make sure that you do not use any Java 8 features | ||
(e.g. lambdas) when writing code for the Admin Java SDK. | ||
|
||
We use [Apache Maven](http://maven.apache.org/) for building, testing and releasing the Admin Java | ||
SDK code. Follow the [installation guide](http://maven.apache.org/install.html), and install Maven | ||
3.3 or higher. | ||
|
||
### Running Linters | ||
|
||
[Maven Checkstyle plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/) is configured | ||
to run everytime the build is invoked. This plugin verifies source code format, and enforces a | ||
number of other Java programming best practices. Any style violations will cause the build to break. | ||
|
||
Configuration for the Checkstyle plugin can be found in the `checkstyle.xml` file at the root of the | ||
repository. To execute only the linter without rest of the build pipeline, execute the following | ||
command: | ||
|
||
``` | ||
mvn validate | ||
``` | ||
|
||
If you are using Eclipse for development, you can install the | ||
[Eclipse Checkstyle plugin](http://eclipse-cs.sourceforge.net/#!/), and import the `checkstyle.xml` | ||
file into the IDE. This enables you to have the linter constantly checking your code as you develop. | ||
|
||
### Unit Testing | ||
|
||
Tests are implemented using the [Junit4](http://junit.org/junit4/) framework, and are housed under | ||
the `src/test` subdirectory. They get executed as part of the build, and test failures will cause | ||
the build to break. To run the unit tests without the rest of the build pipeline, execute the | ||
following command: | ||
|
||
``` | ||
mvn test | ||
``` | ||
|
||
### Integration Testing | ||
|
||
Integration tests are also written using Junit4. They coexist with the unit tests in the `src/test` | ||
subdirectory. Integration tests follow the naming convention `*IT.java` (e.g. `DataTestIT.java`), | ||
which enables the Maven Surefire and Failsafe plugins to differentiate between the two types of | ||
tests. Integration tests are executed against a real life Firebase project, and therefore | ||
requires an Internet connection. Create a new project in the | ||
[Firebase console](https://console.firebase.google.com/) if you do not already have one. Download | ||
the service account private key from the "Settings" page of the project. Now run the following | ||
command to invoke the integration test suite: | ||
|
||
``` | ||
mvn verify -Dfirebase.it.certificate=path/to/your/serviceAccount.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why "certificate" instead of "serviceAccount" or something? I'm not really sure if "certificate" is appropriate. |
||
``` | ||
|
||
Make sure to specify the correct path to your downloaded service account key file as the | ||
`firebase.it.certificate` system property. This command will invoke both unit and integration test | ||
suites. To execute only the integration tests, run the command as follows: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't feel strongly, but why would you only want to run the integration tests? It seems more useful to run only the unit tests (since they're presumably faster and would work even without an internet connection). But I think I'd be inclined to just direct folks to run everything (and remove this section). |
||
|
||
``` | ||
mvn verify -Dfirebase.it.certificate=path/to/your/serviceAccount.json -Dskip.surefire.tests=true | ||
``` | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ target/ | |
*.iml | ||
.classpath | ||
.project | ||
.checkstyle | ||
release.properties |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sdk.version=${project.version} |
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.
Python? :-P
(same thing in a few places; please search this file for "python" and fix)
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.
Oops :)
Fixed.