diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a8ca95..e59ea9e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: # list of supported hooks: https://pre-commit.com/hooks.html - id: trailing-whitespace @@ -14,18 +14,18 @@ repos: # python code formatting/linting - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: "v0.0.290" + rev: "v0.7.2" hooks: - id: ruff args: [--fix] - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 24.10.0 hooks: - id: black args: [--line-length, "100"] # yaml formatting - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 + rev: v4.0.0-alpha.8 hooks: - id: prettier types: [yaml] diff --git a/gspconsumer/__init__.py b/gspconsumer/__init__.py index 349b0c8..e2ed019 100644 --- a/gspconsumer/__init__.py +++ b/gspconsumer/__init__.py @@ -1,2 +1,3 @@ """ Pv Consumer""" + __version__ = "1.1.19" diff --git a/gspconsumer/gsps.py b/gspconsumer/gsps.py index 8592fe0..9d97633 100644 --- a/gspconsumer/gsps.py +++ b/gspconsumer/gsps.py @@ -1,4 +1,5 @@ """ GSP functions """ + import logging from datetime import datetime, timedelta, timezone from typing import List, Optional diff --git a/gspconsumer/time.py b/gspconsumer/time.py index 0d8c38f..8b2c6e0 100644 --- a/gspconsumer/time.py +++ b/gspconsumer/time.py @@ -1,4 +1,5 @@ """ Time helper functions """ + import logging from datetime import datetime, timezone diff --git a/scripts/gsp_details.py b/scripts/gsp_details.py index 8de87ff..639c614 100644 --- a/scripts/gsp_details.py +++ b/scripts/gsp_details.py @@ -7,7 +7,6 @@ 4. update database """ - import json from datetime import datetime, timezone diff --git a/scripts/gsp_name_update/merge_labels.py b/scripts/gsp_name_update/merge_labels.py index 76ccb20..859aea9 100644 --- a/scripts/gsp_name_update/merge_labels.py +++ b/scripts/gsp_name_update/merge_labels.py @@ -1,4 +1,5 @@ """ Merge labels """ + # import the files import pandas as pd diff --git a/scripts/gsp_name_update/new_labels.py b/scripts/gsp_name_update/new_labels.py index 956226a..294a011 100644 --- a/scripts/gsp_name_update/new_labels.py +++ b/scripts/gsp_name_update/new_labels.py @@ -1,4 +1,5 @@ """ New lables for gsps """ + # get the # or load file using [this](https://www.geeksforgeeks.org/read-json-file-using-python/) diff --git a/scripts/gsp_name_update/update_region_name.py b/scripts/gsp_name_update/update_region_name.py index 1eaf167..57a8511 100644 --- a/scripts/gsp_name_update/update_region_name.py +++ b/scripts/gsp_name_update/update_region_name.py @@ -5,7 +5,6 @@ 2. update database """ - import json import os.path diff --git a/scripts/v3_to_v4/data/get_data.py b/scripts/v3_to_v4/data/get_data.py index b4a8311..28ca6ad 100644 --- a/scripts/v3_to_v4/data/get_data.py +++ b/scripts/v3_to_v4/data/get_data.py @@ -1,4 +1,5 @@ """ Get GSP regions from National Grid API""" + from urllib.request import urlopen import geopandas as gpd diff --git a/scripts/v3_to_v4/update_installed_capacity.py b/scripts/v3_to_v4/update_installed_capacity.py index 5fee295..8127f99 100644 --- a/scripts/v3_to_v4/update_installed_capacity.py +++ b/scripts/v3_to_v4/update_installed_capacity.py @@ -2,6 +2,7 @@ We now do this in the app, so we dont need to run this anymore """ + import json import os diff --git a/setup.py b/setup.py index c80825e..a1f1398 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ """Setup file for gspconsumer package.""" + from pathlib import Path from setuptools import find_packages, setup