Skip to content

Draft#427

Open
Grufoony wants to merge 4 commits intomainfrom
moreroadpar
Open

Draft#427
Grufoony wants to merge 4 commits intomainfrom
moreroadpar

Conversation

@Grufoony
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.26%. Comparing base (4e5136b) to head (94abe6d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
+ Coverage   87.25%   87.26%   +0.01%     
==========================================
  Files          52       52              
  Lines        6449     6457       +8     
  Branches      715      715              
==========================================
+ Hits         5627     5635       +8     
  Misses        803      803              
  Partials       19       19              
Flag Coverage Δ
unittests 87.26% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Check warning

Code scanning / Csslint (reported by Codacy)

Rule doesn't have all its properties in alphabetical order. Warning

Rule doesn't have all its properties in alphabetical order.
font-size: 12px;
}

.legend-title {

Check notice

Code scanning / Csslint (reported by Codacy)

Unknown property 'gap'. Note

Unknown property 'gap'.
# To use a custom speed function, you must pass the pointer to the compiled function using the address attribute
# dynamics.setSpeedFunction(SpeedFunction.CUSTOM, custom_speed.address)
# Get epoch time of today at midnight
epoch_time = int(

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "epoch_time" doesn't conform to UPPER_CASE naming style Warning

Constant name "epoch_time" doesn't conform to UPPER_CASE naming style

# Create a dynamics model for the road network
dynamics = Dynamics(road_network, seed=args.seed)
# To use a custom speed function, you must pass the pointer to the compiled function using the address attribute

Check warning

Code scanning / Pylint (reported by Codacy)

Line too long (116/100) Warning

Line too long (116/100)
vehicle_input = np.clip(vehicle_input, 0, None).astype(int)

# Create a dynamics model for the road network
dynamics = Dynamics(road_network, seed=args.seed)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "dynamics" doesn't conform to UPPER_CASE naming style Warning

Constant name "dynamics" doesn't conform to UPPER_CASE naming style
# Generaate a random vector of integer values for vehicle input
# We want values to have a 10s entry for a whole day
vehicle_input = np.random.normal(args.amp, args.amp * 0.1, size=8640)
vehicle_input = np.clip(vehicle_input, 0, None).astype(int)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "vehicle_input" doesn't conform to UPPER_CASE naming style Warning

Constant name "vehicle_input" doesn't conform to UPPER_CASE naming style

# Generaate a random vector of integer values for vehicle input
# We want values to have a 10s entry for a whole day
vehicle_input = np.random.normal(args.amp, args.amp * 0.1, size=8640)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "vehicle_input" doesn't conform to UPPER_CASE naming style Warning

Constant name "vehicle_input" doesn't conform to UPPER_CASE naming style
@@ -0,0 +1,110 @@
import argparse

Check warning

Code scanning / Pylint (reported by Codacy)

Missing module docstring Warning

Missing module docstring
from tqdm import trange
from numba import cfunc, float64
import numpy as np
import networkx as nx

Check notice

Code scanning / Pylint (reported by Codacy)

Unused networkx imported as nx Note

Unused networkx imported as nx

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography
from dsf.mobility import (

Check notice

Code scanning / Pylint (reported by Codacy)

Unused SpeedFunction imported from dsf.mobility Note

Unused SpeedFunction imported from dsf.mobility

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography
from dsf.mobility import (

Check notice

Code scanning / Pylint (reported by Codacy)

Unused PathWeight imported from dsf.mobility Note

Unused PathWeight imported from dsf.mobility
import logging

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography

Check notice

Code scanning / Pylint (reported by Codacy)

Unused get_cartography imported from dsf.cartography.cartography Note

Unused get_cartography imported from dsf.cartography.cartography
import logging

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography

Check warning

Code scanning / Prospector (reported by Codacy)

Unused get_cartography imported from dsf.cartography.cartography (unused-import) Warning

Unused get_cartography imported from dsf.cartography.cartography (unused-import)

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography
from dsf.mobility import (

Check warning

Code scanning / Prospector (reported by Codacy)

Unused PathWeight imported from dsf.mobility (unused-import) Warning

Unused PathWeight imported from dsf.mobility (unused-import)
SpeedFunction,
)

from tqdm import trange

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'tqdm' (import-error) Warning

Unable to import 'tqdm' (import-error)
)

from tqdm import trange
from numba import cfunc, float64

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'numba' (import-error) Warning

Unable to import 'numba' (import-error)

from tqdm import trange
from numba import cfunc, float64
import numpy as np

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'numpy' (import-error) Warning

Unable to import 'numpy' (import-error)
from tqdm import trange
from numba import cfunc, float64
import numpy as np
import networkx as nx

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'networkx' (import-error) Warning

Unable to import 'networkx' (import-error)
from tqdm import trange
from numba import cfunc, float64
import numpy as np
import networkx as nx

Check warning

Code scanning / Prospector (reported by Codacy)

Unused networkx imported as nx (unused-import) Warning

Unused networkx imported as nx (unused-import)
"Invalid grid dimensions. Please use the format 'rowsxcols' (e.g., 10x10)."
)

logging.info(f"Creating manhattan cartography for {rows}x{cols} grid...")

Check warning

Code scanning / Prospector (reported by Codacy)

Use lazy % formatting in logging functions (logging-fstring-interpolation) Warning

Use lazy % formatting in logging functions (logging-fstring-interpolation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 0 spaces (indentation) Warning

Expected indentation of 0 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 0 spaces (indentation) Warning

Expected indentation of 0 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 0 spaces (indentation) Warning

Expected indentation of 0 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)

Check warning

Code scanning / Stylelint (reported by Codacy)

Expected indentation of 2 spaces (indentation) Warning

Expected indentation of 2 spaces (indentation)
@@ -0,0 +1,110 @@
import argparse

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing module docstring Warning

Missing module docstring
SpeedFunction,
)

from tqdm import trange

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

third party import "from tqdm import trange" should be placed before "from dsf.cartography import create_manhattan_cartography" Warning

third party import "from tqdm import trange" should be placed before "from dsf.cartography import create_manhattan_cartography"
)

