Skip to content

Commit

Permalink
Change import as it was not working and add exclude to config
Browse files Browse the repository at this point in the history
  • Loading branch information
MatRouillard committed Oct 8, 2024
1 parent f5fab2f commit 1719639
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
extend-ignore = E203,E501,E101,E266
extend-ignore = E203,E501,E101,E266,E402
exclude = .git,__pycache__,.temp,.venv,cache
6 changes: 3 additions & 3 deletions src/Assessment/data_integration.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import sys
import os
from src.Utils import utils
from src.Assessment import osm
from src.Assessment import omf
import osmnx as ox
import time
import json

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

from src.Utils import utils
from src.Assessment import osm
from src.Assessment import omf

# Number of seconds in total
total = 0
Expand Down
2 changes: 1 addition & 1 deletion src/Assessment/omf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import time
import os
import sys
from src.Utils import utils

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from src.Utils import utils

## Create tables statement

Expand Down
2 changes: 1 addition & 1 deletion src/Assessment/osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import time
import os
import sys
from src.Utils import utils


sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
from src.Utils import utils

## Graph

Expand Down
2 changes: 1 addition & 1 deletion src/Assessment/quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import pandas as pd
import psycopg2
import sys
from src.Utils import utils

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
from src.Utils import utils


def getListAreas(
Expand Down
4 changes: 2 additions & 2 deletions src/Assessment/quality_assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import sys
import time
import datetime
from src.Utils import utils
from src.Assessment import quality

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
from src.Utils import utils
from src.Assessment import quality


# Value for the time taken
Expand Down
7 changes: 3 additions & 4 deletions src/GeoDataCompare/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@
from matplotlib.colors import is_color_like, to_hex, to_rgb
import utm
import shapely

# Import custom classes and functions
import os
import sys

# Import custom classes and functions
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
import src.GeoDataCompare.theme as t
import src.GeoDataCompare.criterion as c
import src.GeoDataCompare.datasets as d
from src.GeoDataCompare.general_values import DefaultGeneralValues, GeneralValues
import src.Utils.utils as utils

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


### Static functions used in the rest of the script ###
def getAllAreas(
Expand Down
4 changes: 0 additions & 4 deletions src/GeoDataCompare/criterion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
import sys
import geopandas as gpd
import theme as t
import datasets as d
Expand All @@ -9,8 +7,6 @@
from htmltools import Tag
import faicons as fa

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


class Criterion(ABC):
"""Represents a criterion.
Expand Down
3 changes: 1 addition & 2 deletions src/GeoDataCompare/general_values.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import pandas as pd
import sqlalchemy
from abc import ABC

import os
import sys
import datasets as d

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__))))
import datasets as d


class AbstractGeneralValues(ABC):
Expand Down
3 changes: 1 addition & 2 deletions src/GeoDataCompare/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
import pandas as pd
import geopandas as gpd
import sqlalchemy

import os
import sys
import datasets as d

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__))))
import datasets as d


class Theme(ABC):
Expand Down
2 changes: 1 addition & 1 deletion src/Test/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import sys
import os
import duckdb
from src.Utils import utils

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")))
from src.Utils import utils


# Connections to the database
Expand Down

0 comments on commit 1719639

Please sign in to comment.