Skip to content

Commit

Permalink
Merge pull request #13 from scipp/copier
Browse files Browse the repository at this point in the history
Update from copier
  • Loading branch information
SimonHeybrock authored Jul 18, 2023
2 parents 8f88c2d + 960d5e7 commit 0f6321d
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 6c45980
_commit: 14eaf11
_src_path: gh:scipp/copier_template
description: Build scientific pipelines for your data
github_linux_image: ubuntu-20.04
max_python: '3.11'
min_python: '3.8'
orgname: scipp
Expand Down
25 changes: 11 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
formatting:
name: Formatting and static analysis
runs-on: ubuntu-20.04
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
Expand All @@ -25,23 +25,21 @@ jobs:
commit_message: Apply automatic formatting

tests:
name: Tests ${{ matrix.name }}
name: Tests
needs: formatting
runs-on: ubuntu-20.04
strategy:
matrix:
include:

- {name: '3.8', python: '3.8', os: ubuntu-20.04, tox: py38}
os: ['ubuntu-20.04']
python:
- version: '3.8'
tox-env: 'py38'

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e ${{ matrix.tox }}
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python.version }}
tox-env: ${{ matrix.python.tox-env }}

docs:
needs: tests
Expand All @@ -50,4 +48,3 @@ jobs:
publish: false
version: ${{ github.ref_name }}
branch: ${{ github.head_ref == '' && github.ref_name || github.head_ref }}

4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ env:
jobs:
docs:
name: Build documentation
runs-on: ubuntu-20.04
runs-on: 'ubuntu-20.04'
steps:

- run: sudo apt install --yes graphviz pandoc
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -71,4 +72,3 @@ jobs:
single-commit: true
clean-exclude: release
ssh-key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}

15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaults:
jobs:
build_conda:
name: Conda build
runs-on: ubuntu-20.04
runs-on: 'ubuntu-20.04'

steps:
- uses: actions/checkout@v2
Expand All @@ -31,7 +31,7 @@ jobs:

build_wheels:
name: Wheels
runs-on: ubuntu-20.04
runs-on: 'ubuntu-20.04'

steps:
- uses: actions/checkout@v3
Expand All @@ -58,7 +58,7 @@ jobs:
upload_pypi:
name: Deploy PyPI
needs: [build_wheels, build_conda]
runs-on: ubuntu-20.04
runs-on: 'ubuntu-20.04'
if: github.event_name == 'release' && github.event.action == 'published'

steps:
Expand All @@ -72,22 +72,22 @@ jobs:
upload_conda:
name: Deploy Conda Forge
needs: [build_wheels, build_conda]
runs-on: ubuntu-20.04
runs-on: 'ubuntu-20.04'
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v3
- uses: conda-incubator/setup-miniconda@v2
with:

python-version: '3.8'

- run: conda install -c conda-forge --yes anaconda-client
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-*/*/*.tar.bz2)

manage-versions:
name: Manage Versions
runs-on: ubuntu-20.04

runs-on: 'ubuntu-20.04'

outputs:
version-new: ${{ steps.version.outputs.new }}
version-replaced: ${{ steps.version.outputs.replaced }}
Expand Down Expand Up @@ -124,4 +124,3 @@ jobs:
publish: true
version: ${{ needs.manage-versions.outputs.version-replaced }}
secrets: inherit

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

name: Test

on:
workflow_dispatch:
inputs:
os-variant:
default: 'ubuntu-20.04'
type: string
python-version:
default: '3.8'
type: string
tox-env:
default: 'test'
type: string
pip-recipe:
default: 'requirements/ci.txt'
type: string
coverage-report:
default: false
type: boolean
workflow_call:
inputs:
os-variant:
default: 'ubuntu-20.04'
type: string
python-version:
default: '3.8'
type: string
tox-env:
default: 'test'
type: string
pip-recipe:
default: 'requirements/ci.txt'
type: string
coverage-report:
default: false
type: boolean

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

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
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
if: ${{ inputs.coverage-report }}
with:
name: CoverageReport
path: coverage_html/

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
name = "sciline"
description = "Build scientific pipelines for your data"
authors= [{name="Scipp contributors"}]
license = { "file" = "LICENSE" }
license = { file = "LICENSE" }
readme = "README.md"
classifiers = [
"Intended Audience :: Science/Research",
Expand Down Expand Up @@ -57,5 +57,12 @@ skip_gitignore = true
profile = "black"

[tool.mypy]
mypy_path = "src"
strict = true
ignore_missing_imports = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
show_error_codes = true
warn_unreachable = true

0 comments on commit 0f6321d

Please sign in to comment.