Skip to content

Commit

Permalink
setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
ITProKyle committed Sep 6, 2024
1 parent 980015d commit de9c434
Show file tree
Hide file tree
Showing 20 changed files with 2,163 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] report'
labels: ''
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
1. Click on '....'
1. Scroll down to '....'
1. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: \[e.g. iOS\]
- Version \[e.g. 22\]

**Additional context**
Add any other context about the problem here. Please provide links to code samples where applicable.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[REQUEST] feature'
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when \[...\]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/general-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: General Question
about: General question about the project, usage, design, etc.
title: '[QUESTION]'
labels: ''
assignees: ''
---

**Question**
Your question here.

**Context**
Any additional context around the question such a link to a project where it's being implemented.
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/generic-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Generic Pull Request
about: Template for most pull requests.
title: ''
labels: ''
assignees: ''
---

### Checklist

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

- [ ] Have you followed the guidelines in our Contributing document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](../../../pulls) for the same update/change?
- [ ] Does your submission pass tests?
- [ ] Have you lint your code locally prior to submission?
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your core changes, as applicable?
- [ ] Have you successfully ran tests with your changes locally?
- [ ] Have you updated documentation, as applicable?

### Why this is needed

<!-- Explain why this change is needed. -->

### Screenshots

<!-- Please include screenshots of any new features to show how it works. -->
62 changes: 62 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# https://github.com/release-drafter/release-drafter
autolabeler:
- label: bug
branch: [/^(bug|bugfix|fix|hotfix)\/.*/]
- label: changelog:skip
branch: [/^(dependabot)\/.*/, /^pre-commit-ci-update-config/, /^renovate\/.*lockfile/]
- label: dependencies
branch: [/^(deps|dependabot|renovate)\/.*/, /^pre-commit-ci-update-config/]
- label: documentation
branch: [/^(docs)\/.*/]
- label: feature
branch: [/^(enhancement|feat|feature)\/.*/]
- label: maintenance
branch: [/^(chore|maint|maintain|maintenance)\/.*/, /^pre-commit-ci-update-config/]
- label: changelog:patch
branch: [/^(bug|bugfix|fix|hotfix)\/.*/]
- label: release
branch: [/^(release)\/.*/]
categories:
- title: 🚀 Features
labels:
- feature
- enhancement
- title: 🐛 Bug Fixes
labels:
- bug
- title: 🧶 Dependencies
labels:
- dependencies
- title: 📖 Doc Updates
labels:
- documentation
- title: 🧰 Maintenance
label: maintenance
category-template: >-
### $TITLE
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
commitish: master # cspell:ignore commitish
exclude-contributors:
- dependabot
- renovate
exclude-labels:
- changelog:skip
- release
name-template: v$RESOLVED_VERSION
sort-direction: ascending
tag-template: v$RESOLVED_VERSION
template: |
## What Changed
$CHANGES
version-resolver:
major:
labels:
- changelog:major
minor:
labels:
- changelog:minor
patch:
labels:
- changelog:patch
default: patch
9 changes: 9 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>finleyfamily/renovate"
],
"reviewers": [
"ITProKyle"
]
}
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
pull_request: # any pull request
push:
branches:
- master

defaults:
run:
shell: bash

jobs:
spellcheck:
uses: finleyfamily/workflows/.github/workflows/spellcheck.yml@master
11 changes: 11 additions & 0 deletions .github/workflows/pull_request_target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: pull_request_target

on:
pull_request_target:

jobs:
workflows:
permissions:
contents: write
pull-requests: write
uses: finleyfamily/workflows/.github/workflows/pull_request_target.yml@master
5 changes: 5 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
default: true
MD012: false # no-multiple-blanks: Multiple consecutive blank lines
MD013: false # line-length
MD014: false # commands-show-output: Dollar signs used before commands without showing output
MD024: false # no-duplicate-heading/no-duplicate-header
60 changes: 60 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
default_language_version:
node: system

exclude: |
(?x)^(
(.*/)?package-lock\.json|
(.*/)?poetry\.lock
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: file-contents-sorter
args: [--unique]
files: |
(?x)^(
\.dockerignore|
\.gitignore
)$
- id: pretty-format-json
args: [--autofix, --indent, '4']
exclude: |
(?x)^(
(.*)?(cdk|package|tsconfig|tslint)\.json
)$
- id: pretty-format-json
args: [--autofix, --indent, '2']
files: |
(?x)^(
(.*)?(cdk|package|tsconfig|tslint)\.json
)$
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
- repo: https://github.com/ITProKyle/pre-commit-hook-yamlfmt
rev: v0.3.0
hooks:
- id: yamlfmt
args: [--mapping, '2', --offset, '2', --sequence, '4']
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
additional_dependencies:
- mdformat-frontmatter
- mdformat-gfm
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
9 changes: 9 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"allowCompoundWords": true,
"import": [
"@itprokyle/cspell-dict/cspell-ext.json"
],
"maxNumberOfProblems": 100,
"version": "0.2",
"words": []
}
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"DavidAnson.vscode-markdownlint",
"editorconfig.editorconfig",
"lextudio.restructuredtext",
"ms-python.python",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.enabled": true,
"docker.languageserver.formatter.ignoreMultilineInstructions": true,
"files.insertFinalNewline": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2024 Kyle Finley

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.PHONY: brewfile docs

CI := $(if $(CI),yes,no)
SHELL := /bin/bash

ifeq ($(CI), yes)
POETRY_OPTS = "-v"
PRE_COMMIT_OPTS = --show-diff-on-failure --verbose
endif

help: ## show this message
@awk \
'BEGIN {FS = ":.*##"; printf "\nUsage: make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-30s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) }' \
$(MAKEFILE_LIST)

fix: run-pre-commit ## run all automatic fixes

fix-md: ## automatically fix markdown format errors
@poetry run pre-commit run mdformat --all-files

lint: ## run all linters
@echo "no linters configured for this project"

run-pre-commit: ## run pre-commit for all files
@poetry run pre-commit run $(PRE_COMMIT_OPTS) \
--all-files \
--color always

setup: setup-poetry setup-pre-commit setup-npm ## setup dev environment

setup-npm: ## install node dependencies with npm
@npm ci

setup-poetry: ## setup python virtual environment
@poetry check
@poetry install $(POETRY_OPTS) --no-root --sync

setup-pre-commit: ## install pre-commit git hooks
@poetry run pre-commit install

spellcheck: ## run cspell
@echo "Running cSpell to checking spelling..."
@npm exec --no -- cspell lint . \
--color \
--config .vscode/cspell.json \
--dot \
--gitignore \
--must-find-files \
--no-progress \
--relative \
--show-context

test: ## run all test
@echo "no tests configured for this project"
Loading

0 comments on commit de9c434

Please sign in to comment.