Python code for preliminary natural language processing analysis for 2023 population transformation consultation
Where this documentation refers to the root folder we mean where this README.md is
located.
To start using this project, first make sure your system meets its requirements.
It's suggested that you install this pack and it's requirements within a virtual environment.
To clone the repo, open command promt and navigate to the directory you want to save the repo to and call:
git clone https://github.com/datasciencecampus/consultation_nlp.git
This repository contains a configuration of pre-commit hooks. These are language agnostic and focussed on repository security (such as detection of passwords and API keys). If approaching this project as a developer, you are encouraged to install and enable pre-commits
by running the following in your shell:
-
Install
pre-commit
:pip install pre-commit
-
Enable
pre-commit
:pre-commit install
Whilst in the root folder, in the command prompt, you can install the package and it's dependencies using:
python -m pip install -U pip setuptools
pip install -e .
or use the make
command:
make install
This installs an editable version of the package. Meaning, when you update the package code, you do not have to reinstall it for the changes to take effect. (This saves a lot of time when you test your code)
Remember to update the setup and requirement files inline with any changes to your package. The inital files contain the bare minimum to get you started.
The entry point for the pipeline is stored within the package and called run_pipeline.py
.
To run the pipeline, run the following code in the terminal (whilst in the root directory of the
project).
python src/run_pipeline.py
Alternatively, most Python IDE's allow you to run the code directly from the IDE using a run
button.
- Ensure all requirements are downloaded from the requirements.txt by openning up the shell terminal (anaconda prompt) and running:
pip install -r requirements.txt
- Keep the shell terminal open and navigate to the directory where this code is saved and run:
streamlit run streamlit_app.py
This codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. The documentation is ©Crown copyright and available under the terms of the Open Government 3.0 licence.
If you want to help us build, and improve consultation_nlp
, view our
contributing guidelines.
Contributors have some additional requirements!
- Python 3.6.1+ installed
- a
.secrets
file with the required secrets and credentials - load environment variables from
.env
To install the contributing requirements, open your terminal and enter:
python -m pip install -U pip setuptools
pip install -e .[dev]
pre-commit install
or use the make
command:
make install_dev
This project structure is based on the govcookiecutter
template
project.