Skip to content

Police-Data-Accessibility-Project/data-sources-app-v2-archive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,215 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Version

data-sources-app-v2 Archive

This fork is no longer deployed anywhere. We have since merged it with main: Police-Data-Accessibility-Project#635

This fork is an archive in case we need to revert in the immediate future, plus a handy way to keep track of recent Pull Requests associated with the v2 fork.

Installation

1. Clone this repository and navigate to the root directory.

git clone https://github.com/Police-Data-Accessibility-Project/data-sources-app.git
cd data-sources-app

2. Create a virtual environment.

If you don't already have virtualenv, install the package:


pip install virtualenv

Then run the following command to create a virtual environment:


virtualenv -p python3.11 venv

3. Activate the virtual environment.


source venv/bin/activate

4. Install dependencies.


pip install -r requirements.txt
pip install "psycopg[binary,pool]"

pre-commit install

# To optionally run the pre-commit against all files (as pre-commit usually only runs on changed files)
pre-commit run --all-files

5. Add environment secrets

For more information on setting up environment secrets, see ENV.md

6. Set up Local Database

Follow instructions in the /local_database directory to set up a local database for testing.

7. Run the Python app.


python3 app.py

8. (If necessary) run the client locally against the API

If you need to run the client web application, refer to the pdap.io documentation.

Generally, local development on the client is done based on the stable deployed dev API, and API development can usually be verified using curl. But if you are working on a full stack project for which you need to run the client locally against the API locally, reach out to @maxachis and @joshuagraber in Discord for help.

Contributing

If you're here to submit a Pull Request, please review the important information available in CONTRIBUTING.md.

About

An API and UI for using and maintaining the Data Sources database

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 90.3%
  • PLpgSQL 9.4%
  • Other 0.3%