Commit 8253c72b authored by nimrod's avatar nimrod
Browse files

Python project scaffolding.

parent 73a696a6
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -52,4 +52,3 @@ dist/
tfplan
*.tfstate*
*.venv
mnpw
+24 −0
Original line number Diff line number Diff line
@@ -2,3 +2,27 @@
include:
  - project: shore/ci-templates
    file: templates/pre-commit.yml
  - project: shore/ci-templates
    file: templates/python.yml
  - project: shore/ci-templates
    file: templates/gitlab-release.yml
  - template: Security/SAST.gitlab-ci.yml

variables:
  SAST_EXPERIMENTAL_FEATURES: "true"

build-wheel:
  extends: .python3
  stage: build
  script:
    - poetry check --verbose --no-interaction
    - poetry build --verbose --no-interaction --format wheel
  artifacts:
    paths:
      - dist/*.whl

install-wheel:
  extends: .install-wheel
  script:
    - mnpw --help
    - mnpw --version
+77 −6
Original line number Diff line number Diff line
---
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.4.0
    rev: v4.0.1
    hooks:
      - id: check-added-large-files
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: check-toml
      - id: trailing-whitespace

  - repo: https://github.com/Yelp/detect-secrets
@@ -19,16 +19,66 @@ repos:
      - id: yamllint

  - repo: https://github.com/amperser/proselint/
    rev: 0.10.2
    rev: 0.11.2
    hooks:
      - id: proselint
        types: [plain-text]
        exclude: LICENSE

  - repo: https://github.com/executablebooks/mdformat.git
    rev: 0.7.4
  - repo: https://github.com/ambv/black
    rev: 21.6b0
    hooks:
      - id: mdformat
      - 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: 3f92957478422df87bd730abde66f089cc1ee19b  # pragma: allowlist secret
    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.9.2
    hooks:
      - id: flake8
        args:
          - |-
            --doctests
        additional_dependencies:
          - flake8-bugbear

  - repo: https://gitlab.com/devopshq/gitlab-ci-linter
    rev: v1.0.3
@@ -37,3 +87,24 @@ repos:
        args:
          - "--server"
          - https://git.shore.co.il


  - repo: https://github.com/timothycrosley/isort
    rev: 5.9.1
    hooks:
      - id: isort
        additional_dependencies:
          - toml

  - repo: local
    hooks:
      - id: poetry check
        name: poetry check
        language: system
        entry: poetry
        args: [check]
        description: Checks pyproject.toml
        always_run: true
        pass_filenames: false
        types: [toml]
        files: pyproject\.toml

README.md

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
# My Nagios Plugin Wrapper

[![pipeline status](https://git.shore.co.il/shore/mnpw/badges/master/pipeline.svg)](https://git.shore.co.il/shore/mnpw/-/commits/master)

## License

This software is licensed under the MIT license (see `LICENSE.txt`).

## Author Information

Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
[website](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 at: <https://git.shore.co.il/explore/>.

README.rst

0 → 100644
+20 −0
Original line number Diff line number Diff line
My Nagios plugin wrapper
########################

.. image:: https://git.shore.co.il/shore/mnpw/badges/master/pipeline.svg
    :target: https://git.shore.co.il/shore/mnpw/-/commits/master
    :alt: pipeline status

License
-------

This software is licensed under the MIT license (see the :code:`LICENSE.txt`
file).

Author
------

Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<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
at: https://git.shore.co.il/nimrod/.
Loading