First of all, thank you for investing your time to contribute in WeatherXM! Any contribution you make will be reflected on our Android App.
We use Github Flow as our branching model and Clean Architecture.
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
How to ask a question, report a bug or suggest a potential new feature/improvement?
This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code to keep our community approachable and respectable.
All contributors must import our code style settings for Android Studio: android-studio-settings.zip
Steps to import them:
- File
- Manage IDE Settings
- Import Settings
To build the app from source, you need to pass the following environment variables, through gradle
command line arguments, or by creating a production.env properties file in the root directory,
according to
the template file,
that will be
automatically read into env variables by the build script. You must use your own environmental
variables
for contributing to the project.
All environment variables have descriptive comments on the template, but some extra information should be given regarding the Firebase and the Mapbox ones.
The API_URL is specified via these *.env files. In order to use a different API_URL than the
one provided
in production.env.template, for each different flavor (see below about our different flavors)
you need to create a different {flavor}.env file based on the following map:
Remote Mock -> remotemock.env
Remote Dev -> development.env
Remote Staging -> staging.env
We have one variable for Firebase:
FIREBASE_TEST_GROUPThis is used for sending builds through Firebase App Distribution to testers, won't be needed for contributors so feel free to emit that.
We have two different variables for MapBox:
MAPBOX_ACCESS_TOKENMAPBOX_DOWNLOADS_TOKENThese are mandatory for building the project. For creating those tokens you need to create a Mapbox account and create the respective tokens in the Tokens section. TheMAPBOX_DOWNLOADS_TOKENhas secret scopes.MAPBOX_STYLEOptional param which can be left empty. Used for injecting a custom style to be used in the explorer.
You can view Mapbox guide on Access Token here.
We have 5 different app flavors (consider flavors as different “build variants”, read
more here). For each flavor a
different {flavor}.envfile can be created for different environment variables such as API_URL.
The 5 different app flavors are:
- Local Mock: We use this to mock responses from the API using some local JSON files that
can be found in
root/app/src/local/assets/mock_files/*in order to test some edge cases and/or user reported bugs. - Remote Mock: This flavor communicates with our remote mock API.
Powered by
remotemock.env. Currently only for internal use. - Remote Dev: This flavor communicates with our dev API.
Powered by
development.env. Currently only for internal use. - Remote Staging: Initially used for communicating with our staging API.
Powered by
staging.env. Not currently used. - Remote Prod: This flavor communicates with our production API, found
on
app.weatherxm.com. Powered byproduction.env. TheAPI_URLon that environment file should be https://api.weatherxm.com - Solana: This flavor communicates with our production API, found
on
app.weatherxm.com. Powered bysolana.envandproduction.env. Used for publishing releases to Solana phones.
One thing that needs to be mentioned is that for every flavor a different build type can be used,
either a Debug or a Release build type.
The google-services.json configuration file is mandatory for building the app. Depending on the
flavor you want to use,
you should create your own Firebase project and download that file. A guide on how to do it can be
found here.
The package names on the Firebase project you will create should be as below depending on the flavor you want to use:
- Local Mock:
com.weatherxm.app.mock - Remote Mock:
com.weatherxm.app.mock - Remote Dev:
com.weatherxm.app.dev - Remote Staging:
com.weatherxm.app.staging - Remote Prod:
com.weatherxm.app - Solana:
com.weatherxm.app.solana
-
Ensure your question was not already asked by searching on GitHub under Issues under the label Question.
-
If you're unable to find a response to your question , open a new issue by using the **Ask a question ** template. Using this template is mandatory. Make sure to have a clear title and include as many details as possible as that information helps to answer your question as soon as possible.
-
Ensure the bug was not already reported by searching on GitHub under Issues under the label Bug.
-
If you're unable to find an open issue addressing the problem, open a new issue by using the **Bug Report ** template. Using this template is mandatory. Make sure to have a clear title and include as many details as possible as that information helps to resolve issues faster.
-
Ensure this suggestion was not already reported by searching on GitHub under Issues under the label Enhancement.
-
If you're unable to find that suggestion, create a new issue by using the **Feature Request ** template. Using this template is mandatory. Make sure to have a clear title and include as many details as possible.
We are open to contributions on current issues, if the bug/feature/improvement you would like to work on isn't documented, please open a new issue so we can approve it before you start working on it.
Scan through our existing issues to find one that
interests you (or create a new one). You can narrow down the search using labels as filters.
See Issue Labels for more information. Please don't start working
on issues that are currently assigned to someone else or have the in-progress label. If you find
an issue to work on, please comment in it to get it assigned to you and you are welcome to open a PR
with a fix/implementation.
When you're finished with the changes, create a pull request, also known as a PR.
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
- Don't forget to link PR to issue if you are solving one.
- Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, a WeatherXM team member will review your PR. We may ask questions or request additional information.
- We may ask for changes to be made before a PR can be merged. You can implement those changes in your fork, then commit them to your branch in order to update the PR.
- As you update your PR and apply changes, mark each conversation as resolved.
Congratulations 🥳 The WeatherXM team thanks you! We really appreciate your effort and help!
Once your PR is merged, your contributions will be publicly visible on our Android App on the next release.
We use Github Flow as our branching model and Clean Architecture.
We use these code style settings on Android Studio: android-studio-settings.zip
We use Detekt as a code analysis tool for finding potential code optimizations. Our config file for Detekt can be found in detekt.yml.
This section lists the labels we use to help us track and manage issues.
| Label name | Description |
|---|---|
enhancement |
New feature request or improvement |
bug |
Confirmed bugs or reports that are very likely to be bugs. |
question |
Questions more than bug reports or feature requests (e.g. how do I do X). |
in-progress |
A bug, feature or improvement that is currently a Work-In-Progress. |
needs-attention |
An issue that needs attention to be put under specific categories/labels. |
wontfix |
An issue that won't be worked on. |