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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# WARNING: Do not edit this file manually.
# Any changes will be overwritten by Copier.
_commit: v0.4.8
_commit: v0.11.0-9-g7085ef7
_src_path: gh:easyscience/templates
app_docs_url: https://easyscience.github.io/peasy-app
app_doi: 10.5281/zenodo.18163581
app_doi: 10.5281/zenodo.18700888
app_package_name: easypeasy_app
app_python: '3.13'
app_repo_name: peasy-app
home_page_url: https://easyscience.github.io/peasy
home_repo_name: peasy
lib_docs_url: https://easyscience.github.io/peasy-lib
lib_doi: 10.5281/zenodo.18163581
lib_doi: 10.5281/zenodo.18700888
lib_package_name: easypeasy
lib_python_max: '3.13'
lib_python_min: '3.11'
Expand All @@ -17,9 +19,7 @@ project_contact_email: support@easyscience.org
project_copyright_years: 2025-2026
project_extended_description: A software for performing imaginary calculations based
on a imaginary model and refining its parameters against imaginary data
project_homepage_url: https://easyscience.github.io/peasy
project_name: EasyPeasy
project_repo_name: peasy
project_short_description: Imaginary data analysis
project_shortcut: EP
project_type: both
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Download artifact'
description: 'Generic wrapper for actions/download-artifact'
description: 'Wrapper for actions/download-artifact'
inputs:
name:
description: 'Name of the artifact to download'
Expand Down Expand Up @@ -39,7 +39,7 @@ runs:
using: 'composite'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/github-script/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
runs:
using: 'composite'
steps:
- uses: actions/github-script@v8
- uses: actions/github-script@v9
with:
script: ${{ inputs.script }}
github-token: ${{ inputs.github-token }}
4 changes: 2 additions & 2 deletions .github/actions/setup-easyscience-bot/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ runs:
steps:
- name: Create GitHub App installation token
id: app-token
uses: actions/create-github-app-token@v2
uses: actions/create-github-app-token@v3
with:
app-id: ${{ inputs.app-id }}
client-id: ${{ inputs.app-id }}
private-key: ${{ inputs.private-key }}
repositories: ${{ inputs.repositories }}

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup-pixi/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Setup Pixi Environment'
description: 'Sets up pixi with common configuration'
description: 'Wrapper for prefix-dev/setup-pixi'
inputs:
environments:
description: 'Pixi environments to setup'
Expand Down Expand Up @@ -33,7 +33,7 @@ inputs:
runs:
using: 'composite'
steps:
- uses: prefix-dev/setup-pixi@v0.9.3
- uses: prefix-dev/setup-pixi@v0.9.4
with:
environments: ${{ inputs.environments }}
activate-environment: ${{ inputs.activate-environment }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Upload artifact'
description: 'Generic wrapper for actions/upload-artifact'
description: 'Wrapper for actions/upload-artifact'
inputs:
name:
description: 'Artifact name'
Expand Down Expand Up @@ -38,7 +38,7 @@ runs:
using: 'composite'
steps:
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/upload-codecov/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Upload coverage to Codecov'
description: 'Generic wrapper for codecov/codecov-action@v5'
description: 'Wrapper for codecov/codecov-action'

inputs:
name:
Expand Down Expand Up @@ -32,7 +32,7 @@ inputs:
runs:
using: composite
steps:
- uses: codecov/codecov-action@v5
- uses: codecov/codecov-action@v6
with:
name: ${{ inputs.name }}
flags: ${{ inputs.flags }}
Expand Down
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"
}
]
}
30 changes: 30 additions & 0 deletions .github/configs/rulesets-master.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "master branch",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": ["~DEFAULT_BRANCH"],
"exclude": []
}
},
"rules": [
{
"type": "non_fast_forward"
},
{
"type": "deletion"
},
{
"type": "pull_request",
"parameters": {
"allowed_merge_methods": ["merge"],
"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
}
}
]
}
69 changes: 69 additions & 0 deletions .github/scripts/backmerge-conflict-issue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
module.exports = async ({ github, context, core }) => {
// Repo context
const owner = context.repo.owner
const repo = context.repo.repo

// Link to the exact workflow run that detected the conflict
const runUrl = `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`

// We use a *stable title* so we can find/reuse the same "conflict tracker" issue
// instead of creating a new issue on every failed run.
const title = 'Backmerge conflict: master → develop'

// Comment/issue body includes the run URL so maintainers can jump straight to logs.
const body = [
'Automatic backmerge failed due to merge conflicts.',
'',
`Workflow run: ${runUrl}`,
'',
'Manual resolution required.',
].join('\n')

// Label applied to the tracker issue (assumed to already exist in the repo).
const label = '[bot] backmerge'

// Search issues by title across *open and closed* issues.
// Why: if the conflict was resolved previously and the issue was closed,
// we prefer to reopen it and append a new comment instead of creating duplicates.
const q = `repo:${owner}/${repo} is:issue in:title "${title}"`
const search = await github.rest.search.issuesAndPullRequests({
q,
per_page: 10,
})

// Pick the first exact-title match (search can return partial matches).
const existing = search.data.items.find((i) => i.title === title)

if (existing) {
// If a tracker issue exists, reuse it:
// - reopen it if needed
// - add a comment with the new run URL
if (existing.state === 'closed') {
await github.rest.issues.update({
owner,
repo,
issue_number: existing.number,
state: 'open',
})
}

await github.rest.issues.createComment({
owner,
repo,
issue_number: existing.number,
body,
})

core.notice(`Conflict issue updated: #${existing.number}`)
return
}

// No tracker issue exists yet -> create the first one.
await github.rest.issues.create({
owner,
repo,
title,
body,
labels: [label],
})
}
77 changes: 77 additions & 0 deletions .github/scripts/publish-dashboard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env bash

