Add a short (1–5-line) description of the repo here.
E.g.
A template that can be used for creating repos for Python projects
This README sets out a structure that should be used in READMEs. Optional sections in this README template are marked [optional] - sometimes with notes on when these may apply. Note that this is a minimal template - other sections should be added where they are of use. Examples are marked using blockquotes (
>) - remove these when replicating the examples.Also note that this repo includes a
.vscode/settings.json.examplefile, which contains useful Visual Studio Code settings for working with Python files. This file needs to be renamed to.vscode/settings.jsonto take effect. NB:.vscode/settings.jsonis excluded from version control.
Add a link to related repos where the code relies on code or data stemming from another repo, indicating whether the repo is public 🔓 or private 🔒.
E.g.
🔒 IfG Ministers Database - private repo: Holds the majority of code and resources for the IfG Ministers Database project
In several places, identifiers used in this repo have been aligned with those used in the IfG Ministers Database - described in further detail below
🔓 IfG Ministers Database - public repo: Holds the public element of the IfG Ministers Database project
🔓 GOV.UK organisations Experimental work to see whether it's possible to track organisational histories using organisations data from the GOV.UK API
Add a diagram showing the project structure.
E.g.
├── csps_extraction/ │ ├── sql/ │ │ ├── compare_organisations_data.sql │ │ ├── select_organisations_data.sql │ ├── compare_data.py │ ├── extract_existing_data.py │ └── utils.py ├── .gitignore ├── .pre-commit-config.yaml ├── LICENSE ├── README.md └── requirements.txt
Where the repo contains a pyproject.toml file, include the commands to install the repo as a Python package.
E.g.
pip install git+https://github.com/instituteforgov/cs_organisations.git@<commit>pip install -e "<path_to_your_local_copy>/cs_organisations"NB: Even when installed in this way, in
requirements.txtthis will show a GitHub URL rather than a local path.Not yet implemented.
Where the repo contains a requirements.txt file, include the commands to install dependencies using it.
E.g.
pip install -r requirements.txt
Add details of the substantive scripts in the repo with a brief description, in run order where the order is important.
E.g.
File Description csps_extraction/extract_existing_data.pyReads existing CSPS data and saves to database. csps_extraction/sql/compare_organisations_data.sqlReplicates the collated organisations data from the CSPS working file, to be used as the basis for comparison in compare_data.py.csps_extraction/compare_data.pyValidates that the augmented SQL output matches the source Excel file. csps_extraction/sql/select_organisations_data.sqlScript to be used for (re-)insertion of augmented data into Excel. Duplicates compare_organisations_data.sql, with the following differences to columns:
- Organisation type: Simplified (things of type 'Aggregation'/'Disaggregation'/'Reporting total' reported as such, rather than being reported as 'Combination')
- Organisation aggregation?: Removed
- IfG core department: Added
- Latest organisation: Latest actual organisation always reported, rather than latest determinate organisation
- Latest departmental group: Latest actual (IfG) departmental group always reported, rather than latest determinate organisation
Add details of environment variables here, where the code makes use of any of.
E.g.
The scripts require the following environment variables to be set:
Variable Description ODBC_DRIVERODBC driver version for SQL Server (e.g., ODBC Driver 18 for SQL Server)ODBC_SERVERSQL Server hostname ODBC_DATABASEDatabase name ODBC_AUTHENTICATIONAuthentication method (e.g., ActiveDirectoryServicePrincipal)AZURE_CLIENT_IDAzure service principal client ID used for database authentication AZURE_CLIENT_SECRETAzure service principal client secret used for database authentication
Add a section describing any important information for contributors.
E.g.
This project uses
pre-commithooks to ensure code quality. To set up:
- Install
pre-commiton your system if you don't already have it:
> ```bash
> pip install pre-commit
> ```
- Set up
pre-commitin your copy of this project. In the project directory, run: >bash > pre-commit install >Rules that are applied can be found in
.pre-commit-config.yaml.The hooks run automatically on commit, or manually with
pre-commit run --all-files.
Add details of the license if the project is public.
E.g.
This project is licensed under the MIT License. See the LICENSE file for details.