Skip to content

Commit e72c212

Browse files
authored
🔧 MAINTAIN: setuptools -> flit (#82)
1 parent f9c2f33 commit e72c212

File tree

9 files changed

+122
-149
lines changed

9 files changed

+122
-149
lines changed

Diff for: .github/workflows/tests.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
tests:
2525

2626
strategy:
27+
fail-fast: false
2728
matrix:
2829
os: [ubuntu-latest]
2930
python-version: ["3.7", "3.8", "3.9", "3.10"]
@@ -50,7 +51,7 @@ jobs:
5051
# for some reason the tests/conftest.py::check_nbs fixture breaks pytest-cov's cov-report outputting
5152
# this is why we run `coverage xml` afterwards (required by codecov)
5253
- name: Upload to Codecov
53-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7 && github.repository == 'executablebooks/jupyter-cache'
54+
if: github.repository == 'executablebooks/jupyter-cache'
5455
uses: codecov/codecov-action@v1
5556
with:
5657
name: jupyter-cache-pytests-py3.7
@@ -65,18 +66,18 @@ jobs:
6566
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
6667
runs-on: ubuntu-latest
6768
steps:
68-
- name: Checkout source
69-
uses: actions/checkout@v2
70-
- name: Set up Python 3.8
71-
uses: actions/setup-python@v1
72-
with:
73-
python-version: "3.8"
74-
- name: Build package
75-
run: |
76-
pip install build
77-
python -m build
78-
- name: Publish
79-
uses: pypa/gh-action-pypi-publish@v1.1.0
80-
with:
81-
user: __token__
82-
password: ${{ secrets.PYPI_KEY }}
69+
- name: Checkout source
70+
uses: actions/checkout@v2
71+
- name: Set up Python 3.8
72+
uses: actions/setup-python@v1
73+
with:
74+
python-version: "3.8"
75+
- name: install flit
76+
run: |
77+
pip install flit~=3.4
78+
- name: Build and publish
79+
run: |
80+
flit publish
81+
env:
82+
FLIT_USERNAME: __token__
83+
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}

Diff for: .pre-commit-config.yaml

+3-15
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,15 @@ exclude: >
99
repos:
1010

1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.1.0
12+
rev: v4.2.0
1313
hooks:
1414
- id: check-json
1515
- id: check-yaml
1616
- id: end-of-file-fixer
1717
- id: trailing-whitespace
1818

19-
- repo: https://github.com/mgedmin/check-manifest
20-
rev: "0.47"
21-
hooks:
22-
- id: check-manifest
23-
args: [--no-build-isolation]
24-
additional_dependencies: [setuptools>=46.4.0]
25-
2619
- repo: https://github.com/asottile/pyupgrade
27-
rev: v2.31.0
20+
rev: v2.32.0
2821
hooks:
2922
- id: pyupgrade
3023
args: [--py37-plus]
@@ -35,7 +28,7 @@ repos:
3528
- id: isort
3629

3730
- repo: https://github.com/psf/black
38-
rev: 21.12b0
31+
rev: 22.3.0
3932
hooks:
4033
- id: black
4134

@@ -49,8 +42,3 @@ repos:
4942
# hooks:
5043
# - id: mypy
5144
# additional_dependencies: []
52-
53-
# - repo: https://github.com/asottile/setup-cfg-fmt
54-
# rev: v1.17.0
55-
# hooks:
56-
# - id: setup-cfg-fmt

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 ExecutableBookProject
3+
Copyright (c) 2022 ExecutableBookProject
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: MANIFEST.in

-13
This file was deleted.

