From ab8ec990287c1b123aad8a0a03c7054218e71320 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 11 Feb 2021 15:56:52 +0100 Subject: [PATCH] update --- .gitignore | 65 ++++++++++++++++++++++++++++++++++++++++++++---- .gitlab-ci.yml | 13 ++++++++++ .style.yapf | 5 +++- argos-apt.py | 3 ++- pylama.ini | 14 +++++++++++ requirements.txt | 3 +++ 6 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 pylama.ini create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index e0e3af3..f69d4d6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ + +### Python # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -20,6 +22,7 @@ parts/ sdist/ var/ wheels/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg @@ -38,14 +41,17 @@ 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 @@ -55,6 +61,7 @@ coverage.xml *.log local_settings.py db.sqlite3 +db.sqlite3-journal # Flask stuff: instance/ @@ -67,16 +74,34 @@ instance/ docs/_build/ # PyBuilder +.pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints -# pyenv -.python-version +# IPython +profile_default/ +ipython_config.py -# celery beat schedule file +# 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 @@ -102,5 +127,35 @@ venv.bak/ # mypy .mypy_cache/ -/tags -/tags.* +.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/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..48bd288 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +image: python + +test:pylama: + stage: test + only: + - master + - develop + before_script: + - apt update && apt install -y python3-apt + - pip install -r requirements.txt + script: + pylama *.py + diff --git a/.style.yapf b/.style.yapf index 5312d3a..b34c3f4 100644 --- a/.style.yapf +++ b/.style.yapf @@ -1,5 +1,8 @@ [style] +# Insert a blank line before a module docstring. +blank_line_before_module_docstring=True + # The column limit. column_limit=120 @@ -11,7 +14,7 @@ column_limit=120 # # foo = ('This is a really long string: {}, {}, {}, {}' # .format(a, b, c, d)) -split_before_dot=False +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 diff --git a/argos-apt.py b/argos-apt.py index feec983..667ec97 100755 --- a/argos-apt.py +++ b/argos-apt.py @@ -1,6 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -""" Get apt updates for `argos `""" + +"""Get apt updates for `argos `.""" # apt # v1.0 # Tobias Schmidl diff --git a/pylama.ini b/pylama.ini new file mode 100644 index 0000000..4ab7ce6 --- /dev/null +++ b/pylama.ini @@ -0,0 +1,14 @@ +[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/requirements.txt b/requirements.txt new file mode 100644 index 0000000..613b529 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pylama>=7.7.0 +pylint>=2.3.0 +yapf>=0.27.0