Skip to content

Commit

Permalink
Merge pull request #42 from scipp/make-namespace-package
Browse files Browse the repository at this point in the history
Make namespace package and apply copier update
  • Loading branch information
nvaytet authored Apr 4, 2024
2 parents 88b9e08 + 1c9ef61 commit 1ec105b
Show file tree
Hide file tree
Showing 48 changed files with 151 additions and 129 deletions.
6 changes: 3 additions & 3 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 713c40f
_commit: '2955216'
_src_path: gh:scipp/copier_template
description: Reflectometry data reduction for the European Spallation Source
max_python: '3.12'
min_python: '3.10'
namespace_package: ''
namespace_package: ess
nightly_deps: plopp,sciline,scippneutron,scippnexus,scipp
orgname: scipp
prettyname: ESSreflectometry
projectname: essreflectometry
related_projects: Scipp,ScippNexus,ScippNeutron,Sciline,Plopp
year: 2023
year: 2024
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: CI

on:
Expand All @@ -24,13 +21,13 @@ jobs:
run: |
echo "min_python=$(cat .github/workflows/python-version-ci)" >> $GITHUB_OUTPUT
echo "min_tox_env=py$(cat .github/workflows/python-version-ci | sed 's/\.//g')" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- uses: pre-commit-ci/lite-action@v1.0.1
- uses: pre-commit-ci/lite-action@v1.0.2
if: always()
with:
msg: Apply automatic formatting
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Docs

on:
Expand Down Expand Up @@ -47,11 +44,11 @@ jobs:
runs-on: 'ubuntu-22.04'
steps:
- run: sudo apt install --yes graphviz pandoc
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch == '' && github.ref_name || inputs.branch }}
fetch-depth: 0 # history required so cmake can determine version
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'
- run: python -m pip install --upgrade pip
Expand All @@ -62,12 +59,12 @@ jobs:
if: ${{ inputs.version == '' }}
- run: tox -e linkcheck
if: ${{ inputs.linkcheck }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: docs_html
path: html/

- uses: JamesIves/github-pages-deploy-action@v4.4.3
- uses: JamesIves/github-pages-deploy-action@v4.5.0
if: ${{ inputs.publish }}
with:
branch: gh-pages
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/nightly_at_main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Nightly test at main branch

on:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/nightly_at_release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Nightly tests at latest release

on:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Release

on:
Expand All @@ -18,7 +15,7 @@ jobs:
runs-on: 'ubuntu-22.04'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # history required so setuptools_scm can determine version
Expand All @@ -31,7 +28,7 @@ jobs:
boa
- run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: conda-package-noarch
path: conda/package/noarch/*.tar.bz2
Expand All @@ -41,11 +38,11 @@ jobs:
runs-on: 'ubuntu-22.04'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # history required so setuptools_scm can determine version

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.github/workflows/python-version-ci'

Expand All @@ -56,7 +53,7 @@ jobs:
run: python -m build

- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand All @@ -71,7 +68,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
- uses: pypa/gh-action-pypi-publish@v1.8.10
- uses: pypa/gh-action-pypi-publish@v1.8.14

upload_conda:
name: Deploy Conda
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Test

on:
Expand Down Expand Up @@ -48,16 +45,16 @@ jobs:
runs-on: ${{ inputs.os-variant }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout_ref }}
- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: python -m pip install --upgrade pip
- run: python -m pip install -r ${{ inputs.pip-recipe }}
- run: tox -e ${{ inputs.tox-env }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ inputs.coverage-report }}
with:
name: CoverageReport
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/unpinned.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

name: Unpinned tests at latest release

on:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023, Scipp contributors (https://github.com/scipp)
Copyright (c) 2024, Scipp contributors (https://github.com/scipp)
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
3 changes: 2 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ requirements:

test:
imports:
- essreflectometry
- ess.reflectometry
- ess.amor
requires:
- pytest
source_files:
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/scipp/{{ project|lower }}/releases">older versions</a>).
Current {{ project }} version: {{ version }} (<a href="https://github.com/{{orgname}}/{{ project|lower }}/releases">older versions</a>).
23 changes: 21 additions & 2 deletions docs/api-reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Classes

```{eval-rst}
.. currentmodule:: essreflectometry
.. currentmodule:: ess.reflectometry
.. autosummary::
:toctree: ../generated/classes
Expand All @@ -29,8 +29,27 @@
:template: module-template.rst
:recursive:
amor
orso
supermirror
types
```

## Amor

```{eval-rst}
.. currentmodule:: ess.amor
.. autosummary::
:toctree: ../generated/modules
:template: module-template.rst
:recursive:
beamline
conversions
data
instrument_view
load
orso
resolution
types
```
13 changes: 8 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import os
import sys

import essreflectometry
from ess import reflectometry

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

# General information about the project.
project = u'ESSreflectometry'
copyright = u'2023 Scipp contributors'
copyright = u'2024 Scipp contributors'
author = u'Scipp contributors'

html_show_sourcelink = True
Expand All @@ -30,13 +30,15 @@
'nbsphinx',
'myst_parser',
]

try:
import sciline.sphinxext.domain_types # noqa: F401

extensions.append('sciline.sphinxext.domain_types')
except ModuleNotFoundError:
pass


myst_enable_extensions = [
"amsmath",
"colon_fence",
Expand Down Expand Up @@ -81,7 +83,7 @@
typehints_defaults = 'comma'
typehints_use_rtype = False

sciline_domain_types_prefix = 'essreflectometry'
sciline_domain_types_prefix = 'ess.reflectometry'
sciline_domain_types_aliases = {
'scipp._scipp.core.DataArray': 'scipp.DataArray',
'scipp._scipp.core.Dataset': 'scipp.Dataset',
Expand All @@ -91,6 +93,7 @@
'scipp.core.data_group.DataGroup': 'scipp.DataGroup',
}


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -109,9 +112,9 @@
#

# The short X.Y version.
version = essreflectometry.__version__
version = reflectometry.__version__
# The full version, including alpha/beta/rc tags.
release = essreflectometry.__version__
release = reflectometry.__version__

warning_is_error = True

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Developer documentation
# Development

```{include} ../../CONTRIBUTING.md
```
Expand Down
Loading

0 comments on commit 1ec105b

Please sign in to comment.