diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f69d4d6..0000000 --- a/.gitignore +++ /dev/null @@ -1,161 +0,0 @@ - -### Python -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -### Vim -# Swap -[._]*.s[a-v][a-z] -!*.svg # comment out if you don't need vector files -[._]*.sw[a-p] -[._]s[a-rt-v][a-z] -[._]ss[a-gi-z] -[._]sw[a-p] - -# Session -Session.vim -Sessionx.vim - -# Temporary -.netrwhist -*~ -# Auto-generated tag files -tags -# Persistent undo -[._]*.un~ diff --git a/.gitignore b/.gitignore new file mode 120000 index 0000000..c803af3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.pscaffold/.gitignore \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48bd288..0f33f75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,8 +6,17 @@ test:pylama: - master - develop before_script: - - apt update && apt install -y python3-apt - - pip install -r requirements.txt + - if test -r requirements.txt; then pip install -r requirements.txt; fi script: - pylama *.py + if test -x "$(which pylama)"; then pylama *.py; fi + +test:pytest: + stage: test + only: + - master + - develop + before_script: + - if test -r requirements.txt; then pip install -r requirements.txt; fi + script: + if test -x "$(which pytest)"; then pytest .; fi diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..09f64d6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".pscaffold"] + path = .pscaffold + url = git@gitlab.com:schtobia/pscaffold.git diff --git a/.pscaffold b/.pscaffold new file mode 160000 index 0000000..bc09b49 --- /dev/null +++ b/.pscaffold @@ -0,0 +1 @@ +Subproject commit bc09b49a828808ea9c0b42f80af0b06f90e207cc diff --git a/.style.yapf b/.style.yapf deleted file mode 100644 index b34c3f4..0000000 --- a/.style.yapf +++ /dev/null @@ -1,33 +0,0 @@ -[style] - -# Insert a blank line before a module docstring. -blank_line_before_module_docstring=True - -# The column limit. -column_limit=120 - -# Split before the '.' if we need to split a longer expression: -# -# foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d)) -# -# would reformat to something like: -# -# foo = ('This is a really long string: {}, {}, {}, {}' -# .format(a, b, c, d)) -split_before_dot=True - -# Set to True to split list comprehensions and generators that have -# non-trivial expressions and multiple clauses before each of these -# clauses. For example: -# -# result = [ -# a_long_var + 100 for a_long_var in xrange(1000) -# if a_long_var % 10] -# -# would reformat to something like: -# -# result = [ -# a_long_var + 100 -# for a_long_var in xrange(1000) -# if a_long_var % 10] -split_complex_comprehension=True diff --git a/.style.yapf b/.style.yapf new file mode 120000 index 0000000..e4269e9 --- /dev/null +++ b/.style.yapf @@ -0,0 +1 @@ +.pscaffold/.style.yapf \ No newline at end of file diff --git a/pylama.ini b/pylama.ini deleted file mode 100644 index 4ab7ce6..0000000 --- a/pylama.ini +++ /dev/null @@ -1,14 +0,0 @@ -[pylama] -format = pylint -linters = mccabe,pep257,pydocstyle,pep8,pycodestyle,pyflakes,isort -ignore = D203,C0103 -skip=.env/* - -[pylama:pycodestyle] -max_line_length = 120 - -[pylama:pep8] -max_line_length = 120 - -[pylama:pylint] -max_line_length = 120 diff --git a/pylama.ini b/pylama.ini new file mode 120000 index 0000000..9ad5e0b --- /dev/null +++ b/pylama.ini @@ -0,0 +1 @@ +.pscaffold/pylama.ini \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 613b529..e3dc530 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,10 @@ +eradicate>=2.0.0 +isort>=5.5.0 +mccabe>=0.6.0 +mypy>=0.812 +pycodestyle>=2.6.0 +pydocstyle>=5.1.0 +pyflakes>=2.2.0 pylama>=7.7.0 -pylint>=2.3.0 +pylint>=2.6.0 yapf>=0.27.0