Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate copier #1

Merged
merged 2 commits into from
Sep 15, 2024
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
90 changes: 0 additions & 90 deletions cookiecutter.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// For format details, see https://containers.dev/implementors/json_reference/
{
"name": "{{ cookiecutter.project_name }}",
"name": "{{ project_name }}",
"dockerComposeFile": [
"../docker-compose.local.yml"
],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#==============================================================================
# Brewfile - {{ cookiecutter.project_name }}
# Brewfile - {{ project_name }}
#==============================================================================
# Core
#------------------------------------------------------------------------------
Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions {{ cookiecutter.project_slug }}/LICENSE → cp/LICENSE.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- if cookiecutter.license == "mit" -%}
{%- if license == "mit" -%}
MIT License

Copyright (c) 2024 {{ cookiecutter.data.author_full_name }}
Copyright (c) 2024 {{ author_full_name }}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -21,23 +21,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

{%- elif cookiecutter.license == "private" -%}
{{ cookiecutter.project_name }} License Agreement
{%- elif license == "private" -%}
{{ project_name }} License Agreement

Version 1.0, {{ cookiecutter.data.year }}
Version 1.0, {{ year }}

1. Grant of License

This software and associated documentation files (the “Software”) are licensed, not sold, to you by {{ cookiecutter.organization }} (“Licensor”) for use strictly in accordance with the terms of this License Agreement. Subject to your compliance with the terms of this License, Licensor grants you a limited, non-exclusive, non-transferable, and revocable license to use the Software solely for your personal or internal business purposes.
This software and associated documentation files (the “Software”) are licensed, not sold, to you by {{ organization }} (“Licensor”) for use strictly in accordance with the terms of this License Agreement. Subject to your compliance with the terms of this License, Licensor grants you a limited, non-exclusive, non-transferable, and revocable license to use the Software solely for your personal or internal business purposes.

2. Restrictions

You may not:

Copy, modify, distribute, or create derivative works of the Software.
Sublicense, rent, lease, or lend the Software.
Reverse engineer, decompile, or disassemble the Software, except where such restriction is prohibited by applicable law.
Use the Software for any commercial or public use without explicit written permission from Licensor.
Copy, modify, distribute, or create derivative works of the Software.
Sublicense, rent, lease, or lend the Software.
Reverse engineer, decompile, or disassemble the Software, except where such restriction is prohibited by applicable law.
Use the Software for any commercial or public use without explicit written permission from Licensor.

3. Ownership

Expand All @@ -57,7 +57,7 @@ TO THE EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR SHALL NOT BE LIABLE FOR ANY

7. Governing Law

This License shall be governed by and construed in accordance with the laws of {{ cookiecutter.data.country }}. Any legal action or proceeding arising under this License shall be brought exclusively in the courts located in {{ cookiecutter.data.country }}.
This License shall be governed by and construed in accordance with the laws of {{ country }}. Any legal action or proceeding arising under this License shall be brought exclusively in the courts located in {{ country }}.

8. Entire Agreement

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# {{ cookiecutter.project_name }}
Author: {{ cookiecutter.data.author_full_name }}
# {{ project_name }}
Author: {{ author_full_name }}

## Setup & Installation

Expand Down Expand Up @@ -43,4 +43,4 @@ Alternatively, you can use `just` via the `justfile`
### Building, Deploying, & CI/CD

## Todo
[todo.md](<{{ cookiecutter.project_slug }}/todo.md>)
[todo.md]({{ project_slug }}/todo.md)
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Taskfile for {{ project_name }}
version: "3"
tasks:
boostrap:
Expand Down
188 changes: 188 additions & 0 deletions cp/copier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# questions for Copier new project template
# This file controls the Copier new project utilty.
# Run it with: `copier path/to/template path/to/destination` E.g, `copier harmon-stack .`.

# Potential types: astro, astrowind, nextjs, t3, wdc, sst, python, fastapi, flask, django, dashboard, control panel, go, terraform, pulumi, automattion / pipeline, ansible, kestra, datascience, java

Check failure on line 5 in cp/copier.yml

View workflow job for this annotation

GitHub Actions / validate

yaml[line-length]

Line too long (198 > 160 characters)

# "_copy_without_render": ["*.html", "*.github", "*scriptTemplates"]

project_name:
type: str
default: "Project Name"

project_slug:
type: str
default: "project-slug"
# "{{ project_name.lower().replace(' ', '-') }}"

