Skip to content

Commit

Permalink
Merge pull request #224 from MridulS/copy_bump
Browse files Browse the repository at this point in the history
Run copier and bump up deps
  • Loading branch information
MridulS authored Aug 13, 2024
2 parents 1c0c6a3 + 82c9cdc commit 2a1b6bd
Show file tree
Hide file tree
Showing 21 changed files with 134 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 78693de
_commit: 86a1e5c
_src_path: gh:scipp/copier_template
description: An h5py-like utility for NeXus files with seamless Scipp integration
max_python: '3.12'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit

docs:
needs: tests
Expand All @@ -54,3 +55,4 @@ jobs:
publish: false
linkcheck: ${{ contains(matrix.variant.os, 'ubuntu') && github.ref == 'refs/heads/main' }}
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}
secrets: inherit
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
docs:
name: Build documentation
runs-on: 'ubuntu-22.04'
env:
ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}

steps:
- run: sudo apt install --yes graphviz pandoc
- uses: actions/checkout@v4
Expand All @@ -65,7 +69,7 @@ jobs:
name: docs_html
path: html/

- uses: JamesIves/[email protected].0
- uses: JamesIves/[email protected].3
if: ${{ inputs.publish }}
with:
branch: gh-pages
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly_at_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ jobs:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/nightly_at_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
checkout_ref: ${{ needs.setup.outputs.release_tag }}
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,26 @@ on:
type: string

jobs:
package-test:
runs-on: ${{ inputs.os-variant }}

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref }}
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: python -m pip install --upgrade pip
- run: python -m pip install .
- run: python tests/package_test.py
name: Run package tests

test:
runs-on: ${{ inputs.os-variant }}
env:
ESS_PROTECTED_FILESTORE_USERNAME: ${{ secrets.ESS_PROTECTED_FILESTORE_USERNAME }}
ESS_PROTECTED_FILESTORE_PASSWORD: ${{ secrets.ESS_PROTECTED_FILESTORE_PASSWORD }}

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unpinned.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}
checkout_ref: ${{ needs.setup.outputs.release_tag }}
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ __pycache__/
.pytest_cache
.mypy_cache
docs/generated/
.ruff_cache

# Editor settings
.idea/
Expand Down
3 changes: 2 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ requirements:
- h5py
- python>=3.10

{# Conda does not allow spaces between package name and version, so remove them #}
{% for package in dependencies %}
- {% if package == "graphviz" %}python-graphviz{% else %}{{ package }}{% endif %}
- {% if package == "graphviz" %}python-graphviz{% else %}{{ package|replace(" ", "") }}{% endif %}
{% endfor %}


Expand Down
2 changes: 1 addition & 1 deletion docs/_templates/doc_version.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!-- This will display the version of the docs -->
Current {{ project }} version: {{ version }} (<a href="https://github.com/{{orgname}}/{{ project|lower }}/releases">older versions</a>).
Current ScippNexus version: {{ version }} (<a href="https://github.com/scipp/scippnexus/releases">older versions</a>).
18 changes: 16 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import doctest
import os
import sys
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as get_version

from sphinx.util import logging

sys.path.insert(0, os.path.abspath('.'))

logger = logging.getLogger(__name__)

# General information about the project.
project = 'ScippNexus'
copyright = '2024 Scipp contributors'
Expand Down Expand Up @@ -32,6 +37,8 @@
import sciline.sphinxext.domain_types # noqa: F401

extensions.append('sciline.sphinxext.domain_types')
# See https://github.com/tox-dev/sphinx-autodoc-typehints/issues/457
suppress_warnings = ["config.cache"]
except ModuleNotFoundError:
pass

Expand Down Expand Up @@ -118,8 +125,15 @@
# built documents.
#

release = get_version("scippnexus")
version = ".".join(release.split('.')[:3]) # CalVer
try:
release = get_version("scippnexus")
version = ".".join(release.split('.')[:3]) # CalVer
except PackageNotFoundError:
logger.info(
"Warning: determining version from package metadata failed, falling back to "
"a dummy version number."
)
release = version = "0.0.0-dev"

warning_is_error = True

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extend-exclude = [

[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules/
select = ["B", "C4", "DTZ", "E", "F", "G", "I", "PERF", "PGH", "PT", "PYI", "RUF", "S", "T20", "W"]
select = ["B", "C4", "DTZ", "E", "F", "G", "I", "PERF", "PGH", "PT", "PYI", "RUF", "S", "T20", "UP", "W"]
ignore = [
# Conflict with ruff format, see
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
Expand Down
4 changes: 2 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
h5py==3.11.0
# via -r base.in
numpy==1.26.4
numpy==2.0.1
# via
# h5py
# scipp
Expand All @@ -16,7 +16,7 @@ python-dateutil==2.9.0.post0
# via -r base.in
scipp==24.6.0
# via -r base.in
scipy==1.13.0
scipy==1.14.0
# via -r base.in
six==1.16.0
# via python-dateutil
8 changes: 2 additions & 6 deletions requirements/basetest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
#
# pip-compile-multi
#
exceptiongroup==1.2.1
# via pytest
iniconfig==2.0.0
# via pytest
packaging==24.0
packaging==24.1
# via pytest
pluggy==1.5.0
# via pytest
pytest==8.2.0
pytest==8.3.2
# via -r basetest.in
tomli==2.0.1
# via pytest
24 changes: 10 additions & 14 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#
# pip-compile-multi
#
cachetools==5.3.3
cachetools==5.4.0
# via tox
certifi==2024.2.2
certifi==2024.7.4
# via requests
chardet==5.2.0
# via tox
Expand All @@ -17,7 +17,7 @@ colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.13.4
filelock==3.15.4
# via
# tox
# virtualenv
Expand All @@ -27,30 +27,26 @@ gitpython==3.1.43
# via -r ci.in
idna==3.7
# via requests
packaging==24.0
packaging==24.1
# via
# -r ci.in
# pyproject-api
# tox
platformdirs==4.2.1
platformdirs==4.2.2
# via
# tox
# virtualenv
pluggy==1.5.0
# via tox
pyproject-api==1.6.1
pyproject-api==1.7.1
# via tox
requests==2.31.0
requests==2.32.3
# via -r ci.in
smmap==5.0.1
# via gitdb
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.15.0
tox==4.17.1
# via -r ci.in
urllib3==2.2.1
urllib3==2.2.2
# via requests
virtualenv==20.26.0
virtualenv==20.26.3
# via tox
Loading

0 comments on commit 2a1b6bd

Please sign in to comment.