Skip to content

Commit

Permalink
Github and repo tooling updates. (#36)
Browse files Browse the repository at this point in the history
* dependabot-config

* update devops and repo tools

* save dependabot config

* more fixes

* remove unused flake8 config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jacobdonenfeld and pre-commit-ci[bot] authored Jul 1, 2024
1 parent cead925 commit 8188ab6
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 10 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

5 changes: 5 additions & 0 deletions .github/CODEOWNERS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# They will be requested for review when someone
# opens a pull request.
* @jacobdonenfeld
Empty file added .github/FUNDING.yml
Empty file.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 10
3 changes: 2 additions & 1 deletion .github/workflows/hacs-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: validate
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

Expand All @@ -12,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@@v3
- name: validation
uses: home-assistant/actions/hassfest@master

Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
#- id: check-yaml # disabled atm due to https://github.com/pre-commit/pre-commit-hooks/issues/577
- id: check-json
- id: end-of-file-fixer
- id: check-case-conflict
- id: trailing-whitespace
- id: detect-private-key
- id: fix-byte-order-marker
- id: mixed-line-ending
args: ["--fix=lf"]

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/aerogarden/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import logging
from typing import Any, Dict, Optional

import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import ConfigEntryNotReady
import voluptuous as vol

from .api import AerogardenAPI
from .const import DEFAULT_HOST, DOMAIN
Expand Down
13 changes: 13 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[isort]
force_sort_within_sections=True
profile=black

[flake8]
ignore = E203, E266, W503
max-line-length = 110
max-complexity = 18
select = B,C,E,F,W,T4,B9

[tool:pytest]
testpaths = tests
asyncio_mode = auto
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest.mock import MagicMock, patch

import pytest
from homeassistant.core import HomeAssistant
import pytest

from custom_components.aerogarden.api import AerogardenAPI

Expand Down
2 changes: 1 addition & 1 deletion tests/test_config_flow.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from dataclasses import dataclass
from unittest.mock import MagicMock, patch

import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
import pytest

from custom_components.aerogarden.const import DOMAIN

Expand Down

0 comments on commit 8188ab6

Please sign in to comment.