Skip to content
Snippets Groups Projects
Commit 7078dfe3 authored by nimrod's avatar nimrod
Browse files

Updates.

- GitLab CI.
- Refresh pre-commit checks.
- Address some issues.
parent 30c42dfd
No related branches found
No related tags found
No related merge requests found
Pipeline #422 passed
---
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
install:
stage: test
image: python:$tag
before_script:
- pip install docutils pygments
script:
- python setup.py check --verbose --metadata --restructuredtext --strict
- pip install .
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
cache:
paths:
- .cache/
parallel:
matrix:
- tag:
- "2.7-slim"
- "3.6-slim"
- repo: git://github.com/pre-commit/pre-commit-hooks ---
sha: cf550fcab3f12015f8676b8278b30e1a5bc10e70 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks: hooks:
- id: check-added-large-files - id: check-executables-have-shebangs
- id: check-yaml - id: check-merge-conflict
- id: check-merge-conflict - id: check-symlinks
- id: flake8 - id: check-toml
files: Pipfile
- id: trailing-whitespace
- repo: https://github.com/Yelp/detect-secrets
rev: v0.14.3
hooks:
- id: detect-secrets
- repo: https://github.com/adrienverge/yamllint
rev: v1.25.0
hooks:
- id: yamllint
- repo: https://github.com/amperser/proselint/
rev: 0.10.2
hooks:
- id: proselint
types: [plain-text]
exclude: LICENSE
- repo: https://github.com/ambv/black
rev: 20.8b1
hooks:
- id: black
args:
- |
--line-length=79
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
- repo: https://github.com/myint/rstcheck.git
rev: master
hooks:
- id: rstcheck
- repo: https://github.com/PyCQA/prospector
rev: 1.3.1
hooks:
- id: prospector
args:
- |-
--max-line-length=79
- |-
--with-tool=pyroma
- |-
--with-tool=bandit
- |-
--without-tool=pep257
- |-
--doc-warnings
- |-
--test-warnings
- |-
--full-pep8
- |-
--strictness=high
- |-
--no-autodetect
additional_dependencies:
- bandit
- pyroma
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.4
hooks:
- id: flake8
args:
- |-
--doctests
additional_dependencies:
- flake8-bugbear
- repo: https://github.com/mgedmin/check-manifest
rev: '0.45'
hooks:
- id: check-manifest
- repo: https://github.com/executablebooks/mdformat.git
rev: 0.5.3
hooks:
- id: mdformat
- repo: https://github.com/pre-commit/pre-commit.git
rev: v2.9.3
hooks:
- id: validate_manifest
---
language: python
python: ["2.7", "3.6"]
dist: trusty
sudo: false
group: beta
cache:
- pip
- directories:
- $HOME/.pre-commit
install:
- pip install pre-commit
script:
- pre-commit run --all-files
- pip install .
notifications:
email: false
include *.txt
include *.rst
include VERSION
exclude *.yml
exclude *.yaml
Python pre-commit hooks Python pre-commit hooks
####################### #######################
.. image:: https://travis-ci.org/adarnimrod/python-pre-commit.svg?branch=master .. image:: https://git.shore.co.il/nimrod/python-pre-commit/badges/master/pipeline.svg
:target: https://travis-ci.org/adarnimrod/python-pre-commit :target: https://git.shore.co.il/nimrod/python-pre-commit/-/commits/master
:alt: pipeline status
Ansible `pre-commit <http://pre-commit.com/>`_ hooks. Ansible `pre-commit <http://pre-commit.com/>`_ hooks.
...@@ -16,9 +17,9 @@ Add the following to your :code:`.pre-commit-config.yaml`: ...@@ -16,9 +17,9 @@ Add the following to your :code:`.pre-commit-config.yaml`:
.. code:: yaml .. code:: yaml
- repo: https://git.shore.co.il/nimrod/python-pre-commit.git - repo: https://git.shore.co.il/nimrod/python-pre-commit.git
sha: v0.2.0 rev: v0.2.0
hooks: hooks:
- id: piprot - id: piprot
License License
------- -------
...@@ -32,4 +33,4 @@ Author Information ...@@ -32,4 +33,4 @@ Author Information
Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email <https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located <http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
at: https://git.shore.co.il/nimrod/. at: https://git.shore.co.il/explore.
...@@ -2,7 +2,28 @@ from setuptools import setup ...@@ -2,7 +2,28 @@ from setuptools import setup
setup( setup(
name='pre_commit_python_dummy_package', name="pre_commit_python_dummy_package",
version=open('VERSION', 'r').read().strip(), version=open("VERSION", "r").read().strip(),
install_requires=['piprot', 'docutils'], install_requires=["piprot", "docutils"],
description="Dummy package for installing with pre-commit.",
long_description=open("README.rst", "r").read(),
long_description_content_type="text/x-rst",
url="https://git.shore.co.il/nimrod/python-pre-commit",
author="Nimrod Adar",
author_email="nimrod@shore.co.il",
license="MIT",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: System Administrators",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
],
keywords="pre-commit",
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment