diff --git a/.dictionary b/.dictionary new file mode 100644 index 0000000..361b1ff --- /dev/null +++ b/.dictionary @@ -0,0 +1,12 @@ +Codecov +DNS +Kaussow +PyPI +corenetworks +toc +CoreNetworks +usr +env +dns +CoreNetworksException +str diff --git a/.drone.jsonnet b/.drone.jsonnet index 167ef39..ebd9c71 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,5 +1,5 @@ local PythonVersion(pyversion='2.7') = { - name: 'python' + std.strReplace(pyversion, '.', ''), + name: 'python' + std.strReplace(pyversion, '.', '') + '-pytest', image: 'python:' + pyversion, environment: { PY_COLORS: 1, @@ -7,7 +7,7 @@ local PythonVersion(pyversion='2.7') = { commands: [ 'pip install -r dev-requirements.txt -qq', 'pip install -qq .', - 'pytest corenetworks --cov=corenetworks --no-cov-on-fail', + 'pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail', ], depends_on: [ 'clone', @@ -192,11 +192,64 @@ local PipelineDocs = { ], }, { - name: 'test', - image: 'klakegg/hugo:0.69.0-ext-alpine', + name: 'markdownlint', + image: 'node:lts-alpine', commands: [ - 'cd docs/ && hugo-official', + 'npm install -g markdownlint-cli', + "markdownlint 'docs/content/**/*.md' 'README.md' -p .gitignore", ], + environment: { + FORCE_COLOR: true, + NPM_CONFIG_LOGLEVEL: 'error', + }, + }, + { + name: 'spellcheck', + image: 'node:lts-alpine', + commands: [ + 'npm install -g spellchecker-cli', + "spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions", + ], + environment: { + FORCE_COLOR: true, + NPM_CONFIG_LOGLEVEL: 'error', + }, + }, + { + name: 'testbuild', + image: 'klakegg/hugo:0.72.0-ext-alpine', + commands: [ + 'hugo-official -s docs/ -b http://localhost/', + ], + }, + { + name: 'link-validation', + image: 'xoxys/link-validator', + commands: [ + 'link-validator -ro', + ], + environment: { + LINK_VALIDATOR_BASE_DIR: 'docs/public', + }, + }, + { + name: 'build', + image: 'klakegg/hugo:0.72.0-ext-alpine', + commands: [ + 'hugo-official -s docs/', + ], + }, + { + name: 'beautify', + image: 'node:lts-alpine', + commands: [ + 'npm install -g js-beautify', + "html-beautify -r -f 'docs/public/**/*.html'", + ], + environment: { + FORCE_COLOR: true, + NPM_CONFIG_LOGLEVEL: 'error', + }, }, { name: 'publish', diff --git a/.drone.yml b/.drone.yml index ac1a634..15377c1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,56 +31,56 @@ platform: arch: amd64 steps: -- name: python27 +- name: python27-pytest image: python:2.7 commands: - pip install -r dev-requirements.txt -qq - pip install -qq . - - pytest corenetworks --cov=corenetworks --no-cov-on-fail + - pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail environment: PY_COLORS: 1 depends_on: - clone -- name: python35 +- name: python35-pytest image: python:3.5 commands: - pip install -r dev-requirements.txt -qq - pip install -qq . - - pytest corenetworks --cov=corenetworks --no-cov-on-fail + - pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail environment: PY_COLORS: 1 depends_on: - clone -- name: python36 +- name: python36-pytest image: python:3.6 commands: - pip install -r dev-requirements.txt -qq - pip install -qq . - - pytest corenetworks --cov=corenetworks --no-cov-on-fail + - pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail environment: PY_COLORS: 1 depends_on: - clone -- name: python37 +- name: python37-pytest image: python:3.7 commands: - pip install -r dev-requirements.txt -qq - pip install -qq . - - pytest corenetworks --cov=corenetworks --no-cov-on-fail + - pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail environment: PY_COLORS: 1 depends_on: - clone -- name: python38 +- name: python38-pytest image: python:3.8 commands: - pip install -r dev-requirements.txt -qq - pip install -qq . - - pytest corenetworks --cov=corenetworks --no-cov-on-fail + - pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail environment: PY_COLORS: 1 depends_on: @@ -215,10 +215,49 @@ steps: - pip install -qq . - make doc -- name: test - image: klakegg/hugo:0.69.0-ext-alpine +- name: markdownlint + image: node:lts-alpine commands: - - cd docs/ && hugo-official + - npm install -g markdownlint-cli + - markdownlint 'docs/content/**/*.md' 'README.md' -p .gitignore + environment: + FORCE_COLOR: true + NPM_CONFIG_LOGLEVEL: error + +- name: spellcheck + image: node:lts-alpine + commands: + - npm install -g spellchecker-cli + - spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions + environment: + FORCE_COLOR: true + NPM_CONFIG_LOGLEVEL: error + +- name: testbuild + image: klakegg/hugo:0.72.0-ext-alpine + commands: + - hugo-official -s docs/ -b http://localhost/ + +- name: link-validation + image: xoxys/link-validator + commands: + - link-validator -ro + environment: + LINK_VALIDATOR_BASE_DIR: docs/public + +- name: build + image: klakegg/hugo:0.72.0-ext-alpine + commands: + - hugo-official -s docs/ + +- name: beautify + image: node:lts-alpine + commands: + - npm install -g js-beautify + - html-beautify -r -f 'docs/public/**/*.html' + environment: + FORCE_COLOR: true + NPM_CONFIG_LOGLEVEL: error - name: publish image: plugins/s3-sync @@ -282,6 +321,6 @@ depends_on: --- kind: signature -hmac: a5e57ed65ef9a112b5fa6de464f53526a3efc7df88e3bf6cf7ee130450a84017 +hmac: 457331c0185352fd5ff3f72b2ca3d85af12623a5011fe1d9686b27f9a5d8b4c9 ... diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..b59a114 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,6 @@ +--- +default: True +MD013: False +MD041: False +MD004: + style: dash diff --git a/README.md b/README.md index 6e165b9..b600ffb 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![Build Status](https://img.shields.io/drone/build/xoxys/corenetworks?logo=drone)](https://cloud.drone.io/xoxys/corenetworks) [![Python Version](https://img.shields.io/pypi/pyversions/corenetworks.svg)](https://pypi.org/project/corenetworks/) -[![PyPi Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/) -[![PyPi Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/) +[![PyPI Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/) +[![PyPI Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/) [![Codecov](https://img.shields.io/codecov/c/github/xoxys/corenetworks)](https://codecov.io/gh/xoxys/corenetworks) [![License: MIT](https://img.shields.io/github/license/xoxys/corenetworks)](LICENSE) diff --git a/docs/content/_index.md b/docs/content/_index.md index b5374aa..7363720 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -4,9 +4,9 @@ title: Documentation [![Build Status](https://img.shields.io/drone/build/xoxys/corenetworks?logo=drone)](https://cloud.drone.io/xoxys/corenetworks/) [![Python Version](https://img.shields.io/pypi/pyversions/corenetworks.svg)](https://pypi.org/project/corenetworks/) -[![PyPi Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/) -[![PyPi Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/) +[![PyPI Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/) +[![PyPI Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/) [![Codecov](https://img.shields.io/codecov/c/github/xoxys/corenetworks)](https://codecov.io/gh/xoxys/corenetworks) -[![License: MIT](https://img.shields.io/github/license/xoxys/corenetworks)](LICENSE) +[![License: MIT](https://img.shields.io/github/license/xoxys/corenetworks)](https://github.com/xoxys/corenetworks/blob/master/LICENSE) Python library for the [https://core-networks.de](https://beta.api.core-networks.de/doc/) DNS API. diff --git a/docs/content/setup/_index.md b/docs/content/setup/_index.md index a31054e..83dee78 100644 --- a/docs/content/setup/_index.md +++ b/docs/content/setup/_index.md @@ -6,13 +6,17 @@ title: Setup ## Installation -```python + +{{< highlight Python "linenos=table" >}} pip install corenetworks -``` +{{< /highlight >}} + ## Example usage -```python + + +{{< highlight Python "linenos=table" >}} #!/usr/bin/env python import requests @@ -67,5 +71,6 @@ try: except Exception as e: print(str(e)) - -``` +{{< /highlight >}} + +