Skip to content

Commit

Permalink
Merge pull request #6 from nestauk/5-summarise-clusters
Browse files Browse the repository at this point in the history
5 summarise clusters
  • Loading branch information
RFOxbury authored Nov 12, 2024
2 parents 7ef9bc1 + 61e9751 commit 88e233a
Show file tree
Hide file tree
Showing 22 changed files with 1,810 additions and 5,754 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ ipython_config.py
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Expand Down Expand Up @@ -171,3 +172,8 @@ outputs/*
!/outputs/*.md
# DS store in any folder
**/.DS_Store

# data files
*.csv
poetry.lock
poetry.lock
48 changes: 24 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ repos:
types: [file, python]
stages: [commit]

- id: flake8
name: Run Flake8
entry: poetry run pflake8
language: system
types: [file, python]
stages: [commit]
# - id: flake8
# name: Run Flake8
# entry: poetry run pflake8
# language: system
# types: [file, python]
# stages: [commit]

- id: yamllint
name: Run Yamllint
Expand All @@ -58,21 +58,21 @@ repos:
types: [file, yaml]
stages: [commit]

- id: bandit
name: Run Bandit
entry: poetry run bandit
language: system
types: [file, python]
args:
[
--configfile,
pyproject.toml,
--severity-level,
all,
--confidence-level,
all,
--quiet,
--format,
custom,
]
stages: [commit]
# - id: bandit
# name: Run Bandit
# entry: poetry run bandit
# language: system
# types: [file, python]
# args:
# [
# --configfile,
# pyproject.toml,
# --severity-level,
# all,
# --confidence-level,
# all,
# --quiet,
# --format,
# custom,
# ]
# stages: [commit]
12 changes: 7 additions & 5 deletions dsp_interview_transcripts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
import logging
import os
from pathlib import Path
from typing import Optional
import yaml

from pathlib import Path
from typing import Optional

import dotenv
import yaml


dotenv.load_dotenv()


def get_yaml_config(file_path: Path) -> Optional[dict]:
"""Fetch yaml config and return as dict if it exists."""
if file_path.exists():
with open(file_path, "rt") as f:
return yaml.load(f.read(), Loader=yaml.FullLoader)


# Define project base directory
PROJECT_DIR = Path(__file__).resolve().parents[1]

# Define logger
# Define logger
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)

# base/global config
_base_config_path = Path(__file__).parent.resolve() / "config/base.yaml"
config = get_yaml_config(_base_config_path)
config = get_yaml_config(_base_config_path)
22 changes: 11 additions & 11 deletions dsp_interview_transcripts/config/base.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

---
questions: ["What, if anything, do you know about the Boiler Upgrade Scheme? If you don't know anything about the scheme, just give it your best guess.",
"What, if anything, do you know about the process of applying for Boiler Upgrade Scheme funding?",
"What do you think are the eligibility requirements for someone to use this scheme?",
"How would you go about finding out more about the Boiler Upgrade Scheme",
"What do you think about there being eligibility requirements for a scheme like this?",
"As a homeowner, where do you see yourself in relation to the eligibility requirements?",
"What, if any, type of work do you think needs to be done to a house to replace fossil fuel heating systems?",
"What types of home upgrades would you consider getting done to your house to improve the efficiency of your heating system?",
"What types of work to your house wouldn't you consider?",
"What are some energy-efficient heating systems that you could consider, apart from the one currently in use at your home?",
"Is there anything we've talked about you'd like to discuss further?"]
"What, if anything, do you know about the process of applying for Boiler Upgrade Scheme funding?",
"What do you think are the eligibility requirements for someone to use this scheme?",
"How would you go about finding out more about the Boiler Upgrade Scheme",
"What do you think about there being eligibility requirements for a scheme like this?",
"As a homeowner, where do you see yourself in relation to the eligibility requirements?",
"What, if any, type of work do you think needs to be done to a house to replace fossil fuel heating systems?",
"What types of home upgrades would you consider getting done to your house to improve the efficiency of your heating system?",
"What types of work to your house wouldn't you consider?",
"What are some energy-efficient heating systems that you could consider, apart from the one currently in use at your home?",
"Is there anything we've talked about you'd like to discuss further?"]
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.4"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 88e233a

Please sign in to comment.