Skip to content

feat(copy): adds copier template#14

Merged
Matt-Carre merged 2 commits into
mainfrom
copier-ci
Jul 16, 2026
Merged

feat(copy): adds copier template#14
Matt-Carre merged 2 commits into
mainfrom
copier-ci

Conversation

@Matt-Carre

@Matt-Carre Matt-Carre commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Adds a copier template.

Requires you to:
make a new directory
open new_directory_path
git init in that directory
git remote add origin {origin ssh}
git branch -M main

cd ..
then either:

git clone this repo
copier copy {this_repo's_path} {new_directory_path}
or:
copier copy git@github.com:DiamondLightSource/python-copier-template.git {new directory path}
rebuild in dev container without cache

This will automatically add any additional templates made upon pre-commit via makecopiercorrect.sh

Furthermore, I've added a #type:ignore in the copier init.py portion because pydantic was complaining.

Also - a lot of the changed files here are me copying over files from e.g. the .github folder, so are probably not worth looking at when you guys come to review it just so you're aware :) - because 3198 lines is a LOT

my copied version is here:
https://github.com/Matt-Carre/copy-test

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b0bb15c) to head (babf18d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #14   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           22        22           
=========================================
  Hits            22        22           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Matt-Carre
Matt-Carre requested a review from davehadley July 16, 2026 10:35
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments are not valid json

don't know if it's a problem in vscode config though, might be fine

clst_tmpt = False
else:
clst_tmpt = False
if "metadata" in yamldata.keys():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment for the future, not this PR: I may not be following but this seems to reproducing some of the workflows-cli linting?

If so, I think that we could be building a potential future footgun if we two different sets of linting rules in two different places.

import requests


def _get_token(dev: bool) -> None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made comments on the other PR regarding auth so won't repeat them here but I assume they apply to both.

I suggest to get whatever you have merged now and consolidate after we've resolved the auth questions raised in the other PR

@@ -0,0 +1,61 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no type checker?

description = "Run pyright"
commands = [
[
"pyright",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just my 2 cents: you are already using ruff and uv, why co with pyright and not stick with the astral ecosystem can go with ty https://docs.astral.sh/ty/

@Matt-Carre
Matt-Carre merged commit ae0adae into main Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants