-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* atlasq * More initialization * flake8 * Black * Fixes * pylint * More fixes * black * Fix versions * Updated black + removed 3.6 support * Adding mongo service + test cache * isort * Added tox env * Fix manifest + tox.ini py version * Fix manifest + removed 3.6 * Removed mongo service Added mongomock * blake * Not supported 3.7 * More tests + refactor * pylint
- Loading branch information
Showing
33 changed files
with
2,624 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[run] | ||
branch = True | ||
source = atlasq | ||
|
||
[report] | ||
exclude_lines = | ||
raise NotImplementedError | ||
if __name__ == .__main__.: | ||
ignore_errors = True | ||
omit = | ||
tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
ignore = | ||
W503, # line break before binary operator | ||
E231, # missing whitespace after ',' (caused by black style) | ||
W605, # invalid escape sequence (caused by regex) | ||
exclude = | ||
setup.py | ||
venv | ||
docs | ||
.tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Linter & Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [main, develop] | ||
paths-ignore: | ||
- "**.md" | ||
- "**.rst" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
max-parallel: 5 | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r dev-requirements.txt | ||
pip install -r requirements.txt | ||
- name: Flake8 | ||
run: | | ||
flake8 . --count | ||
- name: Black | ||
run: | | ||
black . --check | ||
- name: Pylint | ||
run: | | ||
pylint atlasq | ||
- name: Isort | ||
run: | | ||
isort . --profile black --check-only --diff | ||
- name: Run tox tests | ||
run: | | ||
tox | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies and Build | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
python setup.py sdist bdist_wheel | ||
- name: Publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.idea | ||
build | ||
dist | ||
*egg-info | ||
venv/ | ||
*.exe | ||
__pycache__ | ||
.vscode | ||
docs/_build/ | ||
.tox | ||
.coverage | ||
coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
queries: | ||
- exclude: py/similar-function | ||
- exclude: py/empty-except | ||
- exclude: py/call-to-non-callable | ||
- include: py/undefined-placeholder-variable | ||
- include: py/uninitialized-local-variable | ||
- include: py/request-without-cert-validation | ||
- include: py/return-or-yield-outside-function | ||
- include: py/file-not-closed | ||
- include: py/exit-from-finally | ||
- include: py/ineffectual-statement | ||
- include: py/unused-global-variable | ||
- include: py/hardcoded-credentials | ||
- include: py/import-of-mutable-attribute | ||
- include: py/cyclic-import | ||
- include: py/unnecessary-lambda | ||
- include: py/print-during-import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
repos: | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: ["--remove-all-unused-imports", "--remove-unused-variables", "--ignore-init-module-imports", "-i"] | ||
- repo: https://github.com/psf/black | ||
rev: 21.9b0 | ||
hooks: | ||
- id: black | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black"] |
Oops, something went wrong.