Skip to content

Commit

Permalink
treehoose-ec2-builder: squash private commits
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jul 17, 2023
0 parents commit 5f5dac3
Show file tree
Hide file tree
Showing 29 changed files with 2,006 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Bug Report
description: Report a bug
title: "bug: short issue description"
labels: [bug, needs-triage]
body:
- type: textarea
id: problem
attributes:
label: What is the problem?
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Reproduction Steps
description: |
Minimal amount of code that causes the bug (if possible) or a reference.
The code sample should be an SSCCE. See http://sscce.org/ for details.
In short, provide a code sample that we can copy/paste, run and reproduce.
validations:
required: true

- type: textarea
id: expected
attributes:
label: What did you expect to happen?
description: |
What were you trying to achieve by performing the steps above?
validations:
required: true

- type: textarea
id: actual
attributes:
label: What actually happened?
description: |
What is the unexpected behavior you were seeing? If you got an error, paste it here.
validations:
required: true

- type: input
id: treehoose-version
attributes:
label: TREEHOOSE version
description: What version of TREEHOOSE are you using?
validations:
required: true

- type: textarea
id: other
attributes:
label: Other information
description: |
e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, slack, etc
validations:
required: false

- type: markdown
attributes:
value: |
---
This is :bug: Bug Report
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Description

---

Declaration : _By submitting this pull request, I confirm that my contribution
is made under the terms of the Apache-2.0 license_
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on:
pull_request:
push:
workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-22.04
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

# ref: https://github.com/pre-commit/action
# Run "pre-commit run --all-files"
- uses: pre-commit/action@v3.0.0
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.swp
package-lock.json
__pycache__
.pytest_cache
.venv
*.egg-info

# CDK asset staging directory
.cdk.staging
cdk.out

.dccache
cdk.context.json
.DS_Store
95 changes: 95 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: debug-statements
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
args: ["--profile", "black"]
verbose: true
- repo: https://github.com/psf/black
rev: 23.1.0 # Replace with any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.7+
verbose: true
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: ['--max-line-length=200', '--ignore=E203', '--max-cognitive-complexity=14', '--max-expression-complexity=9' ]
additional_dependencies: [
flake8-bugbear, # Detect potential bugs
flake8-builtins, # Check for built-ins being used as variables
flake8-cognitive-complexity, # Check max function complexity
flake8-comprehensions, # Suggestions for better list/set/dict comprehensions
flake8-expression-complexity, # Check max expression complexity
flake8-fixme, # Check for FIXME, TODO, and XXX left in comments
flake8-logging-format, # Validate (lack of) logging format strings
flake8-pie, # Misc. linting rules
flake8-pytest-style, # Check against pytest style guide
flake8-return, # Check return statements
flake8-simplify, # Suggestions to simplify code
flake8-use-fstring, # Encourages use of f-strings vs old style
pep8-naming, # Check PEP8 class naming
]
verbose: true
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.1
hooks:
- id: python-safety-dependencies-check
verbose: true
- repo: https://github.com/awslabs/git-secrets
rev: 99d01d58ebcc06e237c0e3f3ff5ae628aeef6aa6
hooks:
- id: git-secrets
verbose: true
entry: 'git-secrets --register-aws'
language: script
name: git-secrets-register-aws-provider
- id: git-secrets
verbose: true
entry: 'git-secrets --scan'
language: script
name: git-secrets-scan
- repo: https://github.com/markdownlint/markdownlint
rev: v0.12.0
hooks:
- id: markdownlint
name: Markdownlint
description: Run markdownlint on your Markdown files
entry: mdl .
language: ruby
files: \.(md|mdown|markdown)$
verbose: true
args:
- "-s"
- "mdl_style.rb"
- repo: https://github.com/PyCQA/bandit
rev: '1.7.5'
hooks:
- id: bandit
entry: bandit
exclude: ^tests/
verbose: true
- repo: https://github.com/aws-cloudformation/cfn-lint
rev: v0.75.1
hooks:
- id: cfn-lint
entry: cfn-lint
files: service-catalog-products/.*(Cfn|cfn)\.(yml|yaml)$
language: python
verbose: true
# ignoring W2506 as SWB fails when this warning is fixed
args:
- "-i"
- "W2506"
Loading

0 comments on commit 5f5dac3

Please sign in to comment.