Skip to content

Commit

Permalink
Merge pull request #582 from ActivitySim/develop
Browse files Browse the repository at this point in the history
Release 1.1
  • Loading branch information
jpn-- authored Aug 12, 2022
2 parents 3df695b + 0412a0b commit f189143
Show file tree
Hide file tree
Showing 1,749 changed files with 66,889 additions and 49,957 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.4
current_version = 1.1.0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>.*))?
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ _test_est
*_local/
*_local.*

**/output/
33 changes: 17 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@ jobs:
- env: TEST_SUITE=activitysim/core

- stage: Examples
name: "MTC Example"
env: TEST_SUITE=activitysim/examples/example_mtc/test
name: "Prototype MTC"
env: TEST_SUITE=activitysim/examples/prototype_mtc/test
- name: "Prototype MTC (Extended)"
env: TEST_SUITE=activitysim/examples/prototype_mtc_extended/test
- name: "Multizone Example"
env: TEST_SUITE=activitysim/examples/example_multiple_zone/test
env: TEST_SUITE=activitysim/examples/placeholder_multiple_zone/test
- name: "Marin Example"
env: TEST_SUITE=activitysim/examples/example_marin/test
env: TEST_SUITE=activitysim/examples/prototype_marin/test
- name: "ARC Example"
env: TEST_SUITE=activitysim/examples/example_arc/test
env: TEST_SUITE=activitysim/examples/prototype_arc/test
- name: "SEMCOG Example"
env: TEST_SUITE=activitysim/examples/example_semcog/test
env: TEST_SUITE=activitysim/examples/prototype_semcog/test
- name: "PSRC Example"
env: TEST_SUITE=activitysim/examples/example_psrc/test
env: TEST_SUITE=activitysim/examples/placeholder_psrc/test
- name: "SANDAG Example"
env: TEST_SUITE=activitysim/examples/example_sandag/test
env: TEST_SUITE=activitysim/examples/placeholder_sandag/test
- name: "SANDAG Cross-Border Example"
env: TEST_SUITE=activitysim/examples/example_sandag_xborder/test
env: TEST_SUITE=activitysim/examples/prototype_sandag_xborder/test

- stage: Estimation Mode
name: "Larch Test"
Expand Down Expand Up @@ -92,12 +94,11 @@ install:
script:
# This is the "default" script used for each test suite, unless overridden with a "script" in the jobs above.
# build 2 and 3 zone test data twice since the Python test code on Linux sees these as different locations
- python activitysim/examples/example_multiple_zone/scripts/two_zone_example_data.py
- python activitysim/examples/example_multiple_zone/scripts/three_zone_example_data.py
- python /home/travis/miniconda/envs/asimtest/lib/python$TRAVIS_PYTHON_VERSION/site-packages/activitysim/examples/example_multiple_zone/scripts/two_zone_example_data.py
- python /home/travis/miniconda/envs/asimtest/lib/python$TRAVIS_PYTHON_VERSION/site-packages/activitysim/examples/example_multiple_zone/scripts/three_zone_example_data.py
# pycodestyle
- pycodestyle activitysim
- python activitysim/examples/placeholder_multiple_zone/scripts/two_zone_example_data.py
- python activitysim/examples/placeholder_multiple_zone/scripts/three_zone_example_data.py
- python /home/travis/miniconda/envs/asimtest/lib/python$TRAVIS_PYTHON_VERSION/site-packages/activitysim/examples/placeholder_multiple_zone/scripts/two_zone_example_data.py
- python /home/travis/miniconda/envs/asimtest/lib/python$TRAVIS_PYTHON_VERSION/site-packages/activitysim/examples/placeholder_multiple_zone/scripts/three_zone_example_data.py
- black --check --diff activitysim
# run specific TEST_SUITE job on travis to avoid job max time
- travis_wait 50 py.test $TEST_SUITE --cov activitysim --cov-report term-missing --durations=0
- coveralls
# coveralls # disable coveralls service, which errors frequently
6 changes: 3 additions & 3 deletions HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
regular test suite takes some time to run, between about half an hour and
two hours depending on the specs of your machine.
```sh
python activitysim/examples/example_multiple_zone/scripts/two_zone_example_data.py
python activitysim/examples/example_multiple_zone/scripts/three_zone_example_data.py
python activitysim/examples/placeholder_multiple_zone/scripts/two_zone_example_data.py
python activitysim/examples/placeholder_multiple_zone/scripts/three_zone_example_data.py
pytest .
```