set -euo pipefail

remote_repository="${DASHBOARD_REMOTE_REPOSITORY:?}"
publish_branch="${DASHBOARD_PUBLISH_BRANCH:-master}"
source_dir="${DASHBOARD_SOURCE_DIR:?}"
token="${DASHBOARD_TOKEN:?}"
git_user_name="${DASHBOARD_GIT_USER_NAME:-easyscience[bot]}"
git_user_email="${DASHBOARD_GIT_USER_EMAIL:?}"
commit_message="${DASHBOARD_COMMIT_MESSAGE:?}"
max_attempts="${DASHBOARD_PUSH_ATTEMPTS:-3}"
delay_seconds="${DASHBOARD_PUSH_DELAY_SECONDS:-15}"

workspace_dir="$(mktemp -d)"
repo_dir="${workspace_dir}/dashboard"
remote_url="https://x-access-token:${token}@github.com/${remote_repository}.git"

cleanup() {
rm -rf "${workspace_dir}"
}

prepare_worktree() {
if [[ ! -d "${repo_dir}/.git" ]]; then
git clone --branch "${publish_branch}" --depth 1 "${remote_url}" "${repo_dir}"
else
git -C "${repo_dir}" fetch origin "${publish_branch}"
git -C "${repo_dir}" checkout "${publish_branch}"
git -C "${repo_dir}" reset --hard "origin/${publish_branch}"
git -C "${repo_dir}" clean -fd
fi

git -C "${repo_dir}" config user.name "${git_user_name}"
git -C "${repo_dir}" config user.email "${git_user_email}"
}

sync_publish_dir() {
cp -R "${source_dir}/." "${repo_dir}/"
git -C "${repo_dir}" add .

if git -C "${repo_dir}" diff --cached --quiet; then
return 1
fi

git -C "${repo_dir}" commit -m "${commit_message}"
}

trap cleanup EXIT

prepare_worktree

if ! sync_publish_dir; then
echo "No dashboard changes to publish."
exit 0
fi

for ((attempt = 1; attempt <= max_attempts; attempt += 1)); do
if git -C "${repo_dir}" push origin "HEAD:${publish_branch}"; then
echo "Dashboard published on attempt ${attempt}."
exit 0
fi

if ((attempt == max_attempts)); then
echo "Dashboard publish failed after ${max_attempts} attempts." >&2
exit 1
fi

echo "Dashboard push attempt ${attempt} failed. Retrying in ${delay_seconds}s." >&2
sleep "${delay_seconds}"

prepare_worktree

if ! sync_publish_dir; then
echo "Dashboard changes already exist in the target repository."
exit 0
fi
done
Loading
Loading