Skip to content

Commit 5c21220

Browse files
committed
Use click for CLI, refactor and add docs.
1 parent baa41cd commit 5c21220

36 files changed

+796
-291
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ tag = True
1010
[bumpversion:file:README.rst]
1111

1212
[bumpversion:file:repo_helper.yml]
13+
14+
[bumpversion:file:doc-source/index.rst]

.github/workflows/cleanup.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Artefact Cleaner
4+
on:
5+
schedule:
6+
- cron: 0 9 1 * *
7+
jobs:
8+
Clean:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: cleanup
12+
uses: glassechidna/artifact-cleaner@v2
13+
with:
14+
minimumAge: 1000000.0

.github/workflows/flake8.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Flake8
4+
5+
on:
6+
push:
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
Run:
12+
name: "Flake8"
13+
runs-on: "ubuntu-18.04"
14+
15+
steps:
16+
- name: Checkout 🛎️
17+
uses: "actions/checkout@v2"
18+
19+
- name: Setup Python 🐍
20+
uses: "actions/setup-python@v2"
21+
with:
22+
python-version: "3.8"
23+
24+
- name: Install dependencies 🔧
25+
run: |
26+
python -VV
27+
python -m site
28+
python -m pip install --upgrade pip setuptools wheel
29+
python -m pip install flake8-prettycount
30+
python -m pip install .
31+
32+
- name: "Run Flake8"
33+
run: "python -m flake8_prettycount flake8_github_action --format github"

.github/workflows/octocheese.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
pypi_name: "notebook2script"
1717
env:
1818
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19+
if: startsWith(github.ref, 'refs/tags/') != true

.github/workflows/python_ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ jobs:
2222
steps:
2323
- name: Checkout 🛎️
2424
uses: "actions/checkout@v2"
25+
2526
- name: Setup Python 🐍
2627
uses: "actions/setup-python@v2"
2728
with:
2829
python-version: "${{ matrix.python-version }}"
30+
2931
- name: Install dependencies 🔧
3032
run: |
3133
python -VV
3234
python -m site
3335
python -m pip install --upgrade pip setuptools wheel
3436
python -m pip install --upgrade tox tox-gh-actions virtualenv
3537
36-
3738
- name: "Run Tests for Python ${{ matrix.python-version }}"
3839
run: "python -m tox"

.github/workflows/python_ci_linux.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ jobs:
2222
steps:
2323
- name: Checkout 🛎️
2424
uses: "actions/checkout@v2"
25+
2526
- name: Setup Python 🐍
2627
uses: "actions/setup-python@v2"
2728
with:
2829
python-version: "${{ matrix.python-version }}"
30+
2931
- name: Install dependencies 🔧
3032
run: |
3133
python -VV
@@ -76,7 +78,7 @@ jobs:
7678
shopt -s globstar
7779
python -m coverage combine coverage/**/.coverage
7880
79-
- name: "Upload Combined Coverage Aretfact"
81+
- name: "Upload Combined Coverage Artefact"
8082
uses: actions/upload-artifact@v2
8183
with:
8284
name: "combined-coverage"

.github/workflows/python_ci_macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ jobs:
2222
steps:
2323
- name: Checkout 🛎️
2424
uses: "actions/checkout@v2"
25+
2526
- name: Setup Python 🐍
2627
uses: "actions/setup-python@v2"
2728
with:
2829
python-version: "${{ matrix.python-version }}"
30+
2931
- name: Install dependencies 🔧
3032
run: |
3133
python -VV
3234
python -m site
3335
python -m pip install --upgrade pip setuptools wheel
3436
python -m pip install --upgrade tox tox-gh-actions virtualenv
3537
36-
3738
- name: "Run Tests for Python ${{ matrix.python-version }}"
3839
run: "python -m tox"

.isort.cfg

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@ default_section = THIRDPARTY
1515
;no_lines_before=LOCALFOLDER
1616
known_third_party =
1717
astroid
18+
click
19+
consolekit
1820
coverage
19-
coverage-pyver-pragma
20-
domdf-python-tools
21+
coverage_pyver_pragma
22+
domdf_python_tools
2123
github
2224
ipython
2325
isort
2426
nbconvert
25-
pre-commit-hooks
27+
pre_commit_hooks
2628
pylint
2729
pytest
28-
pytest-cov
29-
pytest-randomly
30-
pytest-rerunfailures
31-
pytest-timeout
30+
pytest_cov
31+
pytest_randomly
32+
pytest_rerunfailures
33+
pytest_timeout
3234
requests
33-
yapf-isort
35+
yapf_isort
3436
known_first_party = notebook2script
3537
remove_redundant_aliases = True

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ repos:
5959
- id: forbid-crlf
6060

6161
- repo: https://github.com/domdfcoding/yapf-isort
62-
rev: v0.5.2
62+
rev: v0.5.4
6363
hooks:
6464
- id: yapf-isort
6565
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.py$
6666

6767
- repo: https://github.com/domdfcoding/dep_checker
68-
rev: v0.3.1
68+
rev: v0.4.1
6969
hooks:
7070
- id: dep_checker
7171
args:

.readthedocs.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
# This file is managed by 'repo_helper'. Don't edit it directly.
22
# Read the Docs configuration file
33
---
4-
5-
# Required
64
version: 2
7-
85
sphinx:
96
builder: html
107
configuration: doc-source/conf.py
11-
12-
# Optionally build your docs in additional formats such as PDF and ePub
138
formats: all
14-
159
python:
1610
version: 3.8
1711
install:
18-
- requirements: requirements.txt
19-
- requirements: doc-source/requirements.txt
12+
- requirements: requirements.txt
13+
- requirements: doc-source/requirements.txt

0 commit comments

Comments
 (0)