-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from scipp/complete-switch-to-namespace-package
Complete switch to namespace package
- Loading branch information
Showing
18 changed files
with
62 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -24,15 +21,16 @@ 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' | ||
- run: python -m pip install --upgrade pip | ||
- run: python -m pip install -r requirements/ci.txt | ||
- run: tox -e static | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
- uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --all-files | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() | ||
with: | ||
commit_message: Apply automatic formatting | ||
msg: Apply automatic formatting | ||
|
||
tests: | ||
name: Tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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' | ||
|
||
|
@@ -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 | ||
|
@@ -71,7 +68,7 @@ jobs: | |
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: pypa/[email protected].10 | ||
- uses: pypa/[email protected].14 | ||
|
||
upload_conda: | ||
name: Deploy Conda | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp) | ||
|
||
import importlib.metadata | ||
|
||
from . import data, general, io | ||
from .general import default_parameters | ||
|
||
try: | ||
__version__ = importlib.metadata.version(__package__ or __name__) | ||
except importlib.metadata.PackageNotFoundError: | ||
__version__ = "0.0.0" | ||
|
||
providers = general.providers + io.providers | ||
|
||
del importlib | ||
|
||
__all__ = ['data', 'general', 'io', 'providers', 'default_parameters'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp) | ||
import ess.sans as pkg | ||
import pytest | ||
|
||
from ess import isissans, loki, sans | ||
|
||
def test_has_version(): | ||
|
||
@pytest.mark.parametrize('pkg', [sans, loki, isissans]) | ||
def test_has_version(pkg): | ||
assert hasattr(pkg, '__version__') |