Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github and repo tooling updates. #36

Merged
merged 6 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Check warning on line 9 in custom_components/aerogarden/config_flow.py

View check run for this annotation

Codecov / codecov/patch

custom_components/aerogarden/config_flow.py#L9

Added line #L9 was not covered by tests

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
Loading