Skip to content

Commit

Permalink
Remove Bootstrap3 (lucyparsons#1123)
Browse files Browse the repository at this point in the history
Migrates off bootstrap3 and into bootstrap5. Thank you @psjalltheway !!!

Removes deprecated files which are causing conflicts for the new
HTML/CSS which will come in a separate PR.

- [x] This branch is up-to-date with the `develop` branch.
- [x] `pytest` passes on my local development environment.
- [x] `pre-commit` passes on my local development environment.

---------

Co-authored-by: psjalltheway <[email protected]>
Co-authored-by: sea-kelp <[email protected]>
  • Loading branch information
3 people committed Sep 9, 2024
1 parent 64885c7 commit 42a360d
Show file tree
Hide file tree
Showing 90 changed files with 18 additions and 11,215 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ backup/**
container_data
.cache
node_modules
OpenOversight/app/static/dist/*
1 change: 0 additions & 1 deletion DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ For more details about the S3 and AWS settings, see above. Please raise an issue
1. `dc run --rm web flask make-admin-user`
1. `dc run --rm web flask add-department "Seattle Police Department" "SPD"`
1. `dc run --rm web flask bulk-add-officers /data/init_data.csv`
1. `dc run --rm web npm run-script build`

# Data ingestion

Expand Down
10 changes: 0 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# node layer to build static assets
FROM node:22 AS nodejs
WORKDIR /usr/src/app/
COPY package.json yarn.lock ./
RUN yarn install
COPY OpenOversight/app/static/ OpenOversight/app/static/
RUN yarn build


FROM python:3.12.5-slim as base
ARG IS_PROD
ENV DEBIAN_FRONTEND noninteractive
Expand Down Expand Up @@ -42,7 +33,6 @@ RUN if [ "$IS_PROD" = "true" ]; then \
# Setup application
COPY create_db.py .
COPY OpenOversight OpenOversight
COPY --from=nodejs /usr/src/app/OpenOversight/app/static/dist/ OpenOversight/app/static/dist/

CMD if [ "$IS_PROD" = "true" ]; then \
gunicorn -w 4 -b 0.0.0.0:3000 OpenOversight.app:app; \
Expand Down
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ build_with_version: create_empty_secret
docker-compose build --build-arg MAKE_PYTHON_VERSION=$(PYTHON_VERSION)

.PHONY: test_with_version
test_with_version: build_with_version assets
ENV=testing docker-compose run --rm web pytest --cov=OpenOversight --cov-report xml:OpenOversight/tests/coverage.xml --doctest-modules -n 4 --dist=loadfile -v OpenOversight/tests/
test_with_version: build_with_version
touch OpenOversight/tests/coverage.xml
docker compose run --rm web-test pytest --cov=OpenOversight --cov-report xml:OpenOversight/tests/coverage.xml --doctest-modules -n 4 --dist=loadfile -v OpenOversight/tests/

.PHONY: start
start: build ## Run containers
Expand All @@ -28,10 +29,6 @@ create_db: start
## Creating database
docker-compose run --rm web python ../create_db.py

.PHONY: assets
assets:
docker-compose run --rm web yarn build

.PHONY: dev
dev: create_empty_secret build start create_db populate

Expand Down Expand Up @@ -61,17 +58,13 @@ test: start ## Run tests
lint:
docker-compose run --no-deps --rm web /bin/bash -c 'flake8; mypy app --config="../mypy.ini"'

.PHONY: clean_assets
clean_assets:
rm -rf ./OpenOversight/app/static/dist/

.PHONY: stop
stop: ## Stop containers
docker-compose stop

.PHONY: clean
clean: clean_assets stop ## Remove containers
docker-compose rm -f
docker compose rm -f

.PHONY: clean_all
clean_all: clean stop ## Wipe database
Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 42a360d

Please sign in to comment.