Skip to content

Commit ccc9770

Browse files
committed
deploy: 2e5f732
1 parent 81d64c7 commit ccc9770

File tree

298 files changed

+30273
-36025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+30273
-36025
lines changed

develop/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 67a20199e7194cae59a31d6b222bc052
3+
config: f02da933e5ef1e2e6b3a237e0efef7ea
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

develop/_sources/dev-guide/build-docs.md.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,16 @@ them into html as well. ActivitySim's docstrings are written in
1515
## Building the Documentation
1616

1717
Developers who want to test a build of the ActivitySim documentation locally can
18-
do so using `sphinx`. A pre-packaged conda environment is available to simplify this
19-
process. On the command line, starting from the `activitysim` directory that constitutes the
20-
main repository (i.e. you should see subdirectories including `activitysim`,
21-
`conda-environments`, `docs`, and a few others) run these commands:
18+
do so using `sphinx`. The *uv* `dev` environment includes the required dependencies. On the command line, starting from the `activitysim` directory that constitutes the
19+
main repository (i.e. you should see subdirectories including `activitysim`, `docs`, and a few others) run these commands:
2220

2321
```bash
24-
mkdir -p ../.env
25-
mamba env update -p ../.env/DOCBUILD -f conda-environments/docbuild.yml
26-
conda activate ../.env/DOCBUILD
2722
cd docs
2823
make clean
2924
make html
3025
```
3126

32-
This will build the docs in the `docs/_build/html` directory. They can be viewed
27+
This will build the docs in the `docs/_build/html` directory. They can be viewed
3328
in a web browser using the `file:///` protocol, or by double-clicking on the
3429
`index.html` file (or any other .html file in that directory).
3530

Lines changed: 9 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,20 @@
11
(developer-installation)=
22
# Developer Installation
33

4-
Installing ActivitySim as a developer is almost as easy as just using it,
5-
but making some tweaks to the processes enables live code development and
6-
testing.
7-
8-
## Package Manager
9-
10-
ActivitySim has a lot of dependencies. It's easiest and fastest to install
11-
them using a package manager like conda, or its faster and free sibling
12-
[Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).
13-
Depending on your security settings, you might need to install in a
14-
container like docker, instructions for that are coming soon.
15-
16-
Note that if you are installing `mamba`, you only should install `mamba`
17-
in the *base* environment. If you install `mamba` itself in other environments,
18-
it will not function correctly. If you've got an existing conda installation
19-
and you want to install mamba into it, you can install mamba into the *base*
20-
environment like this:
21-
22-
```sh
23-
conda update conda -n base
24-
conda install -n base -c conda-forge mamba
25-
```
26-
27-
While you are at it, if you are a Jupyter user you might want to also install
28-
`nb_conda_kernels` in your base conda environment alongside any other `jupyter`
29-
libraries:
30-
31-
```sh
32-
mamba install -n base nb_conda_kernels -c conda-forge
33-
```
34-
35-
This will ensure your development environments are selectable as kernels in
36-
Jupyter Notebook/Lab/Etc.
37-
38-
## Environment
39-
40-
It's convenient to start from a completely clean conda environment
41-
and git repository. Assuming you have `mamba` installed, and you
42-
want to install in a new directory called "workspace" run:
43-
44-
```sh
45-
mkdir workspace
46-
cd workspace
47-
mamba env create -p ASIM-ENV --file https://raw.githubusercontent.com/ActivitySim/activitysim/main/conda-environments/activitysim-dev-base.yml
48-
conda activate ./ASIM-ENV
49-
git clone https://github.com/ActivitySim/sharrow.git
50-
python -m pip install -e ./sharrow
51-
git clone https://github.com/ActivitySim/activitysim.git
52-
python -m pip install -e ./activitysim
53-
```
54-
55-
Note the above commands will create an environment with all the
56-
necessary dependencies, clone both ActivitySim and sharrow from GitHub,
57-
and `pip install` each of these libraries in editable mode, which
58-
will allow your code changes to be reflected when running ActivitySim
59-
in this environment.
4+
Installing ActivitySim as a developer is as easy as just using it with *uv*.
605

616
Depending on what you are working on, you may want to check out a branch
62-
other than `develop`. To do so, you can point the `git switch` command
63-
above to any other existing branch name. If you want to start an new
7+
other than the default `main`. To do so, you can use a `git switch` command
8+
to any other existing branch name. If you want to start an new
649
branch, first create it with `git branch cool-new-feature` and then switch
6510
to it with `git switch cool-new-feature`.
6611

67-
Now your environment should be ready to use. Happy coding!
12+
By default, *uv* installs projects in editable mode, such that changes to the
13+
source code are immediately reflected in the environment.
6814

6915
```{important}
70-
If you add to the ActivitySim dependencies, make sure to also update
71-
the environments in `conda-environments`, which are used for testing
72-
and development.
16+
If you add to the ActivitySim dependencies during development or remove, make
17+
sure to use the `uv add` and `uv remove` commands so that the `pyproject.toml`
18+
and `uv.lock` files are updated correctly and your virtual environment is
19+
updated.
7320
```

develop/_sources/users-guide/example_models.rst.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,25 +2985,24 @@ Running the model
29852985

29862986
To run the example, do the following:
29872987

2988-
* Activate the correct conda environment if needed
29892988
* View the list of available examples
29902989

29912990
::
29922991

2993-
activitysim create --list
2992+
uv run activitysim create --list
29942993

29952994
* Create a local copy of an example folder
29962995

