Skip to content

Commit

Permalink
Merge pull request #325 from scipp/copier-update-2024-04
Browse files Browse the repository at this point in the history
Apply copier update
  • Loading branch information
MridulS authored Apr 16, 2024
2 parents 7c4bb8e + 4dfb4a8 commit 8acb49d
Show file tree
Hide file tree
Showing 18 changed files with 89 additions and 148 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 0b94d03
_commit: c721391
_src_path: https://github.com/scipp/copier_template.git
description: Visualization library for Scipp
max_python: '3.11'
max_python: '3.12'
min_python: '3.9'
namespace_package: ''
nightly_deps: scipp
Expand Down
16 changes: 7 additions & 9 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,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
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/copier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Copier template sync

on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 1'

jobs:
update:
name: Sync with copier template
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.X'
- run: pip install copier
- run: copier update --skip-answered --vcs-ref=HEAD --conflict=rej
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: '[CRON] Sync with copier template'
body: |
This PR updates the project to the latest version of scipp's [copier-template](https://github.com/scipp/copier_template).
Remember to check for any conflicts and resolve them.
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,12 +44,12 @@ 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 }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
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 @@ -63,12 +60,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
21 changes: 9 additions & 12 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 @@ -70,8 +67,8 @@ jobs:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
- uses: pypa/[email protected].10
- uses: actions/download-artifact@v4
- uses: pypa/[email protected].14

upload_conda:
name: Deploy Conda
Expand All @@ -80,7 +77,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: upload-env
Expand All @@ -104,7 +101,7 @@ jobs:
permissions:
contents: write # This is needed so that the action can upload the asset
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- name: Zip documentation
run: |
mv docs_html documentation-${{ github.ref_name }}
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ docs/generated/
*.raw
*.cif
*.rcif
*.ort

# Images
*.png
Expand Down
10 changes: 9 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ package:
source:
path: ..


{% set pyproject = load_file_data('pyproject.toml') %}
{% set dependencies = pyproject.get('project', {}).get('dependencies', {}) %}


requirements:
build:
- setuptools
- setuptools_scm
run:
- matplotlib
- python>=3.9
{% for package in dependencies %}
- {% if package == "graphviz" %}python-graphviz{% else %}{{ package }}{% endif %}
{% endfor %}


test:
imports:
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>).
83 changes: 0 additions & 83 deletions docs/_typehints.py

This file was deleted.

Loading

0 comments on commit 8acb49d

Please sign in to comment.