mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
need to download grade pydantic
This commit is contained in:
parent
fe2e536530
commit
786e310f7c
4 changed files with 38 additions and 30 deletions
|
|
@ -1,32 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
# #!/bin/bash
|
|
||||||
# poetry install;
|
|
||||||
|
|
||||||
# # Get the Poetry virtual environment path
|
|
||||||
# VENV_PATH=$(poetry env info --path 2>/dev/null)
|
|
||||||
|
|
||||||
# if [ -z "$VENV_PATH" ]; then
|
|
||||||
# echo "No Poetry environment found. Did you run 'poetry install'?"
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# # Ensure VS Code settings directory exists
|
|
||||||
# SETTINGS_DIR="/home/vscode/.vscode-server/data/Machine"
|
|
||||||
# SETTINGS_FILE="$SETTINGS_DIR/settings.json"
|
|
||||||
|
|
||||||
# mkdir -p "$SETTINGS_DIR"
|
|
||||||
|
|
||||||
# # If settings.json doesn't exist, create a default one
|
|
||||||
# if [ ! -f "$SETTINGS_FILE" ]; then
|
|
||||||
# echo "{}" > "$SETTINGS_FILE"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# # Update VS Code settings to use the Poetry virtual environment
|
|
||||||
# jq --arg venv "$VENV_PATH/bin/python" '.["python.defaultInterpreterPath"] = $venv' \
|
|
||||||
# "$SETTINGS_FILE" > "$SETTINGS_FILE.tmp" && mv "$SETTINGS_FILE.tmp" "$SETTINGS_FILE"
|
|
||||||
|
|
||||||
# echo "✅ Updated VS Code to use Poetry environment: $VENV_PATH"
|
|
||||||
=======
|
|
||||||
mkdir -p ~/.ipython/profile_default/startup
|
mkdir -p ~/.ipython/profile_default/startup
|
||||||
|
|
||||||
cat << 'EOF' > ~/.ipython/profile_default/startup/00-load-env.py
|
cat << 'EOF' > ~/.ipython/profile_default/startup/00-load-env.py
|
||||||
|
|
@ -41,4 +12,3 @@ if os.path.exists(env_path):
|
||||||
else:
|
else:
|
||||||
print("⚠ No .env file found to load")
|
print("⚠ No .env file found to load")
|
||||||
EOF
|
EOF
|
||||||
>>>>>>> 11b482838efcf46f376fd3ecbf2c1bb0be6d097d
|
|
||||||
|
|
|
||||||
20
backend/address2UPRN/README.md
Normal file
20
backend/address2UPRN/README.md
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
We have list of address as input.
|
||||||
|
|
||||||
|
It'll come in batches of the same post code and from then we want to somehow convert that into UPRN
|
||||||
|
|
||||||
|
if this lambda/function can do that we'll be speeding ahead
|
||||||
|
|
||||||
|
|
||||||
|
Energy Performance Information: https://epc.opendatacommunities.org/
|
||||||
|
|
||||||
|
guidance page: https://epc.opendatacommunities.org/docs/guidance#field_domestic_LMK_KEY
|
||||||
|
|
||||||
|
Example of past khalims code that he wrote some tests for: https://github.com/Hestia-Homes/Model/blob/941be42b83a590e838fd3ee475bfd1ff31438789/backend/tests/test_search_epc.py#L11
|
||||||
|
|
||||||
|
|
||||||
|
Example of EPC search: https://github.com/Hestia-Homes/Model/blob/941be42b83a590e838fd3ee475bfd1ff31438789/backend/SearchEpc.py#L118
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Khalim has made a python package to help scrape data: https://github.com/KhalimCK/epc-api-python
|
||||||
|
|
||||||
0
backend/address2UPRN/__init__.py
Normal file
0
backend/address2UPRN/__init__.py
Normal file
18
backend/address2UPRN/main.py
Normal file
18
backend/address2UPRN/main.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
from epc_api.client import EpcClient
|
||||||
|
import os
|
||||||
|
EPC_AUTH_TOKEN = os.getenv("EPC_AUTH_TOKEN", "")
|
||||||
|
|
||||||
|
client = EpcClient(auth_token=EPC_AUTH_TOKEN)
|
||||||
|
|
||||||
|
|
||||||
|
search_resp = client.domestic.search(
|
||||||
|
params={
|
||||||
|
"postcode": "b938sy"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
print(search_resp)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue