GSA-TTS / 10x-nad-ch

The National Address Database Collaboration Hub (NAD-CH)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

10x National Address Database Collaboration Hub (NAD-CH)

Local Development

Install poetry so that you can run tests and scripts locally.

Clone the repostiory:

git clone https://github.com/GSA-TTS/10x-nad-ch/

In order to set up a local development environment, you will need to download Docker.

To set the necessary environment variables, copy the sample.env file to a new file named .env in the same directory:

cp sample.env .env

Update all settings defaulted to <add_a_key_here>.

Install frontend dependencies and run in development mode:

cd nad_ch/controllers/web
npm install
npm run dev

Return to the project's root directory and run the following command to build the app and start up its services:

docker compose up --build

To create database migrations (add comment associated with migration in quotes):

docker exec nad-ch-dev-local poetry run alembic revision --autogenerate -m "ENTER COMMENT"

To run database migrations:

docker exec nad-ch-dev-local poetry run alembic upgrade head

To downgrade database migrations:

docker exec nad-ch-dev-local poetry run alembic downgrade <enter down_revision id>

Testing

Some tests in the test suite are dependent on Minio operations and access key is required. To Create a Minio access key, visit the Minio webui at minio-webui and under User/Access Keys, click Create access key. Save the credentials to your .env file under S3_ACCESS_KEY and S3_SECRET_ACCESS_KEY.

Run the test suite as follows:

poetry run test

About

The National Address Database Collaboration Hub (NAD-CH)

License:Creative Commons Zero v1.0 Universal


Languages

Language:Python 77.2%Language:HTML 13.7%Language:TypeScript 5.1%Language:SCSS 2.3%Language:JavaScript 0.9%Language:Dockerfile 0.5%Language:Mako 0.2%Language:Shell 0.0%