зеркало из https://github.com/mozilla/libmozdata.git
Add new linters, update some already used ones and fix some new found issues
This commit is contained in:
Родитель
12afe6db48
Коммит
52970c5b35
|
@ -1,7 +1,7 @@
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: pip
|
- package-ecosystem: pip
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
open-pull-requests-limit: 99
|
open-pull-requests-limit: 99
|
||||||
|
|
|
@ -1,40 +1,66 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/seed-isort-config
|
- repo: https://github.com/asottile/seed-isort-config
|
||||||
rev: v2.2.0
|
rev: v2.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: seed-isort-config
|
- id: seed-isort-config
|
||||||
- repo: https://github.com/pre-commit/mirrors-isort
|
- repo: https://github.com/timothycrosley/isort
|
||||||
rev: v5.5.3
|
rev: 5.9.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
- repo: https://github.com/ambv/black
|
- repo: https://github.com/ambv/black
|
||||||
rev: stable
|
rev: 21.6b0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://gitlab.com/pycqa/flake8
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: 3.8.3
|
rev: v2.3.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: prettier
|
||||||
additional_dependencies: ['flake8-coding==1.3.1', 'flake8-copyright==0.2.2', 'flake8-debugger==3.1.0', 'flake8-mypy==17.8.0']
|
exclude: ^tests/|libmozdata/modules.json
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://gitlab.com/pycqa/flake8
|
||||||
rev: v3.2.0
|
rev: 3.9.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: flake8
|
||||||
|
additional_dependencies:
|
||||||
|
- "flake8-coding==1.3.1"
|
||||||
|
- "flake8-copyright==0.2.2"
|
||||||
|
- "flake8-debugger==3.1.0"
|
||||||
|
- "flake8-mypy==17.8.0"
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.0.1
|
||||||
|
hooks:
|
||||||
|
- id: check-ast
|
||||||
|
- id: check-docstring-first
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: check-symlinks
|
||||||
|
- id: debug-statements
|
||||||
|
- id: trailing-whitespace
|
||||||
exclude: ^tests/uplift/|^tests/html/
|
exclude: ^tests/uplift/|^tests/html/
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
exclude: ^tests/html/
|
exclude: ^tests/html/
|
||||||
- id: name-tests-test
|
- id: name-tests-test
|
||||||
args: ['--django']
|
args: ["--django"]
|
||||||
exclude: tests/auto_mock.py
|
exclude: tests/auto_mock.py
|
||||||
- id: check-json
|
- id: check-json
|
||||||
exclude: ^tests/mocks/
|
exclude: ^tests/mocks/
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- id: requirements-txt-fixer
|
||||||
rev: v1.17.1
|
- id: check-vcs-permalinks
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
rev: v2.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
exclude: libmozdata/modules.json
|
exclude: libmozdata/modules.json
|
||||||
- repo: meta
|
- repo: https://github.com/marco-c/taskcluster_yml_validator
|
||||||
|
rev: v0.0.7
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-hooks-apply
|
- id: taskcluster_yml
|
||||||
- id: check-useless-excludes
|
- repo: https://github.com/asottile/yesqa
|
||||||
|
rev: v1.2.3
|
||||||
|
hooks:
|
||||||
|
- id: yesqa
|
||||||
|
- repo: meta
|
||||||
|
hooks:
|
||||||
|
- id: check-useless-excludes
|
||||||
|
default_language_version:
|
||||||
|
python: python3
|
||||||
|
|
|
@ -5,6 +5,7 @@ For more details, please read the
|
||||||
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
|
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
|
||||||
|
|
||||||
## How to Report
|
## How to Report
|
||||||
|
|
||||||
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.
|
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
# libmozdata
|
# libmozdata
|
||||||
|
|
||||||
> Library to access and aggregate several Mozilla data sources
|
> Library to access and aggregate several Mozilla data sources
|
||||||
|
|
||||||
The goal is to provide a library giving access to a wide range of Mozilla data sources. This library also provides some post processing on data.
|
The goal is to provide a library giving access to a wide range of Mozilla data sources. This library also provides some post processing on data.
|
||||||
|
|
||||||
|
|
||||||
[![Build Status](https://api.travis-ci.org/mozilla/libmozdata.svg?branch=master)](https://travis-ci.org/mozilla/libmozdata)
|
[![Build Status](https://api.travis-ci.org/mozilla/libmozdata.svg?branch=master)](https://travis-ci.org/mozilla/libmozdata)
|
||||||
[![codecov.io](https://img.shields.io/codecov/c/github/mozilla/libmozdata/master.svg)](https://codecov.io/github/mozilla/libmozdata?branch=master)
|
[![codecov.io](https://img.shields.io/codecov/c/github/mozilla/libmozdata/master.svg)](https://codecov.io/github/mozilla/libmozdata?branch=master)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Install the prerequisites via `pip`:
|
Install the prerequisites via `pip`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo pip install -r requirements.txt
|
sudo pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
@ -17,11 +18,13 @@ sudo pip install -r requirements.txt
|
||||||
## Running tests
|
## Running tests
|
||||||
|
|
||||||
Install test prerequisites via `pip`:
|
Install test prerequisites via `pip`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo pip install -r test-requirements.txt
|
sudo pip install -r test-requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
Run tests:
|
Run tests:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
coverage run --source=libmozdata -m unittest discover tests/
|
coverage run --source=libmozdata -m unittest discover tests/
|
||||||
```
|
```
|
||||||
|
|
|
@ -62,7 +62,7 @@ class BZInfo(Bugzilla):
|
||||||
|
|
||||||
A collaboration between A & B is when A reviews a patch of B (or reciprocally)
|
A collaboration between A & B is when A reviews a patch of B (or reciprocally)
|
||||||
in term of graph:
|
in term of graph:
|
||||||
- each node represents a reviewer or a writter (owner)
|
- each node represents a reviewer or a writer (owner)
|
||||||
- each edge represents a collaboration
|
- each edge represents a collaboration
|
||||||
here we count the degree of each node and find out who's the best collaborator
|
here we count the degree of each node and find out who's the best collaborator
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
requests[security]>=2.7.0
|
icalendar>=3.10
|
||||||
|
python-dateutil>=2.5.2
|
||||||
|
python-hglib>=2.6.1
|
||||||
requests-futures>=0.9.8
|
requests-futures>=0.9.8
|
||||||
|
requests[security]>=2.7.0
|
||||||
|
setuptools>=28.6.1
|
||||||
six>=1.10.0
|
six>=1.10.0
|
||||||
whatthepatch>=0.0.4
|
whatthepatch>=0.0.4
|
||||||
python-dateutil>=2.5.2
|
|
||||||
icalendar>=3.10
|
|
||||||
setuptools>=28.6.1
|
|
||||||
python-hglib>=2.6.1
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
coverage
|
coverage
|
||||||
responses
|
|
||||||
pre-commit
|
pre-commit
|
||||||
|
responses
|
||||||
|
|
Загрузка…
Ссылка в новой задаче