Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 5 additions & 7 deletions .badgery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ cards:
- group: Tests
type: gh_action
title: Code/package tests (GitHub)
file: test.yaml
file: test.yml
enabled: true

- group: Tests
type: gh_action
title: Tutorial tests (GitHub)
file: tutorial-tests.yaml
file: tutorial-tests.yml
enabled: true

- group: Tests
type: gh_action
title: Package tests (PyPI)
file: pypi-test.yaml
file: pypi-test.yml
enabled: true

- group: Code Quality
Expand Down Expand Up @@ -60,15 +59,14 @@ cards:
title: Docstring coverage (interrogate)
report: reports/{branch}/coverage-docstring.txt
enabled: true

- group: Build & Release
type: gh_action
title: Publishing (PyPI)
workflow: pypi-publish.yaml
workflow: pypi-publish.yml
enabled: true

- group: Build & Release
type: gh_action
title: Docs build/deployment
workflow: docs.yaml
workflow: docs.yml
enabled: true
27 changes: 27 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# WARNING: Do not edit this file manually.
# Any changes will be overwritten by Copier.
_commit: v0.10.1-25-ga5301e9
_src_path: gh:easyscience/templates
app_docs_url: https://easyscience.github.io/diffraction-app
app_doi: 10.5281/zenodo.18163581
app_package_name: easydiffraction_app
app_python: '3.13'
app_repo_name: diffraction-app
home_page_url: https://easyscience.github.io/diffraction
home_repo_name: diffraction
lib_docs_url: https://easyscience.github.io/diffraction-lib
lib_doi: 10.5281/zenodo.18163581
lib_package_name: easydiffraction
lib_python_max: '3.13'
lib_python_min: '3.11'
lib_repo_name: diffraction-lib
project_contact_email: support@easydiffraction.org
project_copyright_years: 2021-2026
project_extended_description: A software for calculating neutron powder diffraction
patterns based on a structural model and refining its parameters against experimental
data
project_name: EasyDiffraction
project_short_description: Diffraction data analysis
project_shortcut: ED
project_type: both
template_type: lib
50 changes: 50 additions & 0 deletions .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'Download artifact'
description: 'Generic wrapper for actions/download-artifact'
inputs:
name:
description: 'Name of the artifact to download'
required: true

path:
description: 'Destination path'
required: false
default: '.'

pattern:
description: 'Glob pattern to match artifact names (optional)'
required: false
default: ''

merge-multiple:
description: 'Merge multiple artifacts into the same directory'
required: false
default: 'false'

github-token:
description: 'GitHub token for cross-repo download (optional)'
required: false
default: ''

repository:
description: 'owner/repo for cross-repo download (optional)'
required: false
default: ''

run-id:
description: 'Workflow run ID for cross-run download (optional)'
required: false
default: ''

runs:
using: 'composite'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
pattern: ${{ inputs.pattern }}
merge-multiple: ${{ inputs.merge-multiple }}
github-token: ${{ inputs.github-token }}
repository: ${{ inputs.repository }}
run-id: ${{ inputs.run-id }}
19 changes: 19 additions & 0 deletions .github/actions/github-script/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'GitHub Script'
description: 'Wrapper for actions/github-script'
inputs:
script:
description: 'JavaScript to run'
required: true

github-token:
description: 'GitHub token (defaults to github.token)'
required: false
default: ${{ github.token }}

runs:
using: 'composite'
steps:
- uses: actions/github-script@v8
with:
script: ${{ inputs.script }}
github-token: ${{ inputs.github-token }}
40 changes: 40 additions & 0 deletions .github/actions/setup-easyscience-bot/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 'Setup EasyScience bot for pushing'
description: 'Create GitHub App token and configure git identity + origin remote'
inputs:
app-id:
description: 'GitHub App ID'
required: true
private-key:
description: 'GitHub App private key (PEM)'
required: true
repositories:
description: 'Additional repositories to grant access to (newline-separated)'
required: false
default: ''

outputs:
token:
description: 'Installation access token'
value: ${{ steps.app-token.outputs.token }}

runs:
using: 'composite'
steps:
- name: Create GitHub App installation token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
repositories: ${{ inputs.repositories }}

- name: Configure git for pushing
shell: bash
run: |
git config user.name "easyscience[bot]"
git config user.email "${{ inputs.app-id }}+easyscience[bot]@users.noreply.github.com"