Expand All @@ -83,7 +83,7 @@
python ../activitysim/examples/scan_examples_for_errors.py .
```
00. Test the notebooks in `activitysim/examples/example_mtc/notebooks`.
00. Test the notebooks in `activitysim/examples/prototype_mtc/notebooks`.
There are also demo notebooks for estimation, but their functionality
is completely tested in the unit tests run previously.
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BSD 3-Clause License

Copyright (c) After March 2016, Contributing Authors
Copyright (c) Before March 2016, UrbanSim Inc
Copyright (c) Association of Metropolitan Planning Organizations Research Foundation

All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ActivitySim
===========

[![Build Status](https://travis-ci.org/ActivitySim/activitysim.svg?branch=master)](https://travis-ci.org/ActivitySim/activitysim)[![Coverage Status](https://coveralls.io/repos/github/ActivitySim/activitysim/badge.svg?branch=master)](https://coveralls.io/github/ActivitySim/activitysim?branch=master)
[![Build Status](https://travis-ci.com/ActivitySim/activitysim.svg?branch=master)](https://travis-ci.org/github/ActivitySim/activitysim)[![Coverage Status](https://coveralls.io/repos/github/ActivitySim/activitysim/badge.svg?branch=master)](https://coveralls.io/github/ActivitySim/activitysim?branch=master)

The mission of the ActivitySim project is to create and maintain advanced, open-source,
activity-based travel behavior modeling software based on best software development
Expand All @@ -15,4 +15,4 @@ and benefit from contributions of other agency partners.

## Documentation

https://activitysim.github.io/activitysim
https://activitysim.github.io/activitysim
4 changes: 2 additions & 2 deletions activitysim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# See full license in LICENSE.txt.


__version__ = '1.0.4'
__doc__ = 'Activity-Based Travel Modeling'
__version__ = "1.1.0"
__doc__ = "Activity-Based Travel Modeling"
4 changes: 1 addition & 3 deletions activitysim/abm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# ActivitySim
# See full license in LICENSE.txt.
from . import misc
from . import tables
from . import models
from . import misc, models, tables
37 changes: 22 additions & 15 deletions activitysim/abm/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

import pandas as pd

from activitysim.core import config
from activitysim.core import inject
from activitysim.core import config, inject

# FIXME
# warnings.filterwarnings('ignore', category=pd.io.pytables.PerformanceWarning)
Expand All @@ -18,26 +17,28 @@
def households_sample_size(settings, override_hh_ids):

if override_hh_ids is None:
return settings.get('households_sample_size', 0)
return settings.get("households_sample_size", 0)
else:
return 0 if override_hh_ids is None else len(override_hh_ids)


@inject.injectable(cache=True)
def override_hh_ids(settings):

hh_ids_filename = settings.get('hh_ids', None)
hh_ids_filename = settings.get("hh_ids", None)
if hh_ids_filename is None:
return None

file_path = config.data_file_path(hh_ids_filename, mandatory=False)
if not file_path:
logger.error("hh_ids file name '%s' specified in settings not found" % hh_ids_filename)
logger.error(
"hh_ids file name '%s' specified in settings not found" % hh_ids_filename
)
return None

df = pd.read_csv(file_path, comment='#')
df = pd.read_csv(file_path, comment="#")

if 'household_id' not in df.columns:
if "household_id" not in df.columns:
logger.error("No 'household_id' column in hh_ids file %s" % hh_ids_filename)
return None

Expand All @@ -47,19 +48,23 @@ def override_hh_ids(settings):
logger.error("No households in hh_ids file %s" % hh_ids_filename)
return None

logger.info("Using hh_ids list with %s households from file %s" %
(len(household_ids), hh_ids_filename))
logger.info(
"Using hh_ids list with %s households from file %s"
% (len(household_ids), hh_ids_filename)
)

return household_ids


@inject.injectable(cache=True)
def trace_hh_id(settings):

id = settings.get('trace_hh_id', None)
id = settings.get("trace_hh_id", None)

if id and not isinstance(id, int):
logger.warning("setting trace_hh_id is wrong type, should be an int, but was %s" % type(id))
logger.warning(
"setting trace_hh_id is wrong type, should be an int, but was %s" % type(id)
)
id = None

return id
Expand All @@ -68,9 +73,11 @@ def trace_hh_id(settings):
@inject.injectable(cache=True)
def trace_od(settings):

od = settings.get('trace_od', None)
od = settings.get("trace_od", None)

if od and not (isinstance(od, list) and len(od) == 2 and all(isinstance(x, int) for x in od)):
if od and not (
isinstance(od, list) and len(od) == 2 and all(isinstance(x, int) for x in od)
):
logger.warning("setting trace_od should be a list of length 2, but was %s" % od)
od = None

Expand All @@ -79,11 +86,11 @@ def trace_od(settings):

@inject.injectable(cache=True)
def chunk_size(settings):
_chunk_size = int(settings.get('chunk_size', 0) or 0)
_chunk_size = int(settings.get("chunk_size", 0) or 0)

return _chunk_size


@inject.injectable(cache=True)
def check_for_variability(settings):
return bool(settings.get('check_for_variability', False))
return bool(settings.get("check_for_variability", False))
76 changes: 40 additions & 36 deletions activitysim/abm/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
# ActivitySim
# See full license in LICENSE.txt.
from . import accessibility
from . import atwork_subtour_destination
from . import atwork_subtour_frequency
from . import atwork_subtour_mode_choice
from . import atwork_subtour_scheduling
from . import auto_ownership
from . import cdap
from . import free_parking
from . import initialize
from . import initialize_tours
from . import initialize_los
from . import joint_tour_composition
from . import joint_tour_destination
from . import joint_tour_frequency
from . import joint_tour_participation
from . import joint_tour_scheduling
from . import location_choice
from . import mandatory_scheduling
from . import mandatory_tour_frequency
from . import non_mandatory_destination
from . import non_mandatory_scheduling
from . import non_mandatory_tour_frequency
from . import parking_location_choice
from . import stop_frequency
from . import tour_mode_choice
from . import tour_od_choice
from . import tour_scheduling_probabilistic
from . import trip_destination
from . import trip_mode_choice
from . import trip_purpose
from . import trip_purpose_and_destination
from . import trip_scheduling
from . import trip_departure_choice
from . import trip_scheduling_choice
from . import trip_matrices
from . import summarize
from . import (
accessibility,
atwork_subtour_destination,
atwork_subtour_frequency,
atwork_subtour_mode_choice,
atwork_subtour_scheduling,
auto_ownership,
cdap,
free_parking,
initialize,
initialize_los,
initialize_tours,
joint_tour_composition,
joint_tour_destination,
joint_tour_frequency,
joint_tour_participation,
joint_tour_scheduling,
location_choice,
mandatory_scheduling,
mandatory_tour_frequency,
non_mandatory_destination,
non_mandatory_scheduling,
non_mandatory_tour_frequency,
parking_location_choice,
stop_frequency,
summarize,
tour_mode_choice,
tour_od_choice,
tour_scheduling_probabilistic,
trip_departure_choice,
trip_destination,
trip_matrices,
trip_mode_choice,
trip_purpose,
trip_purpose_and_destination,
trip_scheduling,
trip_scheduling_choice,
vehicle_allocation,
vehicle_type_choice,
)
Loading

0 comments on commit f189143

Please sign in to comment.