* Fix formatting of code in bugbug/repository.py
* Fix reviewer experience calculation for commits with no reviewers
* Fix reviewer experience calculation for commits with multiple reviewers (experience is the sum of the experiences)
The hook will be responsible for starting the data pipeline, but right now is
doing mostly nothing.
Use taskboot new command `build-hook` to update the hook based on the
versioned definition file.
* Rename test function in test_bug to reflect reality, and add more assertions
* Add a mock bugs DB for tests
* Don't download bugs DB anymore for running tests
* Add a test for run.py basic functionality
* Remove training test task, as the test is now a pytest
* Import Trainer class from release-services repository
This basically import the `trainer.py` file from the `release-services`
repository at hash 77cdddd. I removed imports and reference to cli-common
helpers that will likely need to be reimplemented, like the raven support.
Also defines 4 docker images, one per model to train.
* Remove unused imports
* Import Retriever class from release-services repository
This basically import the `retriever.py` file from the `release-services`
repository at hash 77cdddd. I removed imports and reference to cli-common
helpers that will likely needs to be reimplemented, like the raven support.
The next commit will defines some Dockerfiles that will use the imported file.
* Add docker image definition
Build three Docker image, one is for bugbug itself. It is just installing
bugbug and its dependencies.
One is for retrieving information from the mozilla-central Mercurial
repository, it depends on the first one and install the right Mercurial
version.
The last one is for retrieving information from the Bugzilla instance, it
depends in the first one and needs a valid Bugzilla token.
* Separate the two tasks into separate script files
They share almost no code at all so they don't need to be in the same file
* Apply Black on the scripts to makes Flake8 happy
* Add pre-commit configuration
Add auto-formatting configuration using the https://pre-commit.com/ project.
Having auto-formatting setup and automatically enforced helps speeding up
development and review process.
* Apply the auto-formatting on all files in the repository
* Removes flake8-quotes as it conflicts with Black formatting
* Disable some Flake8 rules
Disable Flake8 rules that are handled by Black. The list comes from
https://github.com/ambv/black/issues/429#issuecomment-472687803.