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

Maintenance 10-2024 #358

Merged
merged 2 commits into from
Oct 25, 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
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.2
3.12
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim as build
FROM python:3.12-slim as build
WORKDIR /app
COPY . .

Expand Down
40 changes: 23 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,55 @@ help: # preview Makefile commands
@awk 'BEGIN { FS = ":.*#"; print "Usage: make <target>\n\nTargets:" } \
/^[-_[:alpha:]]+:.?*#/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)

## Dependency commands
#######################
# Dependency commands
#######################

install: # install Python dependencies and pre-commit hook
install: # Install Python dependencies
pipenv install --dev
pipenv run pre-commit install

update: install # update Python dependencies
update: install # Update Python dependencies
pipenv clean
pipenv update --dev

## Unit Test commands
######################
# Unit test commands
######################

test: # run tests and print a coverage report
test: # Run tests and print a coverage report
pipenv run coverage run --source=tim -m pytest -vv
pipenv run coverage report -m

coveralls: test # write coverage data to an LCOV report
coveralls: test # Write coverage data to an LCOV report
pipenv run coverage lcov -o ./coverage/lcov.info

## Code quality and safety commands
####################################
# Code quality and safety commands
####################################

lint: black mypy ruff safety # run linters
lint: black mypy ruff safety # Run linters

black: # run 'black' linter and print a preview of suggested changes
black: # Run 'black' linter and print a preview of suggested changes
pipenv run black --check --diff .

mypy: # run 'mypy' linter
pipenv run mypy tim
mypy: # Run 'mypy' linter
pipenv run mypy .

ruff: # run 'ruff' linter and print a preview of errors
ruff: # Run 'ruff' linter and print a preview of errors
pipenv run ruff check .

safety: # check for security vulnerabilities and verify Pipfile.lock is up-to-date
safety: # Check for security vulnerabilities and verify Pipfile.lock is up-to-date
pipenv check
pipenv verify

lint-apply: # apply changes with 'black' and resolve fixable errors with 'ruff'
black-apply ruff-apply
lint-apply: # Apply changes with 'black' and resolve 'fixable errors' with 'ruff'
black-apply ruff-apply

black-apply: # apply changes with 'black'
black-apply: # Apply changes with 'black'
pipenv run black .

ruff-apply: # resolve fixable errors with 'ruff'
ruff-apply: # Resolve 'fixable errors' with 'ruff'
pipenv run ruff check --fix .

## Terraform-generated commands for container build and deployment in dev
Expand Down
5 changes: 2 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ coveralls = "*"
freezegun = "*"
mypy = "*"
pre-commit = "*"
pydocstyle = "*"
pytest = "*"
vcrpy = "*"
ruff = "*"
vcrpy = "*"

[requires]
python_version = "3.11"
python_version = "3.12"

[scripts]
tim = "python -c \"from tim.cli import main; main(prog_name='tim')\""
Loading