feat(copy): adds copier template#14
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
24847b6 to
48604b2
Compare
| @@ -0,0 +1,19 @@ | |||
| { | |||
| // Use IntelliSense to learn about possible attributes. | |||
There was a problem hiding this comment.
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(): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 | |||
| description = "Run pyright" | ||
| commands = [ | ||
| [ | ||
| "pyright", |
There was a problem hiding this comment.
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/
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