from tqdm import trange
from numba import cfunc, float64

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

third party import "from numba import cfunc, float64" should be placed before "from dsf.cartography import create_manhattan_cartography" Warning

third party import "from numba import cfunc, float64" should be placed before "from dsf.cartography import create_manhattan_cartography"

from tqdm import trange
from numba import cfunc, float64
import numpy as np

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

third party import "import numpy as np" should be placed before "from dsf.cartography import create_manhattan_cartography" Warning

third party import "import numpy as np" should be placed before "from dsf.cartography import create_manhattan_cartography"
from tqdm import trange
from numba import cfunc, float64
import numpy as np
import networkx as nx

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

third party import "import networkx as nx" should be placed before "from dsf.cartography import create_manhattan_cartography" Warning

third party import "import networkx as nx" should be placed before "from dsf.cartography import create_manhattan_cartography"

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography
from dsf.mobility import (

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Unused SpeedFunction imported from dsf.mobility Note

Unused SpeedFunction imported from dsf.mobility

from dsf.cartography import create_manhattan_cartography
from dsf.cartography.cartography import get_cartography
from dsf.mobility import (

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Unused PathWeight imported from dsf.mobility Note

Unused PathWeight imported from dsf.mobility
from tqdm import trange
from numba import cfunc, float64
import numpy as np
import networkx as nx

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Unused networkx imported as nx Note

Unused networkx imported as nx
try:
rows, cols = map(int, args.dim.split("x"))
except ValueError:
raise ValueError(

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Consider explicitly re-raising using the 'from' keyword Note

Consider explicitly re-raising using the 'from' keyword
"Invalid grid dimensions. Please use the format 'rowsxcols' (e.g., 10x10)."
)

logging.info(f"Creating manhattan cartography for {rows}x{cols} grid...")

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Use lazy % formatting in logging functions Note

Use lazy % formatting in logging functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant