Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7678be3
Showing
60 changed files
with
2,748 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Environment variables go here, and can be read in by Python using `os.getenv`: | ||
# | ||
# -------------------------------------------------------- | ||
# import os | ||
# | ||
# # Example variable | ||
# EXAMPLE_VARIABLE = os.getenv("EXAMPLE_VARIABLE") | ||
# -------------------------------------------------------- | ||
# | ||
# To ensure the `sed` command below works correctly, make sure all file paths in environment variables are absolute | ||
# (recommended), or are relative paths using other environment variables (works for Python users only). Environment | ||
# variable names are expected to contain letters, numbers or underscores only. | ||
# | ||
# DO NOT STORE SECRETS HERE - this file is version-controlled! You should store secrets in a `.secrets` file, which is | ||
# not version-controlled - this can then be sourced here, using `source_env ".secrets"`. | ||
|
||
# Extract the variables to `.env` if required. Note `.env` is NOT version-controlled, so `.secrets` will not be | ||
# committed | ||
sed -n 's/^export \(.*\)$/\1/p' .envrc .secrets | sed -e 's?$(pwd)?'"$(pwd)"'?g' | sed -e 's?$\([a-zA-Z0-9_]\{1,\}\)?${\1}?g' > .env | ||
|
||
# Add the working directory to `PYTHONPATH`; allows Jupyter notebooks in the `notebooks` folder to import `src` | ||
export PYTHONPATH="$PYTHONPATH:$(pwd)" | ||
|
||
# Import secrets from an untracked file `.secrets` | ||
source_env ".secrets" | ||
|
||
# Add environment variables for the `data` directories | ||
export DIR_DATA=$(pwd)/data | ||
export DIR_DATA_EXTERNAL=$(pwd)/data/external | ||
export DIR_DATA_RAW=$(pwd)/data/raw | ||
export DIR_DATA_INTERIM=$(pwd)/data/interim | ||
export DIR_DATA_PROCESSED=$(pwd)/data/processed | ||
|
||
# Add environment variables for the `docs` directory | ||
export DIR_DOCS=$(pwd)/docs | ||
|
||
# Add environment variables for the `notebooks` directory | ||
export DIR_NOTEBOOKS=$(pwd)/notebooks | ||
|
||
# Add environment variables for the `outputs` directory | ||
export DIR_OUTPUTS=$(pwd)/outputs | ||
|
||
# Add environment variables for the `src` directories | ||
export DIR_SRC=$(pwd)/src | ||
export DIR_SRC_MAKE_DATA=$(pwd)/src/make_data | ||
export DIR_SRC_MAKE_FEATURES=$(pwd)/src/make_features | ||
export DIR_SRC_MAKE_MODELS=$(pwd)/src/make_models | ||
export DIR_SRC_MAKE_VISUALISATIONS=$(pwd)/src/make_visualisations | ||
export DIR_SRC_UTILS=$(pwd)/src/utils | ||
|
||
# Add environment variables for the `tests` directory | ||
export DIR_TESTS=$(pwd)/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[flake8] | ||
# Rule definitions: http://flake8.pycqa.org/en/latest/user/error-codes.html | ||
# D203: 1 blank line required before class docstring | ||
# W503: line break before binary operator | ||
exclude = venv*,__pycache__,node_modules,bower_components,migrations | ||
ignore = D203,W503 | ||
max-complexity = 9 | ||
max-line-length = 88 | ||
extend-ignore = E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Summary | ||
|
||
Add your summary here - keep it brief, to the point, and in plain English. [For further | ||
information about pull requests, check out the GDS | ||
Way](https://gds-way.cloudapps.digital/standards/pull-requests.html). | ||
|
||
# Checklists | ||
|
||
<!-- | ||
These are do-confirm checklists; it confirms that you have DOne each item. | ||
Outstanding actions should be completed before reviewers are assigned; if actions are | ||
irrelevant, please try and add a comment stating why. | ||
Incomplete pull/merge requests may be blocked until actions are resolved, or closed at | ||
the reviewers' discretion. | ||
--> | ||
|
||
This pull/merge request meets the following requirements: | ||
|
||
- [ ] code runs | ||
- [ ] [developments are ethical][data-ethics-framework] and secure | ||
- [ ] you have made proportionate checks that the code works correctly | ||
- [ ] test suite passes | ||
- [ ] developments adhere to AQA plan (see `docs/aqa/aqa_plan.md`) | ||
- [ ] data log updated (see `docs/aqa/data_log.md`), if necessary | ||
- [ ] assumptions, and caveats log updated (see `docs/aqa/assumptions_caveats.md`), if | ||
necessary | ||
- [ ] [minimum usable documentation][agilemodeling] written in the `docs` folder | ||
|
||
Comments have been added below around the incomplete checks. | ||
|
||
[agilemodeling]: http://agilemodeling.com/essays/documentLate.htm | ||
[data-ethics-framework]: https://www.gov.uk/government/publications/data-ethics-framework |
Oops, something went wrong.