Skip to content

Commit

Permalink
✨ Add Python tools for managing versions, install pyenv, python 3.12,…
Browse files Browse the repository at this point in the history
… pipx, poetry, pre-commit hooks. Set up .prettierrc, pyproject.toml, and poetry.lock. (#14)

* ✨ Add Python tools for managing versions, install pyenv, python 3.12, pipx, poetry, pre-commit hooks. Set up .prettierrc, pyproject.toml, and poetry.lock.

* ✨ Add yamllint as a new dev dependency 📝
  • Loading branch information
gregkonush authored Apr 5, 2024
1 parent bf6b933 commit 9add2b2
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.88.4
hooks:
- id: terraform_fmt
- id: terraform_docs
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
args: [--strict, -c=.yamllint]
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": false,
"printWidth": 140,
"trailingComma": "all"
}
34 changes: 34 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
yaml-files:
- "*.yaml"
- "*.yml"
- ".yamllint"

rules:
anchors: enable
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end: disable
document-start:
level: warning
empty-lines: enable
empty-values: disable
float-values: disable
hyphens: enable
indentation: enable
key-duplicates: enable
key-ordering: disable
line-length: enable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,32 @@ Give user proper permissions
grant create on database altra to altra;
```

### Python tools

Install pyenv to manage python versions

```bash
brew install pyenv
```

Install python 3.12

```bash
pyenv install 3.12
```

Install pipx

```bash
brew install pipx
```

Install with poetry for package management with pipx

```bash
pipx install poetry
```

#### Devtools

Autocomplete
Expand All @@ -96,3 +122,9 @@ Github
```bash
brew install gh
```

Install pre-commit hooks

```bash
pre-commit install
```
Loading

0 comments on commit 9add2b2

Please sign in to comment.