Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
09af310
Update github/super-linter Docker tag to v2.2.2
renovate-bot Oct 3, 2020
94d7e25
Added Makefile and updated README.
toddbirchard Oct 22, 2020
409caf4
Merge.
toddbirchard Oct 22, 2020
c58b10a
Update dependency plotly to v4.12.0
renovate-bot Oct 23, 2020
8eb3601
Update dependency pytest to v6.1.2
renovate-bot Oct 28, 2020
9096cf4
Update dependency python-dotenv to v0.15.0
renovate-bot Oct 28, 2020
1144c40
Update dependency dash-core-components to v1.13.0
renovate-bot Oct 29, 2020
640b66c
Update dependency dash-table to v4.11.0
renovate-bot Oct 29, 2020
9589b6d
Update dependency pandas to v1.1.4
renovate-bot Oct 30, 2020
dac84cd
Merge pull request #61 from toddbirchard/renovate/pandas-1.x
toddbirchard Nov 14, 2020
7640f10
Merge pull request #59 from toddbirchard/renovate/dash-core-component…
toddbirchard Nov 14, 2020
8a636f4
Merge pull request #54 from toddbirchard/renovate/pytest-6.x
toddbirchard Nov 14, 2020
c4b99e7
Merge pull request #55 from toddbirchard/renovate/python-dotenv-0.x
toddbirchard Nov 14, 2020
8c9670f
Merge pull request #53 from toddbirchard/renovate/plotly-4.x
toddbirchard Nov 14, 2020
699b884
Merge pull request #60 from toddbirchard/renovate/dash-table-4.x
toddbirchard Nov 14, 2020
6b4b02e
Update dependency dash-renderer to v1.8.3
renovate-bot Nov 14, 2020
bd3772e
Update dependency dash to v1.17.0
renovate-bot Nov 14, 2020
7b945d7
Merge pull request #58 from toddbirchard/renovate/dash-1.x
toddbirchard Nov 14, 2020
f06ee72
Merge pull request #57 from toddbirchard/renovate/dash-renderer-1.x
toddbirchard Nov 14, 2020
2e90551
Formatting.
toddbirchard Nov 30, 2020
a8d90f8
Merge branch 'master' of https://github.com/toddbirchard/plotlydash-f…
toddbirchard Nov 30, 2020
62542cf
Add datadog tracing.
toddbirchard Dec 8, 2020
de1969c
Update dependency dash-renderer to v1.9.0
renovate-bot Jan 19, 2021
3a1b811
Update dependency dash-core-components to v1.15.0
renovate-bot Jan 19, 2021
c7c6921
Update dependency dash-html-components to v1.1.2
renovate-bot Jan 19, 2021
bfea0a7
Update dependency dash-table to v4.11.2
renovate-bot Jan 19, 2021
1bfd39b
Update dependency ddtrace to ^0.46.0
renovate-bot Jan 27, 2021
9189260
Bump jinja2 from 2.11.2 to 2.11.3
dependabot[bot] Mar 20, 2021
a5416d8
Merge pull request #74 from toddbirchard/renovate/ddtrace-0.x
toddbirchard May 11, 2021
ae0a800
Merge pull request #77 from toddbirchard/renovate/dash-html-component…
toddbirchard May 11, 2021
4d43b73
Merge pull request #81 from toddbirchard/dependabot/pip/jinja2-2.11.3
toddbirchard May 11, 2021
c19bf50
Merge pull request #78 from toddbirchard/renovate/dash-table-4.x
toddbirchard May 11, 2021
b649929
Merge branch 'master' into renovate/dash-renderer-1.x
toddbirchard Jun 3, 2021
fab99bd
Merge pull request #76 from toddbirchard/renovate/dash-renderer-1.x
toddbirchard Jun 3, 2021
7db9d46
Merge branch 'master' into renovate/dash-core-components-1.x
toddbirchard Jun 3, 2021
e178f49
Merge pull request #73 from toddbirchard/renovate/dash-core-component…
toddbirchard Jun 3, 2021
553aab8
Add files via upload
toddbirchard Sep 27, 2021
571b559
[ImgBot] Optimize images
ImgBotApp Sep 27, 2021
d932502
Update README.md
toddbirchard Sep 27, 2021
4031fbb
Merge pull request #50 from toddbirchard/renovate/docker-github-super…
toddbirchard Sep 27, 2021
97d7441
Update dependency uwsgi to v2.0.20
renovate-bot Oct 6, 2021
fe25705
Update dependency ddtrace to ^0.55.0
renovate-bot Oct 21, 2021
fe9e9f9
Update dependency python-dotenv to v0.19.2
renovate-bot Nov 11, 2021
b8bfa8a
Merge pull request #97 from toddbirchard/renovate/uwsgi-2.x
toddbirchard Feb 16, 2022
19683f5
Merge pull request #91 from toddbirchard/renovate/ddtrace-0.x
toddbirchard Feb 16, 2022
1a8810b
Merge pull request #85 from toddbirchard/imgbot
toddbirchard Feb 16, 2022
1be7c83
Merge pull request #92 from toddbirchard/renovate/python-dotenv-0.x
toddbirchard Feb 16, 2022
88e154a
Update dependencies; formatting; spelling errors.
toddbirchard May 29, 2022
dab7f46
Add site metadata.
toddbirchard May 29, 2022
67f6a4b
Upgrade to Python3.10
toddbirchard Sep 8, 2023
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
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FLASK_APP=wsgi.py
FLASK_ENV=development
FLASK_ENV=production
FLASK_DEBUG=False
SECRET_KEY=randomstringofcharacters

