Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

charwking/gift-exchange-app

Repository files navigation

gift-exchange-app

Development

  1. Install pipenv
  2. Install dependencies: pipenv install --dev
  3. Install the pre-commit hooks: pipenv run pre-commit install
  4. Install MySQL 8+
  5. Login to MySQL and run the one-time setup for local dev: source db_setup_local.sql
  6. Login to MySQL and run the one-time setup for testing: source db_setup_test.sql
  7. Run tests: bin/test.sh
  8. Run app: bin/local.sh

Decision Log

Short notes on decisions that were made so they can be discussed or revisted later. I expect some themes to emerge: simple, well-documented, low learning curve.

Tech

  • Selected pipenv to manage dependencies and virtual environments. It popped up in search results, was similar to tools I've used before (npm, bundler), and was easy to get started with.
  • Selected CherryPy because it's been around awhile, has lots of documentation, was easy to get running, and my webhost WebFaction (affiliate link) had an auto-installer for it.
  • Selected pytest as test framework because CherryPy already has a built-in test helper that uses it.
  • Selected black as a code auto-formatter because it's easy and avoids excessive time spent worrying about formatting and formatting rules.
  • Selected Jinja2 as a template engine since it seems to be the most popular.
  • Selected MySQL because it's still the most popular DB and my webhost supports it.
  • Selected SQLAlchemy because it's popular and cwkingjr did some initial investigation ("loosened it")

Infrastructure

  • There's probably a "more correct" mechanism for managing environment variables, but stuffing them in shell scripts makes them explicit and easy to manage.

Testing

  • I decided to skip testing that the html rendered by a template exactly matched what I expected. This seemed excessive for now. I might revisit it later. If I do, I may aim for image-comparison tests.

References

https://github.com/psf/black/tree/stable https://pre-commit.com/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published