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

Route choice additions #508

Merged
merged 36 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2efc8ef
Fix minor typos (#505)
jamiecook Feb 5, 2024
a23270f
Processing with chunking
Feb 5, 2024
ccc0d68
Merge branch 'develop' of github.com:AequilibraE/aequilibrae into ped…
Feb 5, 2024
560728f
.
Feb 6, 2024
608141a
.
Feb 6, 2024
99fc49d
.
Feb 6, 2024
0e668a9
Scratch parquet work
Jake-Moss Feb 6, 2024
2e3c234
Merge pull request #507 from AequilibraE/pedro/improves_dependencies
janzill Feb 6, 2024
85fdb12
Better structuring for the table
Jake-Moss Feb 7, 2024
eecaaa3
Add optional immediately disk saving
Jake-Moss Feb 12, 2024
945e8a9
Test fixes
Jake-Moss Feb 12, 2024
e3ea0c6
Update CI workflows
Jake-Moss Feb 12, 2024
4c39a8b
Move pyarrow to a hard dependency for now
Jake-Moss Feb 12, 2024
f18d13c
Linting
Jake-Moss Feb 12, 2024
9ad188b
CI again
Jake-Moss Feb 12, 2024
6c79a17
Warn about duplicate OD pairs, fix memory corruption, disable A*
Jake-Moss Feb 13, 2024
d3677b6
Fix path order
Jake-Moss Feb 14, 2024
b5ed6a4
Add link penalisation
Jake-Moss Feb 14, 2024
738a657
Linting
Jake-Moss Feb 14, 2024
7d15ef0
Add parallelised sparse frequency implementation and test
Jake-Moss Feb 15, 2024
1543549
Remove debug test
Jake-Moss Feb 16, 2024
31aaaad
Add route cost computation and test
Jake-Moss Feb 16, 2024
71257eb
Add psl gamma computation, not sure what to test against
Jake-Moss Feb 16, 2024
7688d75
Add scratch probability implementation
Jake-Moss Feb 16, 2024
b0627e4
Fix probability calculations
Jake-Moss Feb 19, 2024
8c46115
The great refactor, batch probability computations to dump to disk
Jake-Moss Feb 20, 2024
1f195b8
Revert "Update CI workflows"
Jake-Moss Feb 20, 2024
b44721e
Move the pyarrow symlink creation to setup.py
Jake-Moss Feb 20, 2024
ab37eaf
CI
pedrocamargo Feb 20, 2024
0df7565
.
pedrocamargo Feb 20, 2024
ccb9cfa
.
pedrocamargo Feb 20, 2024
9fe62b8
OSM importer speedup (#506)
pedrocamargo Feb 23, 2024
77edeae
Simply bumping up the version for the next release (#512)
pedrocamargo Feb 25, 2024
d5e1121
Merge remote-tracking branch 'origin/develop' into route_choice_saving
Jake-Moss Feb 27, 2024
0bb151b
Squashed commit of the following:
Jake-Moss Feb 27, 2024
28bfe7d
Re-enable CI
Jake-Moss Feb 27, 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
76 changes: 0 additions & 76 deletions .github/workflows/build_linux.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/build_mac.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build

on: [pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_all:
needs: [build_wheels, make_sdist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
46 changes: 0 additions & 46 deletions .github/workflows/build_windows.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/debug_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
pip install -e .

- name: Runs test
run: python -m pytest
run: python -m pytest
10 changes: 5 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Documentation

on:
push:
branches:
- develop
pull_request:
release:
push:
branches:
- develop
pull_request:
release:

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_linux_with_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:

- name: Generate coverage report
run: |
python3 -m pytest --cov=aequilibrae tests/
python3 -m pytest --cov=aequilibrae tests/
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ jobs:
python setup.py build_ext --inplace

- name: Runs test
run: python -m pytest
run: python -m pytest
3 changes: 2 additions & 1 deletion __version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# When updating the version, one must also update the docs/source/_static/switcher.json file
version = 1.0
minor_version = "0"
minor_version = "1"
release_name = "Rio de Janeiro"

release_version = f"{version}.{minor_version}"
4 changes: 0 additions & 4 deletions aequilibrae/distribution/gravity_application.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import glob
import importlib.util as iutil
import logging
import os
import tempfile
Expand All @@ -15,9 +14,6 @@
from aequilibrae.distribution.synthetic_gravity_model import SyntheticGravityModel
from aequilibrae.matrix import AequilibraeMatrix, AequilibraeData

spec = iutil.find_spec("openmatrix")
has_omx = spec is not None


class GravityApplication:
"""Applies a synthetic gravity model.
Expand Down
4 changes: 0 additions & 4 deletions aequilibrae/distribution/ipf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import importlib.util as iutil
import os
from datetime import datetime
from time import perf_counter
Expand All @@ -12,9 +11,6 @@
from aequilibrae.matrix import AequilibraeMatrix, AequilibraeData
from aequilibrae.project.data.matrix_record import MatrixRecord

spec = iutil.find_spec("openmatrix")
has_omx = spec is not None


class Ipf:
"""Iterative proportional fitting procedure
Expand Down
18 changes: 2 additions & 16 deletions aequilibrae/matrix/aequilibrae_matrix.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import functools
import importlib.util as iutil
import os
import tempfile
import uuid
Expand All @@ -11,13 +10,10 @@

import numpy as np
import pandas as pd
import openmatrix as omx
from scipy.sparse import coo_matrix

# Checks if we can display OMX
spec = iutil.find_spec("openmatrix")
has_omx = spec is not None
if has_omx:
import openmatrix as omx

# CONSTANTS
VERSION = 1 # VERSION OF THE MATRIX FORMAT
Expand Down Expand Up @@ -54,9 +50,7 @@
# Offset: 18 + 50*cores + Y*20 | 18 + 50*cores + Y*20 + Y*zones*8 |


matrix_export_types = ["Aequilibrae matrix (*.aem)", "Comma-separated file (*.csv)"]
if has_omx:
matrix_export_types.append("Open matrix (*.omx)")
matrix_export_types = ["Open matrix (*.omx), Aequilibrae matrix (*.aem)", "Comma-separated file (*.csv)"]


class AequilibraeMatrix(object):
Expand Down Expand Up @@ -336,10 +330,6 @@ def robust_name(input_name: str, max_length: int, forbiden_names: List[str]) ->
if trial_name not in forbiden_names:
return trial_name

if not has_omx:
print("Open Matrix is not installed. Cannot continue")
return

if compressed:
raise Warning("Matrix compression not yet supported")

Expand Down Expand Up @@ -788,10 +778,6 @@ def export(self, output_name: str, cores: List[str] = None):
"""
fname, file_extension = os.path.splitext(output_name.upper())

if file_extension == ".OMX":
if not has_omx:
raise ValueError("Open Matrix is not installed. Cannot continue")

if file_extension not in [".AEM", ".CSV", ".OMX"]:
raise NotImplementedError(f"File extension {file_extension} not implemented yet")

Expand Down
Loading
Loading