LESS_BIN=/usr/local/bin/lessc
COMPRESSOR_DEBUG=False
ASSETS_DEBUG=False
LESS_RUN_IN_DEBUG=False
COMPRESSOR_DEBUG=True
LESS_RUN_IN_DEBUG=False
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
select = E9,F63,F7,F82
exclude = .git,.github,__pycache__,.pytest_cache,.venv,logs,creds
max-line-length = 120
Binary file added .github/dash@2x.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: docker://github/super-linter:v2.2.0
uses: docker://github/super-linter:v2.2.2@sha256:440bc28f423a1c497b2ef72a18b180d92708c0943355e53189cc98605d808bf8
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_ANSIBLE: false
Expand Down
99 changes: 75 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,42 +1,93 @@
SRCPATH := $(CURDIR)
ENTRYPOINT := $(shell find $(SRCPATH) -name '*.ini')
PROJECTNAME := $(shell basename "$PWD")
PROJECT_NAME := $(shell basename $CURDIR)
VIRTUAL_ENV := $(CURDIR)/.venv
LOCAL_PYTHON := $(VIRTUAL_ENV)/bin/python3

define HELP
Manage $(PROJECTNAME).
Manage $(PROJECT_NAME). Usage:

Usage:
make run - Run $(PROJECT_NAME) locally.
make install - Create local virtualenv & install dependencies.
make deploy - Set up project & run locally.
make update - Update dependencies via Poetry and output resulting `requirements.txt`.
make format - Run Python code formatter & sort dependencies.
make lint - Check code formatting with flake8.
make clean - Remove extraneous compiled files, caches, logs, etc.

make run - Run uWSGI server for $(PROJECTNAME).
make restart - Purge cache & reinstall modules.
make update - Update npm production dependencies.
make clean - Remove cached files.
endef
export HELP

.PHONY: run restart update help

.PHONY: run install deploy update format lint clean help

all help:
@echo "$$HELP"

env: $(VIRTUAL_ENV)

$(VIRTUAL_ENV):
if [ ! -d $(VIRTUAL_ENV) ]; then \
echo "Creating Python virtual env in \`${VIRTUAL_ENV}\`"; \
python3 -m venv $(VIRTUAL_ENV); \
fi

.PHONY: run
run:
nohup uwsgi $(ENTRYPOINT) &
run: env
$(LOCAL_PYTHON) -m main

.PHONY: install
install: env
$(LOCAL_PYTHON) -m pip install --upgrade pip setuptools wheel && \
$(LOCAL_PYTHON) -m pip install -r requirements.txt && \
npm i -g less && \
echo Installed dependencies in \`${VIRTUAL_ENV}\`;

.PHONY: restart
restart:
pkill -9 -f $(shell uwsgi $(ENTRYPOINT))
nohup uwsgi $(ENTRYPOINT) &
.PHONY: deploy
deploy:
make install && \
make run

.PHONY: test
test: env
$(LOCAL_PYTHON) -m \
coverage run -m pytest -vv \
--disable-pytest-warnings && \
coverage html --title='Coverage Report' -d .reports && \
open .reports/index.html

.PHONY: update
update:
git pull origin master
pkill -9 -f $(shell uwsgi $(ENTRYPOINT))
poetry shell
poetry update
nohup uwsgi $(ENTRYPOINT) &
update: env
$(LOCAL_PYTHON) -m pip install --upgrade pip setuptools wheel && \
poetry update && \
poetry export -f requirements.txt --output requirements.txt --without-hashes && \
echo Installed dependencies in \`${VIRTUAL_ENV}\`;

.PHONY: format
format: env
$(LOCAL_PYTHON) -m isort --multi-line=3 . && \
$(LOCAL_PYTHON) -m black .

.PHONY: lint
lint: env
$(LOCAL_PYTHON) -m flake8 . --count \
--select=E9,F63,F7,F82 \
--exclude .git,.github,__pycache__,.pytest_cache,.venv,logs,creds,.venv,docs,logs,.reports \
--show-source \
--statistics

.PHONY: clean
clean:
find . -name '*.pyc' -delete
find . -name '__pycache__' -delete
find . -name '.coverage' -delete && \
find . -name '*.pyc' -delete \
find . -name '__pycache__' -delete \
find . -name 'poetry.lock' -delete \
find . -name '*.log' -delete \
find . -name '.DS_Store' -delete \
find . -wholename '**/*.pyc' -delete && \
find . -wholename '**/*.html' -delete && \
find . -type d -wholename '__pycache__' -exec rm -rf {} + && \
find . -type d -wholename '.venv' -exec rm -rf {} + && \
find . -type d -wholename '.pytest_cache' -exec rm -rf {} + && \
find . -type d -wholename '**/.pytest_cache' -exec rm -rf {} + && \
find . -type d -wholename '**/*.log' -exec rm -rf {} + && \
find . -type d -wholename './.reports/*' -exec rm -rf {} + && \
find . -type d -wholename '**/.webassets-cache' -exec rm -rf {} +
22 changes: 0 additions & 22 deletions Pipfile

This file was deleted.

Loading