Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ITProKyle committed Mar 4, 2024
1 parent 4c43ece commit e7523b7
Show file tree
Hide file tree
Showing 26 changed files with 333 additions and 820 deletions.
18 changes: 11 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
default_language_version:
node: system

exclude: |
(?x)^(
(.*/)?package-lock\.json|
(.*/)?poetry\.lock
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand All @@ -15,9 +24,9 @@ repos:
)$
- id: pretty-format-json
args: [--autofix, --indent, '4']
files: |
exclude: |
(?x)^(
\.vscode/.*\.json|
(.*)?(cdk|package|tsconfig|tslint).json
)$
- id: pretty-format-json
args: [--autofix, --indent, '2']
Expand All @@ -32,10 +41,6 @@ repos:
rev: v0.23.1
hooks:
- id: toml-sort-fix
exclude: |
(?x)^(
(.*/)?poetry\.lock
)$
- repo: https://github.com/ITProKyle/pre-commit-hook-yamlfmt
rev: v0.2.1
hooks:
Expand All @@ -53,4 +58,3 @@ repos:
rev: v0.38.0
hooks:
- id: markdownlint
language_version: lts
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ setup-poetry: ## setup python virtual environment
@if [[ -d .venv ]]; then \
poetry run python -m pip --version >/dev/null 2>&1 || rm -rf ./.venv/* ./.venv/.*; \
fi
@poetry check --lock
@poetry check
@poetry install $(POETRY_OPTS) --sync

setup-pre-commit: ## install pre-commit git hooks
Expand All @@ -99,5 +99,5 @@ test: ## run integration and unit tests
@poetry run pytest $(PYTEST_REPORT_OPTS) \
--cov f_lib \
--cov-report term-missing:skip-covered \
--dist loadfile \
--numprocesses auto
--dist worksteal \
--numprocesses logical
13 changes: 1 addition & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
# Docs

## Local Testing

Run `make html` (`.\make.bat html` on Windows) to generate the HTML pages
The generated webpages can then be viewed using a web browser

## RTD Dependencies

Python packages for local testing are handled by the Pipfile/Pipfile.lock files.

These are used to generate the requirements.txt used by RTD: `pipenv lock --requirements > requirements.txt`
# docs
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

import os
from datetime import date
from pathlib import Path
Expand All @@ -13,7 +14,6 @@
DOC_SRC = ROOT_DIR / "docs" / "source"

# -- Project information -----------------------------------------------------

project = "f-lib"
copyright = f"{date.today().year}, Kyle Finley" # noqa: A001, DTZ011
author = "Kyle Finley"
Expand Down
3 changes: 2 additions & 1 deletion f_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Import modules."""
"""Finley library."""

from importlib.metadata import PackageNotFoundError, version

from . import aws, constants, mixins, utils
Expand Down
1 change: 1 addition & 0 deletions f_lib/_environment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Environment object class."""

import json
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions f_lib/_os_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Operating system information."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions f_lib/_system_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""System information."""

from __future__ import annotations

import platform
Expand Down
1 change: 1 addition & 0 deletions f_lib/aws/aws_lambda/type_defs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type definitions for AWS Lambda."""

from typing import Any, TypedDict

LambdaDict = dict[str, Any]
Expand Down
1 change: 1 addition & 0 deletions f_lib/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants."""

import re

ANSI_ESCAPE_PATTERN = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])")
Expand Down
1 change: 1 addition & 0 deletions f_lib/mixins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Class mixins."""

from ._cli_interface import CliInterfaceMixin
from ._del_cached_prop import DelCachedPropMixin

Expand Down
23 changes: 7 additions & 16 deletions f_lib/mixins/_cli_interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""CLI interface mixin."""

from __future__ import annotations

import logging
Expand Down Expand Up @@ -55,11 +56,7 @@ def generate_command(
"""
cmd = [
cls.EXECUTABLE,
*(
__command
if isinstance(__command, list)
else ([__command] if __command else [])
),
*(__command if isinstance(__command, list) else ([__command] if __command else [])),
]
cmd.extend(convert_kwargs_to_shell_list(**kwargs))
LOGGER.debug("generated command: %s", convert_list_to_shell_str(cmd))
Expand All @@ -72,8 +69,7 @@ def _run_command(
*,
capture_output: Literal[True],
env: dict[str, str] | None = ...,
) -> str:
...
) -> str: ...

@overload
def _run_command(
Expand All @@ -83,8 +79,7 @@ def _run_command(
capture_output: bool = ...,
env: dict[str, str] | None = ...,
suppress_output: Literal[True] = ...,
) -> str:
...
) -> str: ...

@overload
def _run_command(
Expand All @@ -93,8 +88,7 @@ def _run_command(
*,
env: dict[str, str] | None = ...,
suppress_output: Literal[False],
) -> None:
...
) -> None: ...

@overload
def _run_command(
Expand All @@ -104,8 +98,7 @@ def _run_command(
capture_output: bool = ...,
env: dict[str, str] | None = ...,
suppress_output: bool = ...,
) -> str | None:
...
) -> str | None: ...

def _run_command(
self,
Expand All @@ -129,9 +122,7 @@ def _run_command(
returned as a string instead of being being written directly.
"""
cmd_str = (
command if isinstance(command, str) else convert_list_to_shell_str(command)
)
cmd_str = command if isinstance(command, str) else convert_list_to_shell_str(command)
LOGGER.debug("running command: %s", cmd_str)
if suppress_output:
return subprocess.check_output(
Expand Down
1 change: 1 addition & 0 deletions f_lib/mixins/_del_cached_prop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Delete cached property mixin."""

from __future__ import annotations

from contextlib import suppress
Expand Down
1 change: 1 addition & 0 deletions f_lib/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities."""

from __future__ import annotations

import platform
Expand Down
Loading

0 comments on commit e7523b7

Please sign in to comment.