Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move packages within src and fix extra things #295

Merged
merged 24 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b685172
Move packages within src and fix extra things
dalonsoa Sep 25, 2024
fe9f0e9
run pre-commit
barneydobson Sep 25, 2024
d717adb
Run pre-commit again
dalonsoa Sep 25, 2024
1e07690
Try fix namespace thing
barneydobson Sep 25, 2024
87c5c3b
Revert "Try fix namespace thing"
barneydobson Sep 25, 2024
6ec6add
Merge branch 'use_src' of https://github.com/ImperialCollegeLondon/SW…
barneydobson Sep 25, 2024
3688c9a
try to fix namespce thing
barneydobson Sep 25, 2024
c5d911a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 25, 2024
a4f9fa6
Tweak coverage config and build
dalonsoa Sep 25, 2024
8337df3
add licence
Sep 25, 2024
f74a76e
Merge branch 'main' into use_src
Sep 25, 2024
d610787
run pre-commit on new machine
Sep 25, 2024
cb5623e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 25, 2024
460749f
attempt to fix isort
Sep 25, 2024
035ef67
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 25, 2024
f000198
correct konwn first party
Sep 25, 2024
e86d656
Merge branch 'use_src' of https://github.com/ImperialCollegeLondon/SW…
Sep 25, 2024
76f320d
run preommit
Sep 25, 2024
66da2ed
revert because not sure
Sep 25, 2024
60c94f8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 25, 2024
c01f008
try tahers suggestion again
Sep 25, 2024
5bb9622
Merge branch 'use_src' of https://github.com/ImperialCollegeLondon/SW…
Sep 25, 2024
659e8d4
run pre commit
Sep 25, 2024
c7d5f03
remove old attempt to fix
Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 25, 2024

Verified

This commit was signed with the committer’s verified signature.
Bushstar Peter John Bushnell
commit c5d911adb7a0b1a5938f2d603fb05a2bc00dd4e2
2 changes: 1 addition & 1 deletion src/swmmanywhere/metric_utilities.py
Original file line number Diff line number Diff line change
@@ -12,13 +12,13 @@
import cytoolz.curried as tlz
import geopandas as gpd
import joblib
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be down with the swmmanywhere imports no? ruff is moving this in pre-commit on my machine back down to swmmanywhere but precommit.ci is moving it back on here... @cheginit do you have any ideas here as @dalonsoa is unavailable at the mo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be for the import netcomp line

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this about isort? If so, you need to specify what are the first-party packages.

lint.isort.known-first-party = [
  "swmmanywhere",
  "netcomp",
]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't include src, just the name of the package. The pre-commit error sounds like an issue with the service.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - shall I just abandon precommit.ci and return it to what we had previously for now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh lol it has passed now - maybe was a one off

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it sometimes happens, so don't sweat it 😄

import netcomp
import networkx as nx
import numpy as np
import pandas as pd
import shapely
from scipy import stats

import netcomp
from swmmanywhere.logging import logger
from swmmanywhere.parameters import MetricEvaluation

1 change: 0 additions & 1 deletion src/swmmanywhere/misc/debug_metrics.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@

import geopandas as gpd
import pandas as pd

from swmmanywhere.graph_utilities import load_graph
from swmmanywhere.metric_utilities import (
align_by_shape,
1 change: 0 additions & 1 deletion src/swmmanywhere/misc/debug_topology.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
from time import time

import pandas as pd

from swmmanywhere import metric_utilities as mu
from swmmanywhere.prepare_data import download_street

1 change: 0 additions & 1 deletion tests/test_data/custom_graphfcns.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import networkx as nx

from swmmanywhere.graph_utilities import BaseGraphFunction, register_graphfcn


1 change: 0 additions & 1 deletion tests/test_data/custom_metrics.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import networkx as nx

from swmmanywhere.metric_utilities import metrics


1 change: 0 additions & 1 deletion tests/test_geospatial_utilities.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
import rasterio as rst
from scipy.interpolate import RegularGridInterpolator
from shapely import geometry as sgeom

from swmmanywhere import geospatial_utilities as go
from swmmanywhere import graph_utilities as ge
from swmmanywhere.logging import set_verbose
1 change: 0 additions & 1 deletion tests/test_graph_utilities.py
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
import networkx as nx
import pytest
from shapely import geometry as sgeom

from swmmanywhere import parameters
from swmmanywhere.filepaths import FilePaths
from swmmanywhere.graph_utilities import (
1 change: 0 additions & 1 deletion tests/test_metric_utilities.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
import pandas as pd
import pytest
import shapely

from swmmanywhere import metric_utilities as mu
from swmmanywhere.graph_utilities import load_graph
from swmmanywhere.parameters import MetricEvaluation
1 change: 0 additions & 1 deletion tests/test_post_processing.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@
import pandas as pd
import pyswmm
from shapely import geometry as sgeom

from swmmanywhere import post_processing as stt
from swmmanywhere.filepaths import FilePaths

1 change: 0 additions & 1 deletion tests/test_prepare_data.py
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@
import rasterio
import yaml
from geopy.geocoders import Nominatim

from swmmanywhere import prepare_data as downloaders


1 change: 0 additions & 1 deletion tests/test_shortest_path_utils.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@

import networkx as nx
import pytest

from swmmanywhere.shortest_path_utils import dijkstra_pq, tarjans_pq


1 change: 0 additions & 1 deletion tests/test_swmmanywhere.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
import jsonschema
import pytest
import yaml

from swmmanywhere import swmmanywhere
from swmmanywhere.graph_utilities import graphfcns
from swmmanywhere.metric_utilities import metrics