- name: Configure origin remote to use the bot token
shell: bash
run: |
git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git
44 changes: 44 additions & 0 deletions .github/actions/setup-pixi/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 'Setup Pixi Environment'
description: 'Sets up pixi with common configuration'
inputs:
environments:
description: 'Pixi environments to setup'
required: false
default: 'default'
activate-environment:
description: 'Environment to activate'
required: false
default: 'default'
run-install:
description: 'Whether to run pixi install'
required: false
default: 'true'
locked:
description: 'Whether to run pixi install --locked'
required: false
default: 'false'
frozen:
description: 'Whether to run pixi install --frozen'
required: false
default: 'true'
cache:
description: 'Whether to use cache'
required: false
default: 'false'
post-cleanup:
description: 'Whether to run post cleanup'
required: false
default: 'false'

runs:
using: 'composite'
steps:
- uses: prefix-dev/setup-pixi@v0.9.4
with:
environments: ${{ inputs.environments }}
activate-environment: ${{ inputs.activate-environment }}
run-install: ${{ inputs.run-install }}
locked: ${{ inputs.locked }}
frozen: ${{ inputs.frozen }}
cache: ${{ inputs.cache }}
post-cleanup: ${{ inputs.post-cleanup }}
49 changes: 49 additions & 0 deletions .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Upload artifact'
description: 'Generic wrapper for actions/upload-artifact'
inputs:
name:
description: 'Artifact name'
required: true

path:
description: 'File(s)/dir(s)/glob(s) to upload (newline-separated)'
required: true

include-hidden-files:
description: 'Include hidden files'
required: false
default: 'true'

if-no-files-found:
description: 'warn | error | ignore'
required: false
default: 'error'

compression-level:
description: '0-9 (0 = no compression)'
required: false
default: '0'

retention-days:
description: 'Retention in days (optional)'
required: false
default: ''

overwrite:
description: 'Overwrite an existing artifact with the same name'
required: false
default: 'false'

runs:
using: 'composite'
steps:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
include-hidden-files: ${{ inputs.include-hidden-files }}
if-no-files-found: ${{ inputs.if-no-files-found }}
compression-level: ${{ inputs.compression-level }}
retention-days: ${{ inputs.retention-days }}
overwrite: ${{ inputs.overwrite }}
42 changes: 42 additions & 0 deletions .github/actions/upload-codecov/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Upload coverage to Codecov'
description: 'Generic wrapper for codecov/codecov-action@v5'

inputs:
name:
description: 'Codecov upload name'
required: true

flags:
description: 'Codecov flags'
required: false
default: ''

files:
description: 'Coverage report files'
required: true

fail_ci_if_error:
description: 'Fail CI if upload fails'
required: false
default: 'true'

verbose:
description: 'Enable verbose output'
required: false
default: 'true'

token:
description: 'Codecov token'
required: true

runs:
using: composite
steps:
- uses: codecov/codecov-action@v5
with:
name: ${{ inputs.name }}
flags: ${{ inputs.flags }}
files: ${{ inputs.files }}
fail_ci_if_error: ${{ inputs.fail_ci_if_error }}
verbose: ${{ inputs.verbose }}
token: ${{ inputs.token }}
6 changes: 6 additions & 0 deletions .github/configs/pages-deployment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"source": {
"branch": "gh-pages",
"path": "/"
}
}
37 changes: 37 additions & 0 deletions .github/configs/rulesets-develop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "develop branch",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": ["refs/heads/develop"],
"exclude": []
}
},
"bypass_actors": [
{
"actor_id": 2476259,
"actor_type": "Integration",
"bypass_mode": "always"
}
],
"rules": [
{
"type": "non_fast_forward"
},
{
"type": "deletion"
},
{
"type": "pull_request",
"parameters": {
"allowed_merge_methods": ["squash"],
"dismiss_stale_reviews_on_push": false,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,
"required_review_thread_resolution": false
}
}
]
}
19 changes: 19 additions & 0 deletions .github/configs/rulesets-gh-pages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "gh-pages branch",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": ["refs/heads/gh-pages"],
"exclude": []
}
},
"rules": [
{
"type": "non_fast_forward"
},
{
"type": "deletion"
}
]
}
Loading
Loading