From fa283ffaff0ab1002c0ba81461c0ed3844f9e75b Mon Sep 17 00:00:00 2001 From: Pawel Sikora Date: Fri, 23 Apr 2021 20:04:21 +0200 Subject: [PATCH] Update README, LICENSE, and yaml workflow files --- .codecov.yaml | 26 ++++++++++++++++++++++++++ .pre-commit-config.yaml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 4 ++++ LICENSE | 2 +- README.md | 7 +++++++ requirements.txt | 4 ++++ setup.py | 29 +++++++++++------------------ 7 files changed, 88 insertions(+), 19 deletions(-) create mode 100644 .codecov.yaml create mode 100644 .pre-commit-config.yaml create mode 100644 .travis.yml create mode 100644 requirements.txt diff --git a/.codecov.yaml b/.codecov.yaml new file mode 100644 index 0000000..09e000c --- /dev/null +++ b/.codecov.yaml @@ -0,0 +1,26 @@ +comment: false + +coverage: + status: + project: + default: + # Commits pushed to master should not make the overall + # project coverage decrease by more than x%: + target: auto + threshold: 20% + patch: + default: + # Be tolerant on slight code coverage diff on PRs to limit + # noisy red coverage status on github PRs. + # Note: The coverage stats are still uploaded + # to codecov so that PR reviewers can see uncovered lines + target: auto + threshold: 20% + +codecov: + notify: + # Prevent coverage status to upload multiple times for parallel and long + # running CI pipelines. This configuration is particularly useful on PRs + # to avoid confusion. Note that this value is set to the number of Azure + # Pipeline jobs uploading coverage reports. + after_n_builds: 6 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..235a8c2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,35 @@ +repos: + - repo: local + hooks: + - id: black + name: black + entry: black + language: python + types: [python] + language_version: python3.7 + args: [--line-length=120] + - repo: local + hooks: + - id: mypy + name: mypy + entry: mypy + language: system + types: [python] + args: [--ignore-missing-imports, --namespace-packages, --show-error-codes, --pretty] + - repo: local + hooks: + - id: flake8 + name: flake8 + entry: flake8 + language: system + types: [python] + args: [--max-line-length=120, "--ignore=D101,D104,D212,D200,E203,W293,D412,W503"] +# D100 requires all Python files (modules) to have a "public" docstring even if all functions within have a docstring. +# D104 requires __init__ files to have a docstring +# D212 +# D200 +# D412 No blank lines allowed between a section header and its content +# E203 +# W293 blank line contains whitespace +# W503 line break before binary operator (for compatibility with black) + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2ddbf47 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: + python +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/LICENSE b/LICENSE index 857e7e5..684233c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 pawelsikora +Copyright (c) 2020 Pawel Sikora Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e4fc0fb..6d4901b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +[![Actions Status](https://github.com/pawelsikora/mkdocs-with-confluence/workflows/pytest/badge.svg)](https://github.com/pawelsikora/mkdocs-with-confluence/actions) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-with-confluence) +![PyPI](https://img.shields.io/pypi/v/mkdocs-with-confluence) +![PyPI - Downloads](https://img.shields.io/pypi/dm/mkdocs-with-confluence) +[![codecov](https://codecov.io/gh/pawelsikora/mkdocs-with-confluence/branch/master/graph/badge.svg)](https://codecov.io/gh/pawelsikora/mkdocs-with-confluence) +![GitHub contributors](https://img.shields.io/github/contributors/pawelsikora/mkdocs-with-confluence) +![PyPI - License](https://img.shields.io/pypi/l/mkdocs-with-confluence # mkdocs-with-confluence MkDocs plugin that converts markdown pages into confluence markup diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..fa0a28f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +pre-commit +mimetypes +mistune +md2cf diff --git a/setup.py b/setup.py index d572498..8416b16 100644 --- a/setup.py +++ b/setup.py @@ -1,23 +1,16 @@ from setuptools import setup, find_packages setup( - name='mkdocs-with-confluence', - version='0.1.0', - description='MkDocs plugin for uploading markdown documentation to Confluence via Confluence REST API', - keywords='mkdocs markdown confluence documentation rest python', - url='https://github.com/pawelsikora/mkdocs-with-confluence/', - author='Pawel Sikora', - author_email='sikor6@gmail.com', - license='MIT', - python_requires='>=3.6', - install_requires=[ - 'mkdocs>=1.1', - 'jinja2' - ], + name="mkdocs-with-confluence", + version="0.1.1", + description="MkDocs plugin for uploading markdown documentation to Confluence via Confluence REST API", + keywords="mkdocs markdown confluence documentation rest python", + url="https://github.com/pawelsikora/mkdocs-with-confluence/", + author="Pawel Sikora", + author_email="sikor6@gmail.com", + license="MIT", + python_requires=">=3.6", + install_requires=["mkdocs>=1.1", "jinja2"], packages=find_packages(), - entry_points={ - 'mkdocs.plugins': [ - 'mkdocs-with-confluence = mkdocs_with_confluence.plugin:MkdocsWithConfluence' - ] - } + entry_points={"mkdocs.plugins": ["mkdocs-with-confluence = mkdocs_with_confluence.plugin:MkdocsWithConfluence"]}, )