From dc22a87ad464a2c98cbcb2545c8af59ca79dcc80 Mon Sep 17 00:00:00 2001 From: Ballard Date: Mon, 12 Feb 2024 16:03:58 -0500 Subject: [PATCH] chore: delete bc_obps dir (replaced by server dir) --- .github/actions/dev-env-setup/action.yml | 2 +- bc_obps/.tool-versions | 3 - bc_obps/Makefile | 79 ------------------------ bc_obps/pyproject.toml | 60 ------------------ 4 files changed, 1 insertion(+), 143 deletions(-) delete mode 100644 bc_obps/.tool-versions delete mode 100644 bc_obps/Makefile delete mode 100644 bc_obps/pyproject.toml diff --git a/.github/actions/dev-env-setup/action.yml b/.github/actions/dev-env-setup/action.yml index 03c7a52d4..208bf077d 100644 --- a/.github/actions/dev-env-setup/action.yml +++ b/.github/actions/dev-env-setup/action.yml @@ -18,7 +18,7 @@ runs: path: | ~/.asdf ./server/.tool-versions - key: ${{ runner.os }}-asdf-cache-backend-${{ hashFiles('bc_obps/.tool-versions') }} + key: ${{ runner.os }}-asdf-cache-backend-${{ hashFiles('server/.tool-versions') }} - uses: actions/cache@v3 id: yarn-cache with: diff --git a/bc_obps/.tool-versions b/bc_obps/.tool-versions deleted file mode 100644 index acc80e251..000000000 --- a/bc_obps/.tool-versions +++ /dev/null @@ -1,3 +0,0 @@ -python 3.9.16 -poetry 1.6.1 -postgres 14.0 diff --git a/bc_obps/Makefile b/bc_obps/Makefile deleted file mode 100644 index b4e0d34d3..000000000 --- a/bc_obps/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -SHELL := /usr/bin/env bash -PSQL=psql -h localhost -DB_NAME=reporting -MANAGE_PY = manage.py - -help: ## Show this help. - @sed -ne '/@sed/!s/## //p' $(MAKEFILE_LIST) - -.PHONY: install_backend_asdf_tools -install_backend_asdf_tools: ## install languages runtimes and tools specified in .tool-versions of the backend -install_backend_asdf_tools: - @echo "Installing backend asdf tools" - @cat .tool-versions | cut -f 1 -d ' ' | xargs -n 1 asdf plugin-add || true - @asdf plugin-update --all - @#MAKELEVEL=0 is required because of https://www.postgresql.org/message-id/1118.1538056039%40sss.pgh.pa.us - @MAKELEVEL=0 POSTGRES_EXTRA_CONFIGURE_OPTIONS='--with-libxml' asdf install - @asdf reshim - @echo "Done installing backend asdf tools" - -.PHONY: install_poetry -install_poetry: ## install poetry (MacOS/Linux only) -install_poetry: ## poetry shell starts a new shell with the virtual environment activated - @echo "Installing poetry" - @curl -sSL https://install.python-poetry.org | python3 - - @poetry shell - -.PHONY: install_dev_tools -install_dev_tools: ## install development tools -install_dev_tools: stop_pg install_backend_asdf_tools install_poetry start_pg - -.PHONY: install_poetry_deps -install_poetry_deps: ## install poetry dependencies -install_poetry_deps: - @echo "Installing poetry dependencies" - @poetry install - -.PHONY: start_pg -start_pg: ## start the database server if it is not running -start_pg: - @pg_ctl status || pg_ctl start - -.PHONY: stop_pg -stop_pg: ## stop the database server. Always exits with 0 -stop_pg: - @pg_ctl stop; true - -.PHONY: create_db -create_db: ## Ensure that the $(DB_NAME) database exists -create_db: - @$(PSQL) -d postgres -tc "SELECT count(*) FROM pg_database WHERE datname = '$(DB_NAME)'" | \ - grep -q 1 || \ - $(PSQL) -d postgres -c "CREATE DATABASE $(DB_NAME)"; - -.PHONY: drop_db -drop_db: ## Drop the $(DB_NAME) database if it exists -drop_db: - @$(PSQL) -d postgres -tc "SELECT count(*) FROM pg_database WHERE datname = '$(DB_NAME)'" | \ - grep -q 0 || \ - $(PSQL) -d postgres -c "DROP DATABASE $(DB_NAME)"; - -.PHONY: run -run: ## run the server -run: - @poetry run python $(MANAGE_PY) runserver - -.PHONY: migrate -migrate: ## run the migrations -migrate: - @poetry run python $(MANAGE_PY) migrate - -.PHONY: migrations -migrations: ## create the migrations -migrations: - @poetry run python $(MANAGE_PY) makemigrations - -.PHONY: superuser -superuser: ## create a superuser -superuser: - @poetry run python $(MANAGE_PY) createsuperuser diff --git a/bc_obps/pyproject.toml b/bc_obps/pyproject.toml deleted file mode 100644 index d5867589a..000000000 --- a/bc_obps/pyproject.toml +++ /dev/null @@ -1,60 +0,0 @@ -[tool.poetry] -name = "registration" -version = "0.1.0" -description = "" -authors = ["Andrea Williams "] - -[tool.poetry.dependencies] -python = "^3.9" -Django = "^4.2.7" -python-dotenv = "^1.0.0" -django-ninja = "^0.22.2" -psycopg = "^3.1.10" -psycopg-binary = "^3.1.10" -django-phonenumber-field = "^7.1.0" -django-phonenumbers = "^1.0.1" -django-storages = {extras = ["google"], version = "^1.14"} -whitenoise = "^6.5.0" -pre-commit = "^3.4.0" -django-cors-headers = "4.2.0" -django-localflavor = "^4.0" -pytz = "^2023.3.post1" -django-simple-history = "^3.4" -gunicorn = "^21.2.0" -sentry-sdk = {extras = ["django"], version = "^1.39.2"} - -[tool.poetry.group.dev.dependencies] -black = "^23.7.0" -pytest = "^5.2" -pylint = "^2.17.5" -pytest-django = "^4.5.2" -pytest-watch = "^4.2.0" -pytest-testmon = "^2.0.13" -pytest-picked = "^0.5.0" -model-bakery = "^1.16.0" -django-extensions = "^3.2.3" -ipdb = "^0.13.13" -pytest-cov = "^4.1.0" -django-diagram = "^0.0.1" - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - -[tool.black] -line-length = 120 -skip-string-normalization = true -exclude = ''' - /( - \.git # exclude the ".git" directory - | \.hg # exclude the ".hg" directory - | \.mypy_cache # exclude the ".mypy_cache" directory - | \.tox # exclude the "tox" virtualenv directory - | \.venv # exclude the "venv" virtualenv directory - | _build # exclude the "_build" directory - | buck-out # exclude the "buck-out" directory - | build # exclude the "build" directory - | dist # exclude the "dist" directory - | node_modules # exclude the "node_modules" directory - )/ -'''