Skip to content

Latest commit

 

History

History
97 lines (77 loc) · 1.98 KB

File metadata and controls

97 lines (77 loc) · 1.98 KB

Contributing

dependencies

tools used:

first run ...

install project tools

use asdf to ensure required tools are installed ... configured tools are in .tool-versions

cd ~/work/terraform-aws-metrics-lambda
for plugin in $(grep -E '^\w+' .tool-versions | cut -d' ' -f1); do asdf plugin add $plugin; done
asdf install

setup git-secrets

git secrets scanning uses the awslabs https://github.com/awslabs/git-secrets there are options on how to install but

# if the command `git secrets` does not work in your repo
# the git-secrets script needs to be added to somewhere in your PATH
# for example if $HOME/.local/bin is in your PATH environment variable
# then:
wget https://raw.githubusercontent.com/awslabs/git-secrets/refs/heads/master/git-secrets -O ~/.local/bin/git-secrets
chmod +x ~/.local/bin/git-secrets

install pre-commit hooks

pre-commit install

normal development

create virtualenv and install python dependencies

make install
source .venv/bin/activate

running tests

start the docker containers

make up
make test

testing multiple python versions

to test all python versions configured

make tox

linting

project uses:

run both with

make lint

or individually with

make mypy

or

make ruff

formatting code

project uses:

lint checks will fail if the code is not formatted correctly

make black

secrets

the git-secrets script will try and avoid accidental committing of secrets patterns are excluded using .gitdisallowed and allow listed using .gitallowed You can check for secrets / test patterns at any time though with

make check-secrets-all