commit | 044da8b09c8f6d938e03fe564146d1ef44fd11b5 | [log] [tgz] |
---|---|---|
author | Karsten Tausche <karsten@fairphone.com> | Wed Jun 14 13:38:57 2023 +0200 |
committer | Karsten Tausche <karsten@fairphone.com> | Wed Jun 14 14:38:52 2023 +0200 |
tree | 79820df4084e7e6608cc18084f4538856d5d4f76 | |
parent | a0c3b9a2c240b90ce7a60e411a0bf29f83507a8c [diff] |
fetch-and-push-remote: Rework pushing new branches Use `repo forall` instead of `repo start`, since it provides more extensive support for including or excluding projects. new_branch is now aligned with other commands in fetch-and-push-remote. Drop support for local branches: fetch-and-push-remote is meant to be used in automation, not in local development workspaces. Thus, local branches are not a use case. "new_branch" now also supports mirrored workspaces as properly and explicitly. The internal push_branch_to_gerrit "accidentally" supported mirror repositories before as well, since on a mirror remote branches look like local branches on regular repositories. Change-Id: Ib77e63a038757a87da05249072037d7e513aa31c
A collection of tools developed at Fairphone related to Android development:
bin
.<language>-libs
:python-libs/android-tools
: A support library to work with Android devices and apps in Python 3.shell-libs
: A collection of shell scripts for handling common shell commands and operations.bullseye
: Script to check and apply security patches from Android Security Bulletins.gdrive-client
: Minimal Google Drive client for uploading files via service accounts.lava
: tools to interact with LAVA, the automated testing system.jira
: Script to import CSV defined configuration into the Fairphone JIRA instance. The script can create users, groups and components. Run ./import_csv_to_jira.py --help
for details.See the individual tools help (--help
) or projects README for installation and usage.
Code style, linters, and formatters must be used before submitting any new tool or patchset. Maximal line lengths are fixed to 80 characters.
Install the selected toolset within a Python 3.8 or newer (virtual) environment:
virtualenv -p python3 .venv/fp-tools . .venv/fp-tools/bin/activate pip install -r requirements-dev.txt
We detail below the recommendations (read: requirements) per language and how to run the tools in a standalone fashion.
Note: Portable shell scripts are favoured over Bash scripts.
Follow what the Bashate style checker recommends.
bashate --verbose <file>
Note: Python 3.8 is the current development choice.
Let Black format Python files for you.
black <file>
Trust that the linting tools (flake8 and pylint) know better and follow their advice.
flake8 <file> pylint <file>
Additionally, run mypy for validating type hinting. However, this does not fit in all contexts and mypy has limitations in specific situations. Consider using type hints unless it is too hard of a burden. If using type hints, also consider using mypy
's strict mode. It provides extra checks, including calls from typed contexts to untyped ones etc.
mypy [--strict] <file>
The project is made available under the terms of the Apache 2.0 license. See LICENSE for details.