Skip to content

Commit

Permalink
Merge pull request #338 from backplane/rds-storage-info
Browse files Browse the repository at this point in the history
add support for RDS storage reporting; misc improvements
  • Loading branch information
actualben authored Nov 23, 2023
2 parents 89dcc6c + 2e31dfc commit eecc58f
Show file tree
Hide file tree
Showing 9 changed files with 480 additions and 228 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# workflow which lints and checks the code on every push and pull request
name: Check
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- name: checkout
uses: actions/checkout@v4

# https://github.com/actions/setup-python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies

- name: Install Deps
run: pip install -r requirements.txt -r requirements.dev.txt

# https://github.com/pre-commit/action
- name: run pre-commit
uses: pre-commit/[email protected]
env:
SKIP: no-commit-to-branch
14 changes: 7 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image Builds
name: Docker
on:
push:
branches: [main]
Expand All @@ -20,23 +20,23 @@ jobs:
steps:
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

# https://github.com/docker/login-action
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

# https://github.com/docker/login-action
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -45,7 +45,7 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
docker.io/${{ github.repository }}
Expand All @@ -58,7 +58,7 @@ jobs:
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/yamllint.yml

This file was deleted.

105 changes: 105 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: mixed-line-ending
args:
- --fix=lf
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: detect-private-key
- id: no-commit-to-branch
args:
- --branch
- main

- repo: https://github.com/rhysd/actionlint
rev: v1.6.26
hooks:
- id: actionlint-docker
name: check github workflows with actionlint

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck

- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args:
- "--profile"
- "black"
- "--filter-files"

- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args:
- "--max-line-length=88"
- "--extend-ignore=E203,E501"

# - repo: https://github.com/pycqa/pylint
# rev: "v3.0.1"
# hooks:
# - id: pylint

# https://pylint.pycqa.org/en/latest/user_guide/installation/pre-commit-integration.html
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
# additional_dependencies:
# - types-requests

# - repo: https://github.com/jendrikseipp/vulture
# rev: v2.7
# hooks:
# - id: vulture

- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.2
hooks:
- id: python-safety-dependencies-check
files: "requirements.txt"

# - repo: local
# hooks:
# - id: pytest-check
# name: pytest-check
# entry: pytest
# language: system
# pass_filenames: false
# always_run: true
10 changes: 10 additions & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bandit~=1.7.5
black~=23.11.0
boto3-stubs~=1.29.6
bpython~=0.24
flake8~=6.1.0
isort~=5.12.0
mypy~=1.7.0
pycodestyle~=2.11.1
pylint~=3.0.2
pytest~=7.4.3
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
boto3~=1.28.16
boto3~=1.29.6
Loading

0 comments on commit eecc58f

Please sign in to comment.