Skip to content

Commit

Permalink
Merge branch 'poa_fix_precommit' of https://github.com/QGEP/datamodel
Browse files Browse the repository at this point in the history
…into poa_fix_precommit
  • Loading branch information
ponceta committed Nov 15, 2024
2 parents e3529d7 + c431f01 commit 09b5f09
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion delta/post-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import sys

import psycopg2

from pum.core.deltapy import DeltaPy

from view.create_views import create_views

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))


class CreateViews(DeltaPy):

def run(self):
Expand Down
1 change: 0 additions & 1 deletion delta/pre-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import sys

from pkg_resources import DistributionNotFound, get_distribution, parse_version

from pum.core.deltapy import DeltaPy

from view.create_views import drop_views
Expand Down
5 changes: 1 addition & 4 deletions test/test_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ def insert_reaches(self, reaches, manholes):
geom = self.execute(
"ST_ForceCurve(ST_SetSrid(ST_MakeLine(ARRAY[{points}]), 2056))".format(
points=", ".join(
[
f"ST_MakePoint({pt[0]}, {pt[1]}, 'NaN')"
for pt in points
]
[f"ST_MakePoint({pt[0]}, {pt[1]}, 'NaN')" for pt in points]
)
)
)
Expand Down
6 changes: 2 additions & 4 deletions view/create_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
import sys

import psycopg2

from pirogue import MultipleInheritance, SimpleJoins, SingleInheritance

from yaml import safe_load

from vw_qgep_reach import vw_qgep_reach
from vw_qgep_wastewater_structure import vw_qgep_wastewater_structure
from yaml import safe_load

sys.path.append(os.path.join(os.path.dirname(__file__)))


def run_sql(file_path: str, pg_service: str, variables: dict = {}):
sql = open(file_path).read()
conn = psycopg2.connect(f"service={pg_service}")
Expand Down

0 comments on commit 09b5f09

Please sign in to comment.