Diff for: docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# "sphinx.ext.viewcode",
2727
]
2828
myst_enable_extensions = ["colon_fence", "deflist"]
29-
jupyter_execute_notebooks = "off"
29+
nb_execution_mode = "off"
3030
html_theme_options = {
3131
"repository_url": "https://github.com/executablebooks/jupyter-cache",
3232
"use_repository_button": True,

Diff for: pyproject.toml

+94-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,100 @@
11
[build-system]
2-
requires = ["setuptools>=46.4.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["flit_core >=3.4,<4"]
3+
build-backend = "flit_core.buildapi"
4+
5+
[project]
6+
name = "jupyter-cache"
7+
dynamic = ["version"]
8+
description = "A defined interface for working with a cache of jupyter notebooks."
9+
authors = [{name = "Chris Sewell", email = "[email protected]"}]
10+
readme = "README.md"
11+
license = {file = "LICENSE"}
12+
classifiers = [
13+
"Development Status :: 4 - Beta",
14+
"Framework :: Sphinx :: Extension",
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: MIT License",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: 3.7",
19+
"Programming Language :: Python :: 3.8",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: Implementation :: CPython",
23+
"Topic :: Software Development :: Libraries :: Python Modules",
24+
]
25+
keywords = ["sphinx extension material design web components"]
26+
requires-python = "~=3.7"
27+
dependencies = [
28+
"attrs",
29+
"click",
30+
"importlib-metadata",
31+
"nbclient>=0.2,<0.6",
32+
"nbformat",
33+
"pyyaml",
34+
"sqlalchemy>=1.3.12,<1.5",
35+
"tabulate",
36+
]
37+
38+
[project.urls]
39+
Homepage = "https://github.com/executablebooks/jupyter-cache"
40+
Documentation = "https://jupyter-cache.readthedocs.io"
41+
42+
[project.entry-points."jcache.executors"]
43+
local-serial = "jupyter_cache.executors.basic:JupyterExecutorLocalSerial"
44+
temp-serial = "jupyter_cache.executors.basic:JupyterExecutorTempSerial"
45+
local-parallel = "jupyter_cache.executors.basic:JupyterExecutorLocalMproc"
46+
temp-parallel = "jupyter_cache.executors.basic:JupyterExecutorTempMproc"
47+
48+
[project.entry-points."jcache.readers"]
49+
nbformat = "jupyter_cache.readers:nbf_reader"
50+
jupytext = "jupyter_cache.readers:jupytext_reader"
51+
52+
[project.optional-dependencies]
53+
cli = ["click-log"]
54+
code_style = ["pre-commit~=2.12"]
55+
rtd = [
56+
"nbdime",
57+
"ipykernel",
58+
"jupytext",
59+
"myst-nb @ git+https://github.com/executablebooks/MyST-NB.git",
60+
"sphinx-book-theme~=0.3.0",
61+
"sphinx-copybutton",
62+
]
63+
testing = [
64+
"nbdime",
65+
"coverage",
66+
"ipykernel",
67+
"jupytext",
68+
"matplotlib",
69+
"nbformat>=5.1",
70+
"numpy",
71+
"pandas",
72+
"pytest>=6,<7",
73+
"pytest-cov",
74+
"pytest-regressions",
75+
"sympy",
76+
]
77+
78+
[project.scripts]
79+
jcache = "jupyter_cache.cli.commands.cmd_main:jcache"
80+
81+
[tool.flit.module]
82+
name = "jupyter_cache"
83+
84+
[tool.flit.sdist]
85+
exclude = [
86+
"docs/",
87+
"tests/",
88+
]
489

590
[tool.isort]
691
profile = "black"
792
src_paths = ["jupyter_cache", "tests"]
893
force_sort_within_sections = true
94+
95+
[tool.mypy]
96+
show_error_codes = true
97+
warn_unused_ignores = true
98+
warn_redundant_casts = true
99+
no_implicit_optional = true
100+
strict_equality = true

Diff for: setup.cfg

-93
This file was deleted.

Diff for: setup.py

-6
This file was deleted.

Diff for: tox.ini

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ envlist = py38
1616
[testenv]
1717
usedevelop = true
1818

19-
[testenv:py{36,37,38,39}]
19+
[testenv:py{37,38,39,310}]
2020
extras = testing
2121
deps =
2222
black
@@ -46,4 +46,8 @@ commands_post = echo "open file://{toxinidir}/docs/_build/{posargs:html}/index.h
4646

4747

4848
[pytest]
49-
addopts = --ignore=setup.py --ignore=_archive/
49+
addopts = --ignore=_archive/
50+
51+
[flake8]
52+
max-line-length = 100
53+
extend-ignore = E203

0 commit comments

Comments
 (0)