project_description:
type: str
default: "TODO: project_description"

project_type:
type: str
choices:
- basic
- project
- business
- script
- infrastructure
- docker-compose

project_deployment:
type: str
choices:
- netlify
- vercel
- gcp
- firebase
- supabase
- aws
- do
- azure
- cloudflare
- github_pages
- cloudflare_pages

git_init:
type: bool
default: no

Check failure on line 49 in cp/copier.yml

View workflow job for this annotation

GitHub Actions / validate

yaml[truthy]

Truthy value should be one of \[false, true]

git_provider:
type: str
choices:
- github
- gitlab

include_github_workflows:
type: bool
default: yes

Check failure on line 59 in cp/copier.yml

View workflow job for this annotation

GitHub Actions / validate

yaml[truthy]

Truthy value should be one of \[false, true]

include_github_issue_templates:
type: bool
default: yes

Check failure on line 63 in cp/copier.yml

View workflow job for this annotation

GitHub Actions / validate

yaml[truthy]

Truthy value should be one of \[false, true]

create_github_remote:
type: bool
default: no

Check failure on line 67 in cp/copier.yml

View workflow job for this annotation

GitHub Actions / validate

yaml[truthy]

Truthy value should be one of \[false, true]

ai_tool:
type: str
choices:
- openai
- anthropic
- perplexity
- gemini

include_code_templates:
type: bool
default: yes

include_design_files:
type: bool
default: yes

include_devcontainer:
type: bool
default: no

repo_url:
type: str
default: "https://{{ git_provider }}.com/{{ author_git_provider_username }}/{{ project_slug }}"

project_url:
type: str
default: "TODO: project_url"

organization:
type: str
default: "TODO: organization"

organization_url:
type: str
default: "TODO: organization_url"

organization_email:
type: str
default: "info@{{ organization_url }}"

author_first_name:
type: str
default: Evan

author_last_name:
type: str
default: Harmon

author_full_name:
type: str
default: "Evan Harmon"
# "{{ author_first_name }} + {{ author_last name }}"

author_email:
type: str
default: "[email protected]"

author_url:
type: str
default: "https://evanharmon.com"

author_git_provider_username:
type: str
default: evanharmon1

license:
type: str
choices:
- mit
- private

add_obsidian_project:
type: bool
default: no

run_task_bootstrap:
type: bool
default: no

run_task_install:
type: bool
default: no

docker_hub_username:
type: str
default: evanharmon1

docker_image:
type: str
default: "TODO: docker_image"

projects_directory: ~/git

projects_directory_full: "/Users/{{ author_first_name }}/git"

country: United States

state: Kansas

year: "TODO: year"

datestamp: "TODO: datestamp"

timestamp: "TODO: timestamp"

project_color: "TODO: random_color"

opanapi_key: "TODO: opanapi_key"

anthropic_key: "TODO: anthropic_key"

perplexity_key: "TODO: perplexity_key"

gemini_key: "TODO: gemini_key"

tasks:
- before:
- command: echo "Starting project generation..."
- after:
- command: echo "Project generated successfully."
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Checklist - {{ cookiecutter.project_name }}
# Checklist - {{ project_name }}

- [ ] cd {{ cookiecutter.data.projects_directory }}/{{ cookiecutter.project_slug }}
- [ ] cd {{ projects_directory }}/{{ project_slug }}
- [ ] git init or import template, etc.
- [ ] create initial release - `git tag -a v0.0.1 -m "Initial release version 0.0.1"`
- [ ] Create releast in GitHub (Or gh cli - gh relase create)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Howzit - {{ cookiecutter.project_name }}
# Howzit - {{ project_name }}
[howzit - BrettTerpstra.com](https://brettterpstra.com/projects/howzit/)

## Dev
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example Justfile - {{ cookiecutter.project_name }}
# Example Justfile - {{ project_name }}

alias b := build

Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions cp/requirements.txt.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python requirements for {{ project_name }}

whispers
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Todo - {{ cookiecutter.project_name }}
# Todo - {{ project_name }}
Use with [na by BrettTerpstra.com](https://brettterpstra.com/projects/na/)
Also putting todos inline with VS Code Tree Extesion

Expand Down
2 changes: 2 additions & 0 deletions cp/{{_copier_conf.answers_file}}.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Changes here will be overwritten by Copier
{{ _copier_answers|to_nice_yaml -}}
Loading
Loading