Skip to content

Commit

Permalink
Merge pull request #8 from scipp/copier-update
Browse files Browse the repository at this point in the history
Copier update with dependencies.
  • Loading branch information
YooSunYoung authored Dec 13, 2023
2 parents 1628d4f + 1c613da commit 5bfcd7a
Show file tree
Hide file tree
Showing 25 changed files with 193 additions and 139 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: ff7f76b
_commit: ec09f73
_src_path: gh:scipp/copier_template
description: Data reduction for NMX at the European Spallation Source
description: Data reduction for NMX at the European Spallation Source.
max_python: '3.11'
min_python: '3.9'
namespace_package: ess
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ jobs:
uses: ./.github/workflows/docs.yml
with:
publish: false
linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
8 changes: 7 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ on:
default: ''
required: false
type: string
linkcheck:
description: 'Run the link checker. If not set the link checker will not be run.'
default: false
required: false
type: boolean

env:
VERSION: ${{ inputs.version }}
Expand All @@ -55,6 +60,8 @@ jobs:
if: ${{ inputs.version != '' }}
- run: tox -e docs
if: ${{ inputs.version == '' }}
- run: tox -e linkcheck
if: ${{ inputs.linkcheck }}
- uses: actions/upload-artifact@v3
with:
name: docs_html
Expand All @@ -66,4 +73,3 @@ jobs:
branch: gh-pages
folder: html
single-commit: true
ssh-key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ html

*.sw?

# Environments
venv

# Caches
.clangd/
*.ipynb_checkpoints
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## About

Data reduction for NMX at the European Spallation Source
Data reduction for NMX at the European Spallation Source.

## Installation

Expand Down
7 changes: 4 additions & 3 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ requirements:
- sciline>=23.9.1
- scipp>=23.8.0
- scippnexus>=23.9.0
- pooch

test:
imports:
Expand All @@ -33,12 +34,12 @@ test:
build:
noarch: python
script:
- pip install .
- python -m pip install .

about:
home: https://github.com/scipp/essnmx
license: BSD-3-Clause
summary: Data reduction for NMX at the European Spallation Source
description: Data reduction for NMX at the European Spallation Source
summary: Data reduction for NMX at the European Spallation Source.
description: Data reduction for NMX at the European Spallation Source.
dev_url: https://github.com/scipp/essnmx
doc_url: https://scipp.github.io/essnmx
25 changes: 23 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'sphinx.ext.napoleon',
'sphinx_autodoc_typehints',
'sphinx_copybutton',
"sphinx_design",
'sphinx_design',
'nbsphinx',
'myst_parser',
]
Expand Down Expand Up @@ -152,7 +152,7 @@
},
{
"name": "Conda",
"url": "https://anaconda.org/conda-forge/essnmx",
"url": "https://anaconda.org/scipp/essnmx",
"icon": "fa-custom fa-anaconda",
"type": "fontawesome",
},
Expand Down Expand Up @@ -191,8 +191,29 @@

# -- Options for doctest --------------------------------------------------

# sc.plot returns a Figure object and doctest compares that against the
# output written in the docstring. But we only want to show an image of the
# figure, not its `repr`.
# In addition, there is no need to make plots in doctest as the documentation
# build already tests if those plots can be made.
# So we simply disable plots in doctests.
doctest_global_setup = '''
import numpy as np
try:
import scipp as sc
def do_not_plot(*args, **kwargs):
pass
sc.plot = do_not_plot
sc.Variable.plot = do_not_plot
sc.DataArray.plot = do_not_plot
sc.DataGroup.plot = do_not_plot
sc.Dataset.plot = do_not_plot
except ImportError:
# Scipp is not needed by docs if it is not installed.
pass
'''

# Using normalize whitespace because many __str__ functions in scipp produce
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Essnmx

<span style="font-size:1.2em;font-style:italic;color:#5a5a5a">
Data reduction for NMX at the European Spallation Source
Data reduction for NMX at the European Spallation Source.
</br></br>
</span>

Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "essnmx"
description = "Data reduction for NMX at the European Spallation Source"
description = "Data reduction for NMX at the European Spallation Source."
authors = [{ name = "Scipp contributors" }]
license = { file = "LICENSE" }
readme = "README.md"
Expand Down Expand Up @@ -36,6 +36,7 @@ dependencies = [
"sciline>=23.9.1",
"scipp>=23.8.0",
"scippnexus>=23.9.0",
"pooch",
]

dynamic = ["version"]
Expand All @@ -49,7 +50,12 @@ dynamic = ["version"]

