Skip to content
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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cspell: disable
# Image for a Python 3 development environment
FROM python:3.11-slim
FROM python:3.12-slim

# Add any tools that are needed beyond Python 3.11
RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
- redis

redis:
image: redis:6-alpine
image: redis:8-alpine
ports:
- 6379
volumes:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
container: python:3.11-slim
container: python:3.12-slim

# Required services
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis:6-alpine
image: redis:8-alpine
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
Expand Down
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
FROM python:3.12-slim

# Establish a working folder
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ venv: ## Create a Python virtual environment
.PHONY: install
install: ## Install dependencies
$(info Installing dependencies...)
PIPENV_VENV_IN_PROJECT=1 pipenv install
PIPENV_VENV_IN_PROJECT=1 pipenv install --dev

.PHONY: lint
lint: ## Run the linter
Expand Down
32 changes: 19 additions & 13 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,30 @@ verify_ssl = true
name = "pypi"

[packages]
flask = "==3.1.0"
retry2 = "==0.9.5"
python-dotenv = "==1.0.1"
gunicorn = "==23.0.0"
redis = "==5.2.1"
flask = "==3.1.2"
# redis = "==5.2.1"
redis = "==7.2.0"
flask-redis = "==0.4.0"
retry2 = "==0.9.5"
python-dotenv = "~=1.2.1"
gunicorn = "~=25.0.0"

[dev-packages]
honcho = "~=2.0.0"
pylint = "~=3.3.4"
flake8 = "~=7.1.1"
black = "~=25.1.0"
pytest = "~=8.3.4"
# Code Quality
pylint = "~=4.0.4"
flake8 = "~=7.3.0"
black = "~=26.1.0"

# Test-Driven Development
pytest = "~=9.0.2"
pytest-pspec = "~=0.0.4"
pytest-cov = "~=6.0.0"
pytest-cov = "~=7.0.0"
factory-boy = "~=3.3.3"
coverage = "~=7.6.12"
coverage = "~=7.13.2"

# Utility
honcho = "~=2.0.0"
httpie = "~=3.2.4"

[requires]
python_version = "3.11"
python_version = "3.12"
1,155 changes: 673 additions & 482 deletions Pipfile.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ If it does not automatically prompt you to open the project in a container, you
This option is not recommended because developing natively on your local computer does ensure that the code will work on anyone elses computer or in production. I strongly recommend that you Docker with Visual Studio Code to create a reproducible development environment, but if you cannot for some reason, and have Python 3 installed on your computer, you can make a Python virtual environment and run the code locally with:

```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip3 install pipenv
pipenv shell
pipenv install -dev
```

You will also need Docker on your computer to run a container for the database.

```bash
docker run -d --name redis -p 6379:6379 -v redis:/data redis:alpine
docker run -d --name redis -p 6379:6379 -v redis:/data redis:8-alpine
```

This will run Redis on Alpine and have it forward port `6379` so that your application and communicate with it.
This will run Redis 8 on Alpine and have it forward port `6379` so that your application and communicate with it.

You can now run `make test` to run the TDD tests locally.

Expand All @@ -66,13 +66,13 @@ honcho start

## Manually running the Tests

Run the tests using `green` and `coverage`
Run the tests using `pytest` and `coverage`

```bash
make test
```

Green is configured to automatically include the flags so that red-green-refactor is meaningful. If you are in a command shell that supports colors, passing tests will be green while failing tests will be red.
Pytest is configured to automatically include the flags so that red-green-refactor is meaningful. If you are in a command shell that supports colors, passing tests will be green while failing tests will be red.

## What's featured in the project?

Expand All @@ -86,7 +86,7 @@ Green is configured to automatically include the flags so that red-green-refacto

## License

Copyright (c) 2021, 2023 John Rofrano. All rights reserved.
Copyright (c) 2021, 2026 John Rofrano. All rights reserved.

Licensed under the Apache License. See [LICENSE](LICENSE)

Expand Down