From 07b1f9b923290c2828e4baa5d601c7d8f088de91 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Fri, 15 Nov 2024 17:52:08 +0000 Subject: [PATCH] Cleanup some bits --- .pre-commit-config.yaml | 1 - README.md | 36 +++--------------------------------- pytest.ini | 3 --- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0cf26bab6..1d367f504 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,4 +25,3 @@ repos: "--disable-plugin", "Base64HighEntropyString", ] - exclude: .env.development diff --git a/README.md b/README.md index b13517d12..0c5712775 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ To update requirements, use `uv add` or `uv remove`. This service depends on: - A postgres database -- No other microservices ### IDE Setup [Python IDE Setup](https://github.com/communitiesuk/funding-service-design-workflows/blob/main/readmes/python-repos-ide-setup.md) @@ -40,30 +39,6 @@ This service depends on: ### Local DB Setup General instructions for local db development are available here: [Local database development](https://github.com/communitiesuk/funding-service-design-workflows/blob/main/readmes/python-repos-db-development.md) -### DB Helper Scripts -This repository uses `invoke` to provide scripts for dropping and recreating the local database in [tasks.py](./tasks.py) - -### Running in-container -To run the tasks inside the docker container used by docker compose, first bash into the container: -```bash -docker exec -it $(docker ps -qf "name=pre-award-stores") bash -``` -Then execute the required tasks using `inv` as below. - -Or to combine the two into one command: -```bash -docker exec -it $(docker ps -qf "name=pre-award-stores") inv truncate-data -``` - -## Running the tests - -We use `pytest` to run all of our tests. We have a selection of unit, integration, and end-to-end (browser) tests. By default, -the unit and integration tests will run with a basic invocation of `pytest.` - -The majority of our tests will expect to access a database. This will be available if you're using the docker runner and have started all of the services. - -[Testing in Python repos](https://github.com/communitiesuk/funding-service-design-workflows/blob/main/readmes/python-repos-db-development.md) - ## Updating database migrations Whenever you make changes to database models, please run: @@ -72,19 +47,14 @@ Whenever you make changes to database models, please run: The `message` should be a short description of the DB changes made. Don't specify a revision id (using `--rev-id`) - it will be generated automatically. -The migration file for your changes will be created in ./db/migrations. Please then commit and push these to github +The migration file for your changes will be created in ./db/migrations/versions. Please then commit and push these to github so that the migrations will be run in the pipelines to correctly upgrade the deployed db instances with your changes. - ## Builds and Deploys Details on how our pipelines work and the release process is available [here](https://dluhcdigital.atlassian.net/wiki/spaces/FS/pages/73695505/How+do+we+deploy+our+code+to+prod) ### Paketo Paketo is used to build the docker image which gets deployed to our test and production environments. Details available [here](https://github.com/communitiesuk/funding-service-design-workflows/blob/main/readmes/python-repos-paketo.md) + ### Copilot Copilot is used for infrastructure deployment. Instructions are available [here](https://github.com/communitiesuk/funding-service-design-workflows/blob/main/readmes/python-repos-copilot.md), with the following values for the fund store: -- service-name: pre-award-stores -- image-name: ??? - -## Accessing on AWS - -TODO: Some AWS access info +- service-name: fsd-pre-award-stores diff --git a/pytest.ini b/pytest.ini index 943c8aba6..d293c6dd4 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,6 +3,3 @@ env = FLASK_ENV=unit_test FLASK_DEBUG=1 GITHUB_SHA=123123 - -markers = - accessibility: accessibility test