[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -v"
addopts = """
--strict-config
--strict-markers
-ra
-v
"""
testpaths = "tests"
filterwarnings = [
"error",
Expand Down
7 changes: 6 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# Temporary until questionary (dep of copier) updates
# See https://github.com/tmbo/questionary/blob/2df265534f3eb77aafcf70902e53e80beb1793e0/pyproject.toml#L36C43-L36C110
prompt-toolkit==3.0.36
# Temporary pinned until prompt-tookit conflict is resolved.
ipython==8.9.0
# --- END OF CUSTOM SECTION ---
# The following was generated by 'tox -e deps', DO NOT EDIT MANUALLY!
dask
Expand All @@ -7,3 +11,4 @@ plopp
sciline>=23.9.1
scipp>=23.8.0
scippnexus>=23.9.0
pooch
71 changes: 63 additions & 8 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# SHA1:d319e96fc4fdca56b4aa64fcfe16d5daa656be7a
# SHA1:dc8a3b216315f3203ec4048ef1930f26643a833e
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
asttokens==2.4.1
# via stack-data
backcall==0.2.0
# via ipython
certifi==2023.11.17
# via requests
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via dask
cloudpickle==3.0.0
Expand All @@ -13,11 +21,15 @@ contourpy==1.2.0
# via matplotlib
cycler==0.12.1
# via matplotlib
dask==2023.11.0
dask==2023.12.0
# via -r base.in
fonttools==4.45.1
decorator==5.1.1
# via ipython
executing==2.0.1
# via stack-data
fonttools==4.46.0
# via matplotlib
fsspec==2023.10.0
fsspec==2023.12.2
# via dask
graphlib-backport==1.0.3
# via
Expand All @@ -27,16 +39,24 @@ graphviz==0.20.1
# via -r base.in
h5py==3.10.0
# via scippnexus
importlib-metadata==6.8.0
idna==3.6
# via requests
importlib-metadata==7.0.0
# via dask
importlib-resources==6.1.1
# via matplotlib
ipython==8.9.0
# via -r base.in
jedi==0.19.1
# via ipython
kiwisolver==1.4.5
# via matplotlib
locket==1.0.0
# via partd
matplotlib==3.8.2
# via plopp
matplotlib-inline==0.1.6
# via ipython
numpy==1.26.2
# via
# contourpy
Expand All @@ -48,12 +68,33 @@ packaging==23.2
# via
# dask
# matplotlib
# pooch
parso==0.8.3
# via jedi
partd==1.4.1
# via dask
pexpect==4.9.0
# via ipython
pickleshare==0.7.5
# via ipython
pillow==10.1.0
# via matplotlib
platformdirs==4.1.0
# via pooch
plopp==23.11.0
# via -r base.in
pooch==1.8.0
# via -r base.in
prompt-toolkit==3.0.36
# via
# -r base.in
# ipython
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
pygments==2.17.2
# via ipython
pyparsing==3.1.1
# via matplotlib
python-dateutil==2.8.2
Expand All @@ -62,22 +103,36 @@ python-dateutil==2.8.2
# scippnexus
pyyaml==6.0.1
# via dask
sciline==23.9.1
requests==2.31.0
# via pooch
sciline==23.12.0
# via -r base.in
scipp==23.11.0
# via
# -r base.in
# scippnexus
scippnexus==23.11.1
scippnexus==23.12.0
# via -r base.in
scipy==1.11.4
# via scippnexus
six==1.16.0
# via python-dateutil
# via
# asttokens
# python-dateutil
stack-data==0.6.3
# via ipython
toolz==0.12.0
# via
# dask
# partd
traitlets==5.14.0
# via
# ipython
# matplotlib-inline
urllib3==2.1.0
# via requests
wcwidth==0.2.12
# via prompt-toolkit
zipp==3.17.0
# via
# importlib-metadata
Expand Down
4 changes: 4 additions & 0 deletions requirements/basetest.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Dependencies that are only used by tests.
# Do not make an environment from this file, use test.txt instead!

pytest
19 changes: 19 additions & 0 deletions requirements/basetest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SHA1:0eaa389e1fdb3a1917c0f987514bd561be5718ee
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
exceptiongroup==1.2.0
# via pytest
iniconfig==2.0.0
# via pytest
packaging==23.2
# via pytest
pluggy==1.3.0
# via pytest
pytest==7.4.3
# via -r basetest.in
tomli==2.0.1
# via pytest
6 changes: 3 additions & 3 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via tox
distlib==0.3.7
distlib==0.3.8
# via virtualenv
filelock==3.13.1
# via
Expand All @@ -32,7 +32,7 @@ packaging==23.2
# -r ci.in
# pyproject-api
# tox
platformdirs==4.0.0
platformdirs==4.1.0
# via
# tox
# virtualenv
Expand All @@ -52,5 +52,5 @@ tox==4.11.4
# via -r ci.in
urllib3==2.1.0
# via requests
virtualenv==20.24.7
virtualenv==20.25.0
# via tox
Loading

0 comments on commit 5bfcd7a

Please sign in to comment.