29972996
::
29982997

2999-
activitysim create --example prototype_mtc --destination my_test_example
2998+
uv run activitysim create --example prototype_mtc --destination my_test_example
30002999

30013000
* Run the example
30023001

30033002
::
30043003

30053004
cd my_test_example
3006-
activitysim run -c configs -d data -o output
3005+
uv run activitysim run -c configs -d data -o output
30073006

30083007

30093008
* ActivitySim will log progress and write outputs to the output folder.
@@ -3019,7 +3018,7 @@ The example should run in a few minutes since it runs a small sample of househol
30193018

30203019
::
30213020

3022-
python simulation.py
3021+
uv run simulation.py
30233022

30243023
.. _multiprocess_example :
30253024

@@ -3032,7 +3031,7 @@ include the multiprocessing configuration settings via settings file inheritance
30323031

30333032
::
30343033

3035-
activitysim run -c configs_mp -c configs -d data -o output
3034+
uv run activitysim run -c configs_mp -c configs -d data -o output
30363035

30373036
The multiprocessing example also writes outputs to the output folder.
30383037

develop/_sources/users-guide/model_anatomy.rst.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,15 @@ Examples
110110

111111
To run the two zone and three zone system examples, do the following:
112112

113-
* Activate the correct conda environment if needed
114113
* Create a local copy of the example
115114

116115
::
117116

118117
# simple two zone example
119-
activitysim create -e placeholder_2_zone -d test_placeholder_2_zone
118+
uv run activitysim create -e placeholder_2_zone -d test_placeholder_2_zone
120119

121120
# simple three zone example
122-
activitysim create -e placeholder_3_zone -d test_placeholder_3_zone
121+
uv run activitysim create -e placeholder_3_zone -d test_placeholder_3_zone
123122

124123

125124
* Change to the example directory
@@ -128,11 +127,11 @@ To run the two zone and three zone system examples, do the following:
128127
::
129128

130129
# simple two zone example
131-
activitysim run -c configs_2_zone -c configs -d data_2 -o output_2
130+
uv run activitysim run -c configs_2_zone -c configs -d data_2 -o output_2
132131

133132
# simple three zone example, single process and multiprocess (and makes use of settings file inheritance for running)
134-
activitysim run -c configs_3_zone -c configs -d data_3 -o output_3 -s settings_static.yaml
135-
activitysim run -c configs_3_zone -c configs -d data_3 -o output_3 -s settings_mp.yaml
133+
uv run activitysim run -c configs_3_zone -c configs -d data_3 -o output_3 -s settings_static.yaml
134+
uv run activitysim run -c configs_3_zone -c configs -d data_3 -o output_3 -s settings_mp.yaml
136135

137136
Settings
138137
~~~~~~~~
@@ -421,7 +420,7 @@ alternatives, coefficients, constants and other settings for each model. For mor
421420
Outputs
422421
-------
423422

424-
The key output of ActivitySIm is the HDF5 data pipeline file ``output\pipeline.h5``. This datastore by default contains
423+
The key output of ActivitySim is the HDF5 data pipeline file ``output\pipeline.h5``. This datastore by default contains
425424
a copy of each data table after each model step in which the table was modified. The exact fields for each set of outputs will be different for various implementations of ActivitySim.
426425

427426

develop/_sources/users-guide/model_dev.rst.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,18 @@ Example
5757

5858
To run the estimation example, do the following:
5959

60-
* Activate the correct conda environment if needed
6160
* Create a local copy of the estimation example folder
6261

6362
::
6463

65-
activitysim create -e example_estimation_sf -d test_example_estimation_sf
64+
uv run activitysim create -e example_estimation_sf -d test_example_estimation_sf
6665

6766
* Run the example
6867

6968
::
7069

7170
cd test_example_estimation_sf
72-
activitysim run -c configs_estimation/configs -c configs -o output -d data_sf
71+
uv run activitysim run -c configs_estimation/configs -c configs -o output -d data_sf
7372

7473

7574
* ActivitySim should log some information and write outputs to the output folder, including EDBs for each submodel. The estimation example runs for about 15 minutes and writes EDBs for 2000 households.
@@ -92,13 +91,11 @@ Additional settings for running ActivitySim in estimation mode are specified in
9291
Estimation Notebooks
9392
~~~~~~~~~~~~~~~~~~~~
9493

95-
ActivitySim includes a `Jupyter Notebook <https://jupyter.org>`__ recipe book with interactive re-estimation examples for each estimatable submodel. To run a Jupyter notebook, do the following:
94+
ActivitySim includes a `Jupyter Notebook <https://jupyter.org>`__ recipe book with interactive examples.
9695

97-
* Open a conda prompt and activate the conda environment with ActivitySim installed
98-
* If needed, ``conda install jupyterlab`` so you can run jupyter notebooks
99-
* Type ``jupyter notebook`` to launch the web-based notebook manager
100-
* Navigate to the ``examples/examples_estimaton/notebooks`` folder and select a notebook from the table below
101-
* Save the updated coefficient file(s) to the configs folder and run the model in simulation mode
96+
* To start JupyterLab, from the ActivitySim project directory run ``uv run jupyter lab``. This will start the JupyterLab server and pop up a browser window with the interactive development environment.
97+
* Navigate to the ``examples/examples_estimaton/notebooks`` folder and select a notebook from the table below.
98+
* Save the updated coefficient file(s) to the configs folder and run the model in simulation mode.
10299

103100
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
104101
| Example | Notebook |

0 commit comments

Comments
 (0)