Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f2d81c9
handle dev versions of Larch
jpn-- Dec 23, 2024
146b2e3
test stability
jpn-- Dec 23, 2024
62c317b
Merge commit '8bccf2f1bfdbb8bc555a246e43f3889352a019b9' into estimati…
jpn-- Dec 27, 2024
fd2bed2
pin multimethod < 2.0
jpn-- Dec 27, 2024
f2b9715
add availability_expression
jpn-- Jan 28, 2025
1c27b6e
starting est docs
jpn-- Jan 28, 2025
bf64b7b
Resolve package version conflicts (#923)
yueshuaing Feb 25, 2025
39c5e12
GitHub Actions updates (#926)
jpn-- Mar 5, 2025
8e17c61
trace proto tables if available, otherwise synthetic population (#901)
dhensle Mar 5, 2025
9991fce
release instructions (#927)
jpn-- Mar 5, 2025
51f45cb
Merge commit '9991fce105f5fd7256358ce1d565c066992c98e3' into estimati…
jpn-- Mar 5, 2025
3c1cd59
when no unavailability parameters are included
jpn-- Mar 6, 2025
07310d2
some general estimation docs
jpn-- Mar 6, 2025
4abb86f
Use pandas 2 for docbuild environment (#928)
jpn-- Mar 6, 2025
258e5ee
Update HOW_TO_RELEASE.md
jpn-- Mar 17, 2025
c59dc4c
refactor(shadow_pricing.py): remove a duplicated `default_segment_to_…
asiripanich Mar 18, 2025
f901cbf
Merge commit 'c59dc4cdf66e3f53816b00ca28fdbc2ca4fd0c8a' into estimati…
jpn-- Mar 31, 2025
537d9df
fix typo
jpn-- Mar 31, 2025
be5d093
fixing disaggregate accessibility bug in zone sampler
aletzdy Mar 19, 2024
de6d0ef
Revert "fixing disaggregate accessibility bug in zone sampler"
i-am-sijia Apr 3, 2025
0c056aa
notes on size terms
jpn-- Apr 9, 2025
57b848b
clean up docbuild
jpn-- Apr 9, 2025
e490760
Merge branch 'main' into estimation_enhancements
jpn-- Apr 9, 2025
f1cc233
fix version check
jpn-- Apr 13, 2025
8182ffa
add some doc
jpn-- Apr 14, 2025
4a6fd54
tidy
jpn-- Apr 14, 2025
d04cd46
estimation docs
jpn-- Apr 14, 2025
2499db5
more on alternative avail
jpn-- Apr 15, 2025
c629b32
model evaluation
jpn-- Apr 15, 2025
8eed534
add doc on component_model
jpn-- Apr 15, 2025
a6e8a0e
documentation enhancements
jpn-- May 1, 2025
31a43db
larch6 is now larch>6
jpn-- May 9, 2025
44ae846
branch docs on workflow_dispatch
jpn-- May 13, 2025
b24d44a
missing doc section on model respec
jpn-- May 13, 2025
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
12 changes: 6 additions & 6 deletions .github/workflows/branch-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:

jobs:
docbuild:
if: "contains(github.event.head_commit.message, '[makedocs]') && (github.repository_owner != 'ActivitySim') && (github.ref_name != 'develop')"
if: "github.event_name == 'workflow_dispatch' || (contains(github.event.head_commit.message, '[makedocs]') && (github.repository_owner != 'ActivitySim') && (github.ref_name != 'develop'))"
# develop branch docs are built at the end of the core test workflow, regardless of repository owner or commit message flags
name: ubuntu-latest py3.10
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
shell: bash -l {0}
Expand All @@ -19,12 +21,10 @@ jobs:
with:
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing

- name: Setup Mambaforge
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
python-version: "3.10"
activate-environment: docbuild
auto-activate-base: false
Expand All @@ -40,7 +40,7 @@ jobs:
id: cache

- name: Update environment
run: mamba env update --verbose -n docbuild -f conda-environments/docbuild.yml
run: conda env update --verbose -n docbuild -f conda-environments/docbuild.yml
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
Expand All @@ -62,7 +62,7 @@ jobs:
make html

- name: Push to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Token is created automatically by Github Actions, no other config needed
Expand Down
52 changes: 41 additions & 11 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ on:
branches:
- '*'

workflow_dispatch:

env:
CACHE_NUMBER: 2 # increase to reset cache manually
CACHE_NUMBER: 0 # increase to reset cache manually

jobs:
foundation:
Expand All @@ -29,9 +31,13 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: asim-test
python-version: ${{ matrix.python-version }}
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ matrix.python-version }}

- name: Set cache date for year and month
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
Expand Down Expand Up @@ -112,9 +118,13 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: asim-test
python-version: ${{ matrix.python-version }}
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ matrix.python-version }}

- name: Set cache date for year and month
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
Expand Down Expand Up @@ -193,7 +203,11 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ env.python-version }}

Expand Down Expand Up @@ -279,7 +293,11 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ env.python-version }}

Expand Down Expand Up @@ -340,7 +358,11 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ env.python-version }}

Expand Down Expand Up @@ -390,7 +412,11 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
activate-environment: asim-test
python-version: ${{ env.python-version }}

Expand All @@ -409,7 +435,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'

- name: Install Larch v6
run: python -m pip install larch6
run: python -m pip install "larch>=6"

- name: Install activitysim
# installing without dependencies is faster, we trust that all needed dependencies
Expand Down Expand Up @@ -465,7 +491,7 @@ jobs:
uses: ts-graphviz/setup-graphviz@v2

- name: Install Larch v6
run: python -m pip install larch6 "pandas<2" pydot
run: python -m pip install "larch>=6" "pandas<2" pydot

- name: Install activitysim
# installing without dependencies is faster, we trust that all needed dependencies
Expand Down Expand Up @@ -541,9 +567,11 @@ jobs:

develop-docbuild:
needs: foundation
if: github.ref_name == 'main'
if: github.ref_name == 'main' || github.ref_name == 'docs-fix'
name: develop-docbuild
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
shell: bash -l {0}
Expand All @@ -559,6 +587,8 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
mamba-version: "2.0.5"
conda-remove-defaults: true
environment-file: conda-environments/docbuild.yml
python-version: "3.10"
activate-environment: docbuild
Expand All @@ -584,7 +614,7 @@ jobs:
make clean
make html
- name: Push to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Token is created automatically by Github Actions, no other config needed
Expand Down
110 changes: 41 additions & 69 deletions HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
# How to issue an ActivitySim release

> **WARNING: These instructions are incomplete.**

01. Check that the branch you intend to release is passing tests on Travis.
If it's not passing there you should not release it.
00. Check that the main branch is passing tests, especially the "core tests" on
[GitHub Actions](https://github.com/ActivitySim/activitysim/actions/workflows/core_tests.yml).
It is generally the policy that the main branch should always be passing tests,
becuase PRs must pass tests before they can be merged. However, it is
possible that tests may fail after a PR is merged, so it is important to
double-check that the main branch is passing tests before issuing a release.

00. Start from a completely clean conda environment
and git repository. Assuming you have `conda` installed, you can do so
by starting where ActivitySim is not yet cloned (e.g. in an empty
directory) and running:
```sh
conda create -n TEMP-ASIM-DEV python=3.10 git gh -c conda-forge --override-channels
conda activate TEMP-ASIM-DEV
conda create -p ./TEMP-ASIM-DEV python=3.10 git gh -c conda-forge --override-channels
conda activate ./TEMP-ASIM-DEV
gh auth login # <--- (only needed if gh is not logged in)
gh repo clone ActivitySim/activitysim
cd activitysim
```

00. Per project policy, code on the main branch should have been released,
but if you are *preparing* a release then the code should be on the `develop`
branch. Switch to that branch now, and make sure it is synced to the
version on GitHub:
```sh
git switch develop
git pull
```

00. Update your Conda environment for testing. We do not want to use an
existing environment on your machine, as it may be out-of-date
existing environment on your machine, as it may be out-of-sync
and we want to make sure everything passes muster using the
most up-to-date dependencies available. The following command
dependencies as they are available today. The following command
will update the active environment (we made this to be `TEMP-ASIM-DEV`
if you followed the directions above).
```sh
Expand All @@ -48,7 +41,7 @@
black --check --diff .
```

00. Run the regular test suite on Windows. Most GitHub Actions tests are done on Linux,
00. Run the regular test suite on Windows. Most GitHub Actions tests are done on
Linux (it's faster to start up and run a new clean VM for testing) but most
users are on Windows, and the test suite should also be run on Windows to
ensure that it works on that platform as well. If you
Expand All @@ -67,7 +60,7 @@
```

00. Test the full-scale regional examples. These examples are big, too
large to run on Travis, and will take a lot of time (many hours) to
large to run on GitHub Actions, and will take a lot of time (many hours) to
download and run.
```sh
mkdir tmp-asim
Expand All @@ -88,75 +81,54 @@
There are also demo notebooks for estimation, but their functionality
is completely tested in the unit tests run previously.

00. Use bump2version to tag the release commit and update the
version number. The following code will generate a "patch" release,
incrementing the third value in the version number (i.e. "1.2.3"
becomes "1.2.4"). Alternatively, make a "minor" or "major" release.
The `--list` command will generate output to your console to confirm
that the old and new version numbers are what you expect, before you
push the commit (with the changed version in the code) and tags to
GitHub.
```sh
bump2version patch --list
```

It is also possible to make a development pre-release. To do so,
explicitly set the version number to the next patch plus a ".devN"
suffix:

00. Tag the release commit with the new version number. ActivitySim uses
dynamic versioning, so the version number is not stored in a file but
is instead read from the most recent git tag, so it is important to tag
the repository with the correct version. The following command will
generate a new tag with the version number "1.2.3" (for example):
```sh
bump2version patch --new-version 1.2.3.dev0 --list
```

Then, when ready to make a "final" release, set the version by
explicitly removing the suffix:
```sh
bump2version patch --new-version 1.2.3 --list
git -a v1.2.3 -m "Release v1.2.3"
Copy link

Copilot AI Mar 31, 2025

Choose a reason for hiding this comment

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

The git command for tagging a release appears to be incorrect. It should likely use 'git tag -a v1.2.3 -m "Release v1.2.3"' instead of 'git -a v1.2.3 -m "Release v1.2.3"'.

Suggested change
git -a v1.2.3 -m "Release v1.2.3"
git tag -a v1.2.3 -m "Release v1.2.3"

Copilot uses AI. Check for mistakes.
```

00. Push the tagged commit to GitHub.
```sh
git push --tags
```

00. For non-development releases, open a pull request to merge the proposed
release into main. The following command will open a web browser for
you to create the pull request.
```sh
gh pr create --web
```
After creating the PR, confirm with the ActivitySim PMC that the release
is ready before actually merging it.

Once final approval is granted, merge the PR into main. The presence
of the git tags added earlier will trigger automated build steps to
prepare and deploy the release to pypi and conda-forge.

00. Create a "release" on GitHub.
00. Create a "release" on GitHub. You can do this from the command line using
the `gh` command line tool:
```sh
gh release create v1.2.3
```
But it may be easier to do this through the
[GitHub web interface](https://github.com/ActivitySim/activitysim/releases/new),
where you can select the tag you just created and add a title and description.
Both the interactive command line tool shown above and the web interface include
the ability to create release notes automatically from the commit messages of
all accepted PRs since the last release, but you may want to add additional
notes to the release to highlight important changes or new features.

The process of creating and tagging a release will automatically
trigger various GitHub Actions scripts to build, test, and publish the
new release to PyPI and conda forge, assuming there are no errors.

For a development pre-release, include the `--prerelease` argument.
As the project's policy is that only formally released code is merged
to the main branch, any pre-release should also be built against a
non-default branch. For example, to pre-release from the `develop`
branch:
```sh
gh release create v1.2.3.dev0 \
--prerelease \
--target develop \
--notes "this pre-release is for a cool new feature" \
--title "Development Pre-Release"
```
00. If the dependencies of ActivitySim have changed, also be sure to update the
dependencies of the conda-forge [recipe](https://github.com/conda-forge/activitysim-feedstock/tree/main/recipe).
If the dependencies of ActivitySim have not changed, the conda-forge version
of ActivitySim should auto-update within a few hours of making the release on
Github.

00. Build the ActivitySim Standalone Windows Installer. This is done using
GitHub Actions, but it is not done automatically when a release is created,
instead it requires a manual workflow dispatch trigger. You can do this by
going to the [build_installer workflow page](https://github.com/ActivitySim/activitysim/actions/workflows/build_installer.yml)
and clicking on the "Run workflow" button. You will need to provide the
version number and choose to add the built installer to the release.

00. Clean up your workspace, including removing the Conda environment used for
testing (which will prevent you from accidentally using an old
environment when you should have a fresh up-to-date one next time).
```sh
conda deactivate
conda env remove -n TEMP-ASIM-DEV
conda env remove -p ./TEMP-ASIM-DEV
```
3 changes: 0 additions & 3 deletions activitysim/abm/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

@workflow.cached_object
def households_sample_size(state: workflow.State, override_hh_ids) -> int:

if override_hh_ids is None:
return state.settings.households_sample_size
else:
Expand All @@ -27,7 +26,6 @@ def households_sample_size(state: workflow.State, override_hh_ids) -> int:

@workflow.cached_object
def override_hh_ids(state: workflow.State) -> np.ndarray | None:

hh_ids_filename = state.settings.hh_ids
if hh_ids_filename is None:
return None
Expand Down Expand Up @@ -65,7 +63,6 @@ def override_hh_ids(state: workflow.State) -> np.ndarray | None:

@workflow.cached_object
def trace_od(state: workflow.State) -> tuple[int, int] | None:

od = state.settings.trace_od

if od and not (
Expand Down
1 change: 0 additions & 1 deletion activitysim/abm/models/auto_ownership.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def auto_ownership_simulate(
# - preprocessor
preprocessor_settings = model_settings.preprocessor
if preprocessor_settings:

locals_d = {}
if constants is not None:
locals_d.update(constants)
Expand Down
Loading
Loading