Skip to content

Commit 9bab262

Browse files
Initialize repository with library placeholder (#1)
* Apply copier templates * Add dummy tutorial
1 parent 09962d3 commit 9bab262

64 files changed

Lines changed: 11834 additions & 840 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.badgery.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
default_branch: master
2+
develop_branch: develop
3+
4+
cards:
5+
- group: Tests
6+
type: gh_action
7+
title: Code/package tests (GitHub)
8+
file: test.yml
9+
enabled: true
10+
- group: Tests
11+
type: gh_action
12+
title: Tutorial tests (GitHub)
13+
file: tutorial-tests.yml
14+
enabled: true
15+
16+
- group: Tests
17+
type: gh_action
18+
title: Package tests (PyPI)
19+
file: pypi-test.yml
20+
enabled: true
21+
22+
- group: Code Quality
23+
type: codefactor
24+
title: Code quality (CodeFactor)
25+
enabled: true
26+
27+
- group: Code Quality
28+
type: radon_mi
29+
title: Maintainability index (radon)
30+
report: reports/{branch}/maintainability-index.json
31+
enabled: true
32+
33+
- group: Code Quality
34+
type: radon_cc
35+
title: Cyclomatic complexity (radon)
36+
report: reports/{branch}/cyclomatic-complexity.json
37+
enabled: true
38+
39+
- group: Size
40+
type: radon_loc
41+
title: Source/Logical lines of code (radon)
42+
report: reports/{branch}/raw-metrics.json
43+
enabled: true
44+
45+
- group: Size
46+
type: radon_ff
47+
title: Functions/Files count (radon)
48+
report: reports/{branch}/cyclomatic-complexity.json
49+
enabled: true
50+
51+
- group: Coverage
52+
type: codecov
53+
title: Unit test coverage (Codecov)
54+
flag: unittests
55+
enabled: true
56+
57+
- group: Coverage
58+
type: interrogate
59+
title: Docstring coverage (interrogate)
60+
report: reports/{branch}/coverage-docstring.txt
61+
enabled: true
62+
- group: Build & Release
63+
type: gh_action
64+
title: Publishing (PyPI)
65+
workflow: pypi-publish.yml
66+
enabled: true
67+
68+
- group: Build & Release
69+
type: gh_action
70+
title: Docs build/deployment
71+
workflow: docs.yml
72+
enabled: true

.copier-answers.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# WARNING: Do not edit this file manually.
2+
# Any changes will be overwritten by Copier.
3+
_commit: v0.4.7
4+
_src_path: gh:easyscience/templates
5+
lib_docs_url: https://easyscience.github.io/utils
6+
lib_doi: 10.5281/zenodo.18163581
7+
lib_package_name: easyutilities
8+
lib_python_max: '3.13'
9+
lib_python_min: '3.11'
10+
lib_repo_name: utils
11+
project_contact_email: support@easyscience.org
12+
project_copyright_years: '2026'
13+
project_extended_description: For sharing utilities, including reusable classes and
14+
functions, to be used across EasyScience modules
15+
project_homepage_url: https://easyscience.github.io/utils
16+
project_name: EasyUtilities
17+
project_repo_name: utils
18+
project_short_description: Reusable utility classes and functions shared across EasyScience
19+
modules
20+
project_shortcut: EUt
21+
project_type: lib
22+
template_type: lib
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 'Download artifact'
2+
description: 'Generic wrapper for actions/download-artifact'
3+
inputs:
4+
name:
5+
description: 'Name of the artifact to download'
6+
required: true
7+
8+
path:
9+
description: 'Destination path'
10+
required: false
11+
default: '.'
12+
13+
pattern:
14+
description: 'Glob pattern to match artifact names (optional)'
15+
required: false
16+
default: ''
17+
18+
merge-multiple:
19+
description: 'Merge multiple artifacts into the same directory'
20+
required: false
21+
default: 'false'
22+
23+
github-token:
24+
description: 'GitHub token for cross-repo download (optional)'
25+
required: false
26+
default: ''
27+
28+
repository:
29+
description: 'owner/repo for cross-repo download (optional)'
30+
required: false
31+
default: ''
32+
33+
run-id:
34+
description: 'Workflow run ID for cross-run download (optional)'
35+
required: false
36+
default: ''
37+
38+
runs:
39+
using: 'composite'
40+
steps:
41+
- name: Download artifact
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: ${{ inputs.name }}
45+
path: ${{ inputs.path }}
46+
pattern: ${{ inputs.pattern }}
47+
merge-multiple: ${{ inputs.merge-multiple }}
48+
github-token: ${{ inputs.github-token }}
49+
repository: ${{ inputs.repository }}
50+
run-id: ${{ inputs.run-id }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'GitHub Script'
2+
description: 'Wrapper for actions/github-script'
3+
inputs:
4+
script:
5+
description: 'JavaScript to run'
6+
required: true
7+
8+
github-token:
9+
description: 'GitHub token (defaults to github.token)'
10+
required: false
11+
default: ${{ github.token }}
12+
13+
runs:
14+
using: 'composite'
15+
steps:
16+
- uses: actions/github-script@v8
17+
with:
18+
script: ${{ inputs.script }}
19+
github-token: ${{ inputs.github-token }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Publish to PyPI'
2+
description: 'Publish dist/ to PyPI via Trusted Publishing (OIDC)'
3+
inputs:
4+
packages_dir:
5+
description: 'Directory containing the built packages to upload'
6+
required: false
7+
default: 'dist'
8+
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- uses: pypa/gh-action-pypi-publish@release/v1
13+
with:
14+
packages-dir: ${{ inputs.packages_dir }}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Setup EasyScience bot for pushing'
2+
description: 'Create GitHub App token and configure git identity + origin remote'
3+
inputs:
4+
app-id:
5+
description: 'GitHub App ID'
6+
required: true
7+
private-key:
8+
description: 'GitHub App private key (PEM)'
9+
required: true
10+
repositories:
11+
description: 'Additional repositories to grant access to (newline-separated)'
12+
required: false
13+
default: ''
14+
15+
outputs:
16+
token:
17+
description: 'Installation access token'
18+
value: ${{ steps.app-token.outputs.token }}
19+
20+
runs:
21+
using: 'composite'
22+
steps:
23+
- name: Create GitHub App installation token
24+
id: app-token
25+
uses: actions/create-github-app-token@v2
26+
with:
27+
app-id: ${{ inputs.app-id }}
28+
private-key: ${{ inputs.private-key }}
29+
repositories: ${{ inputs.repositories }}
30+
31+
- name: Configure git for pushing
32+
shell: bash
33+
run: |
34+
git config user.name "easyscience[bot]"
35+
git config user.email "${{ inputs.app-id }}+easyscience[bot]@users.noreply.github.com"
36+
37+
- name: Configure origin remote to use the bot token
38+
shell: bash
39+
run: |
40+
git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 'Setup Pixi Environment'
2+
description: 'Sets up pixi with common configuration'
3+
inputs:
4+
environments:
5+
description: 'Pixi environments to setup'
6+
required: false
7+
default: 'default'
8+
activate-environment:
9+
description: 'Environment to activate'
10+
required: false
11+
default: 'default'
12+
run-install:
13+
description: 'Whether to run pixi install'
14+
required: false
15+
default: 'true'
16+
locked:
17+
description: 'Whether to run pixi install --locked'
18+
required: false
19+
default: 'false'
20+
frozen:
21+
description: 'Whether to run pixi install --frozen'
22+
required: false
23+
default: 'true'
24+
cache:
25+
description: 'Whether to use cache'
26+
required: false
27+
default: 'false'
28+
post-cleanup:
29+
description: 'Whether to run post cleanup'
30+
required: false
31+
default: 'false'
32+
33+
runs:
34+
using: 'composite'
35+
steps:
36+
- uses: prefix-dev/setup-pixi@v0.9.3
37+
with:
38+
environments: ${{ inputs.environments }}
39+
activate-environment: ${{ inputs.activate-environment }}
40+
run-install: ${{ inputs.run-install }}
41+
locked: ${{ inputs.locked }}
42+
frozen: ${{ inputs.frozen }}
43+
cache: ${{ inputs.cache }}
44+
post-cleanup: ${{ inputs.post-cleanup }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Upload artifact'
2+
description: 'Generic wrapper for actions/upload-artifact'
3+
inputs:
4+
name:
5+
description: 'Artifact name'
6+
required: true
7+
8+
path:
9+
description: 'File(s)/dir(s)/glob(s) to upload (newline-separated)'
10+
required: true
11+
12+
include-hidden-files:
13+
description: 'Include hidden files'
14+
required: false
15+
default: 'true'
16+
17+
if-no-files-found:
18+
description: 'warn | error | ignore'
19+
required: false
20+
default: 'error'
21+
22+
compression-level:
23+
description: '0-9 (0 = no compression)'
24+
required: false
25+
default: '0'
26+
27+
retention-days:
28+
description: 'Retention in days (optional)'
29+
required: false
30+
default: ''
31+
32+
overwrite:
33+
description: 'Overwrite an existing artifact with the same name'
34+
required: false
35+
default: 'false'
36+
37+
runs:
38+
using: 'composite'
39+
steps:
40+
- name: Upload artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: ${{ inputs.name }}
44+
path: ${{ inputs.path }}
45+
include-hidden-files: ${{ inputs.include-hidden-files }}
46+
if-no-files-found: ${{ inputs.if-no-files-found }}
47+
compression-level: ${{ inputs.compression-level }}
48+
retention-days: ${{ inputs.retention-days }}
49+
overwrite: ${{ inputs.overwrite }}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Upload coverage to Codecov'
2+
description: 'Generic wrapper for codecov/codecov-action@v5'
3+
4+
inputs:
5+
name:
6+
description: 'Codecov upload name'
7+
required: true
8+
9+
flags:
10+
description: 'Codecov flags'
11+
required: false
12+
default: ''
13+
14+
files:
15+
description: 'Coverage report files'
16+
required: true
17+
18+
fail_ci_if_error:
19+
description: 'Fail CI if upload fails'
20+
required: false
21+
default: 'true'
22+
23+
verbose:
24+
description: 'Enable verbose output'
25+
required: false
26+
default: 'true'
27+
28+
token:
29+
description: 'Codecov token'
30+
required: true
31+
32+
runs:
33+
using: composite
34+
steps:
35+
- uses: codecov/codecov-action@v5
36+
with:
37+
name: ${{ inputs.name }}
38+
flags: ${{ inputs.flags }}
39+
files: ${{ inputs.files }}
40+
fail_ci_if_error: ${{ inputs.fail_ci_if_error }}
41+
verbose: ${{ inputs.verbose }}
42+
token: ${{ inputs.token }}

0 commit comments

Comments
 (0)