Skip to content

Commit 065dcaf

Browse files
authored
♻️ REFACTOR: package API/CLI/documentation (#74)
This commit re-writes key parts of the package, (a) to add additional functionality, and (b) with a view to eventually exposing this CLI in https://jupyterbook.org/. Key changes: 1. `stage`/`staging` is now rephrased to `notebook`, plus the addition of `project`, i.e. you add notebooks to a project, then execute them 2. notebook `read_data` is specified per notebook in the project, allowing for multiple types of file to be read/executed via the CLI (e.g. MyST Markdown files, via https://jupytext.readthedocs.io). Before, the read functions were passed directly to the API methods. 3. The executor can be specified with `jbcache execute --executor`, and a parallel notebook executor has been added. 4. Improved execution status indicator in `jbcache project list` and other CLI improvements 4. Re-write of documentation, including better front page, with quick start guide and better logo.
1 parent 7917c68 commit 065dcaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3210
-2674
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ jobs:
1818
- name: Set up Python 3.8
1919
uses: actions/setup-python@v1
2020
with:
21-
python-version: 3.8
21+
python-version: "3.8"
2222
- uses: pre-commit/[email protected]
2323

2424
tests:
2525

2626
strategy:
2727
matrix:
2828
os: [ubuntu-latest]
29-
python-version: [3.6, 3.7, 3.8, 3.9]
29+
python-version: ["3.7", "3.8", "3.9", "3.10"]
3030
include:
3131
- os: windows-latest
32-
python-version: 3.7
32+
python-version: "3.8"
3333

3434
runs-on: ${{ matrix.os }}
3535

@@ -67,14 +67,14 @@ jobs:
6767
steps:
6868
- name: Checkout source
6969
uses: actions/checkout@v2
70-
- name: Set up Python 3.7
70+
- name: Set up Python 3.8
7171
uses: actions/setup-python@v1
7272
with:
73-
python-version: 3.7
73+
python-version: "3.8"
7474
- name: Build package
7575
run: |
76-
pip install wheel
77-
python setup.py sdist bdist_wheel
76+
pip install build
77+
python -m build
7878
- name: Publish
7979
uses: pypa/[email protected]
8080
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,6 @@ _archive/
133133
*_old*
134134
.DS_Store
135135
.vscode/
136+
~$*
137+
_*.ipynb
138+
final_notebook.ipynb

.pre-commit-config.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ exclude: >
88
99
repos:
1010

11-
- repo: git://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.0.1
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: v4.1.0
1313
hooks:
1414
- id: check-json
1515
- id: check-yaml
@@ -23,13 +23,19 @@ repos:
2323
args: [--no-build-isolation]
2424
additional_dependencies: [setuptools>=46.4.0]
2525

26+
- repo: https://github.com/asottile/pyupgrade
27+
rev: v2.31.0
28+
hooks:
29+
- id: pyupgrade
30+
args: [--py37-plus]
31+
2632
- repo: https://github.com/pycqa/isort
27-
rev: 5.9.3
33+
rev: 5.10.1
2834
hooks:
2935
- id: isort
3036

3137
- repo: https://github.com/psf/black
32-
rev: 21.9b0
38+
rev: 21.12b0
3339
hooks:
3440
- id: black
3541

.readthedocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ python:
66
- method: pip
77
path: .
88
extra_requirements:
9+
- cli
910
- rtd
1011

1112
sphinx:

0 commit comments

Comments
 (0)