Skip to content

Commit

Permalink
0.0.1 (#1)
Browse files Browse the repository at this point in the history
* 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
0ssigeno authored May 27, 2022
1 parent 4977e7d commit fa50e79
Show file tree
Hide file tree
Showing 33 changed files with 2,624 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .coveragerc
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/*
11 changes: 11 additions & 0 deletions .flake8
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
55 changes: 55 additions & 0 deletions .github/workflows/pull_request_automation.yml
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
24 changes: 24 additions & 0 deletions .github/workflows/pythonpublish.yml
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 }}
12 changes: 12 additions & 0 deletions .gitignore
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
17 changes: 17 additions & 0 deletions .lgtm.yml
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
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
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"]
Loading

0 comments on commit fa50e79

Please sign in to comment.