Skip to content

Commit

Permalink
Merge pull request #83 from scipp/use-plopp
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHeybrock authored Dec 8, 2022
2 parents 644a1fd + 60c8555 commit 0baf76d
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 62 deletions.
7 changes: 2 additions & 5 deletions docs/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from typing import List
from packaging.version import parse, Version, LegacyVersion
from packaging.version import parse, Version
import requests
import argparse

Expand All @@ -15,16 +15,13 @@ def _get_releases(repo: str, organization: str = 'scipp') -> List[Version]:


class VersionInfo:

def __init__(self, repo: str, organization: str = 'scipp'):
self._releases = _get_releases(repo=repo, organization=organization)

def _to_version(self, version) -> Version:
if isinstance(version, str):
version = parse(version)
# When not building for a tagged release we may get, e.g., 'main'.
# Pretend this means the current latest release.
if isinstance(version, LegacyVersion):
return self._releases[0]
return version

def minor_releases(self, first: str = '0.1') -> List[str]:
Expand Down
35 changes: 21 additions & 14 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,46 @@
#
# pip-compile-multi
#
certifi==2022.9.24
cachetools==5.2.0
# via tox
certifi==2022.12.7
# via requests
chardet==5.1.0
# via tox
charset-normalizer==2.1.1
# via requests
colorama==0.4.6
# via tox
distlib==0.3.6
# via virtualenv
filelock==3.8.0
filelock==3.8.2
# via
# tox
# virtualenv
idna==3.4
# via requests
packaging==21.3
packaging==22.0
# via
# -r ci.in
# pyproject-api
# tox
platformdirs==2.5.4
# via virtualenv
platformdirs==2.6.0
# via
# tox
# virtualenv
pluggy==1.0.0
# via tox
py==1.11.0
pyproject-api==1.2.1
# via tox
pyparsing==3.0.9
# via packaging
requests==2.28.1
# via -r ci.in
six==1.16.0
# via tox
tomli==2.0.1
# via tox
tox==3.27.1
# via
# pyproject-api
# tox
tox==4.0.2
# via -r ci.in
urllib3==1.26.12
urllib3==1.26.13
# via requests
virtualenv==20.16.7
virtualenv==20.17.1
# via tox
1 change: 1 addition & 0 deletions requirements/docs.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ipykernel
ipywidgets
packaging
plopp<0.3 # https://github.com/scipp/plopp/issues/111
pooch
requests
sphinx
Expand Down
61 changes: 33 additions & 28 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SHA1:564dd6adb78e9dac979f40d1a3983851e3365239
# SHA1:c0bbfe7a1abb2bc63d4ed65bc3b68fd3239910e6
#
# This file is autogenerated by pip-compile-multi
# To update, run:
Expand All @@ -10,7 +10,7 @@ alabaster==0.7.12
# via sphinx
appdirs==1.4.4
# via pooch
asttokens==2.1.0
asttokens==2.2.1
# via stack-data
attrs==22.1.0
# via jsonschema
Expand All @@ -24,15 +24,17 @@ beautifulsoup4==4.11.1
# pydata-sphinx-theme
bleach==5.0.1
# via nbconvert
certifi==2022.9.24
certifi==2022.12.7
# via requests
charset-normalizer==2.1.1
# via requests
comm==0.1.2
# via ipykernel
contourpy==1.0.6
# via matplotlib
cycler==0.11.0
# via matplotlib
debugpy==1.6.3
debugpy==1.6.4
# via ipykernel
decorator==5.1.1
# via ipython
Expand All @@ -55,21 +57,21 @@ idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==5.0.0
importlib-metadata==5.1.0
# via
# nbconvert
# sphinx
importlib-resources==5.10.0
importlib-resources==5.10.1
# via jsonschema
ipykernel==6.17.1
ipykernel==6.19.1
# via
# -r docs.in
# ipywidgets
ipython==8.6.0
ipython==8.7.0
# via
# ipykernel
# ipywidgets
ipywidgets==8.0.2
ipywidgets==8.0.3
# via -r docs.in
jedi==0.18.2
# via ipython
Expand All @@ -78,20 +80,21 @@ jinja2==3.1.2
# nbconvert
# nbsphinx
# sphinx
jsonschema==4.17.0
jsonschema==4.17.3
# via nbformat
jupyter-client==7.4.7
jupyter-client==7.4.8
# via
# ipykernel
# nbclient
jupyter-core==5.0.0
jupyter-core==5.1.0
# via
# jupyter-client
# nbclient
# nbconvert
# nbformat
jupyterlab-pygments==0.2.2
# via nbconvert
jupyterlab-widgets==3.0.3
jupyterlab-widgets==3.0.4
# via ipywidgets
kiwisolver==1.4.4
# via matplotlib
Expand All @@ -100,16 +103,18 @@ markupsafe==2.1.1
# jinja2
# nbconvert
matplotlib==3.6.2
# via -r docs.in
# via
# -r docs.in
# plopp
matplotlib-inline==0.1.6
# via
# ipykernel
# ipython
mistune==2.0.4
# via nbconvert
nbclient==0.7.0
nbclient==0.7.2
# via nbconvert
nbconvert==7.2.5
nbconvert==7.2.6
# via nbsphinx
nbformat==5.7.0
# via
Expand All @@ -122,8 +127,7 @@ nest-asyncio==1.5.6
# via
# ipykernel
# jupyter-client
# nbclient
packaging==21.3
packaging==22.0
# via
# -r docs.in
# ipykernel
Expand All @@ -144,11 +148,13 @@ pillow==9.3.0
# via matplotlib
pkgutil-resolve-name==1.3.10
# via jsonschema
platformdirs==2.5.4
platformdirs==2.6.0
# via jupyter-core
plopp==0.2.2
# via -r docs.in
pooch==1.6.0
# via -r docs.in
prompt-toolkit==3.0.33
prompt-toolkit==3.0.36
# via ipython
psutil==5.9.4
# via ipykernel
Expand All @@ -164,9 +170,7 @@ pygments==2.13.0
# nbconvert
# sphinx
pyparsing==3.0.9
# via
# matplotlib
# packaging
# via matplotlib
pyrsistent==0.19.2
# via jsonschema
pytz==2022.6
Expand Down Expand Up @@ -210,16 +214,17 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
stack-data==0.6.1
stack-data==0.6.2
# via ipython
tinycss2==1.2.1
# via nbconvert
tornado==6.2
# via
# ipykernel
# jupyter-client
traitlets==5.5.0
traitlets==5.6.0
# via
# comm
# ipykernel
# ipython
# ipywidgets
Expand All @@ -230,17 +235,17 @@ traitlets==5.5.0
# nbconvert
# nbformat
# nbsphinx
urllib3==1.26.12
urllib3==1.26.13
# via requests
wcwidth==0.2.5
# via prompt-toolkit
webencodings==0.5.1
# via
# bleach
# tinycss2
widgetsnbextension==4.0.3
widgetsnbextension==4.0.4
# via ipywidgets
zipp==3.10.0
zipp==3.11.0
# via
# importlib-metadata
# importlib-resources
18 changes: 9 additions & 9 deletions requirements/static.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ attrs==22.1.0
# via jsonschema
fastjsonschema==2.16.2
# via nbformat
flake8==5.0.4
flake8==6.0.0
# via -r static.in
importlib-resources==5.10.0
importlib-resources==5.10.1
# via jsonschema
jsonschema==4.17.0
jsonschema==4.17.3
# via nbformat
jupyter-core==5.0.0
jupyter-core==5.1.0
# via nbformat
mccabe==0.7.0
# via flake8
Expand All @@ -25,21 +25,21 @@ nbstripout==0.6.1
# via -r static.in
pkgutil-resolve-name==1.3.10
# via jsonschema
platformdirs==2.5.4
platformdirs==2.6.0
# via jupyter-core
pycodestyle==2.9.1
pycodestyle==2.10.0
# via flake8
pyflakes==2.5.0
pyflakes==3.0.1
# via flake8
pyrsistent==0.19.2
# via jsonschema
toml==0.10.2
# via -r static.in
traitlets==5.5.0
traitlets==5.6.0
# via
# jupyter-core
# nbformat
yapf==0.32.0
# via -r static.in
zipp==3.10.0
zipp==3.11.0
# via importlib-resources
4 changes: 1 addition & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ exceptiongroup==1.0.4
# via pytest
iniconfig==1.1.1
# via pytest
packaging==21.3
packaging==22.0
# via pytest
pluggy==1.0.0
# via pytest
pyparsing==3.0.9
# via packaging
pytest==7.2.0
# via -r test.in
tomli==2.0.1
Expand Down
4 changes: 1 addition & 3 deletions requirements/wheels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
#
build==0.9.0
# via -r wheels.in
packaging==21.3
packaging==22.0
# via build
pep517==0.13.0
# via build
pyparsing==3.0.9
# via packaging
tomli==2.0.1
# via
# build
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ basepython = python3.8
deps = {posargs:}
-r requirements/docs.txt
allowlist_externals=find
setenv =
# Search directory for confuse for custom config enabling plopp plotting
SCIPPDIR={toxinidir}{/}docs{/}buildconfig
commands = python -m sphinx -j2 -v -b html -d {toxworkdir}/docs_doctrees docs html
python -m sphinx -j2 -v -b doctest -d {toxworkdir}/docs_doctrees docs html
find html -type f -name "*.ipynb" -not -path "html/_sources/*" -delete
Expand Down

0 comments on commit 0baf76d

Please sign in to comment.