Skip to content

Commit 2fc7988

Browse files
author
Billy Charlton
committed
uv pip and events
1 parent 4656cdb commit 2fc7988

File tree

4 files changed

+59
-10
lines changed

4 files changed

+59
-10
lines changed

docs/intro-help.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Then you can start modifying the configuration YAML files to experiment with set
1313

1414
## Asking questions and making suggestions
1515

16-
The best place to ask a question is to file a [GitHub issue here](https://github.com/simwrapper/simwrapper/issues). That way, others can also see the question and eventual responses and answers.
16+
The best place to ask a question is the [SimWrapper discussion board(https://github.com/orgs/simwrapper/discussions) on GitHub. That way, others can also see the question and eventual responses and answers.
1717

18-
- Please label your questions with the label `Question` so we can better filter them from the long list of open bugs and issues.
18+
- Please label your questions with the label `Q&A` if you're looking for help.
1919

2020
## Filing bug reports / issues
2121

docs/intro-running-locally.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
id: running-locally
3+
title: Running it locally
4+
---
5+
6+
If you want to run SimWrapper on your own server or laptop, there are a few ways to do so.
7+
8+
### Install from uv/pip
9+
10+
This is the easiest solution for most of you. SimWrapper is a website, but for ease of of local installation we've also packaged it up as a super simple 'simwrapper' command-line package on the PyPi software repository. You don't need to know Python to use this package.
11+
12+
**Shortest path to a running local installation:**
13+
14+
- Install the [uv software manager](https://docs.astral.sh/uv/getting-started/installation/) which is the most modern Python packaging ecosystem out there.
15+
It is far, far faster and more error-proof than using pip or other methods.
16+
- Run `uv tool install simwrapper` to install simwrapper as a command-line program on your system.
17+
Read the output from the install command; you might need to edit your PATH to include the program.
18+
- Now go to the folder containing the data you want to explore, and run `uv tool run simwrapper`
19+
- That's it! Your site is running at http://localhost:4999
20+
21+
You can upgrade with `uv tool upgrade simwrapper`
22+
23+
**pip**
24+
25+
You can also use pip directly, with `pip install simwrapper`. If you go this route, you should
26+
probably create a virtualenv (venv) and make sure you have a recent version of Python. These extra
27+
steps can be a real pain, especially because the tool has many datascience dependencies which are
28+
difficult to install. Please use `uv` instead, as above :-)
29+
30+
31+
### Use Docker
32+
33+
SimWrapper is available as a built Docker image at https://hub.docker.com/r/simwrapper/app
34+
35+
Let's assume you already know how to use Docker if you are reading this!
36+
37+
- `docker pull simwrapper/app`
38+
- `docker run -p 4999:4999 -v /my/data/folder:/data simwrapper/app`
39+
40+
The `-p` tells docker to listen on port 4999; `-v` links your local folder of files to `/data` in
41+
the container image, where simwrapper will then be able to access them.
42+
43+
44+
### Build the site yourself
45+
46+
Please read the [developer's guide](dev-guide) for full instructions on how to build and run the
47+
site locally.
48+
49+
This should only be necessary if you want to file/fix bugs or add special features for your own
50+
instance. PR's gladly accepted!
51+

docs/matsim-events.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,17 @@ _MATSim event animation_
1010

1111
**The event viewer is under development and is not yet released. We are currently researching the best way to ingest the very large MATSim event files in a streaming manner, in order to produce useful animations or other visualizations from them.**
1212

13-
If you have specific use cases for a MATSim event viewer, please let us know! We would definitely like to add this in the future.
13+
If you have specific use cases for a MATSim event viewer, please let us know! We would definitely like to add this as a full-featured visualization in the near future.
1414

15-
16-
<!--- _Currently, we can load an_ `output_events.xml.gz` _file but it takes a very long time (many minutes for a typical simulation), and then the vehicle animation displays but does not yet have any configuration._
15+
_Currently, we can load an_ `output_events.xml.gz` _file but it loads a bit slowly, and then the vehicle animation displays but does not yet have any configuration._
1716

1817
_This is a technology test; feel free to try it out. We will hopefully update it to be more featureful soon._
1918

2019

2120
## Usage
2221

23-
If the file `output_events.xml.gz` exists in a folder, the events viewer panel will be available. There is no YAML configuration available.
24-
25-
Event animations cannot be embedded in a dashboard.
22+
- Go to the "Files" tab of any SimWrapper file browser or dashboard page.
23+
- If the file `*output_events.xml.gz` exists in a folder, the events viewer panel will be available. There is no YAML configuration available.
2624

25+
Event animations cannot be embedded in a dashboard yet.
2726

28-
-->

website/sidebars.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"doc": {
3-
"Introduction": ["index", "examples", "file-management", "help"],
3+
"Introduction": ["index", "examples", "file-management", "running-locally", "help"],
44
"Guides": [
55
"guide-getting-started",
66
"guide-dashboards-from-code",

0 commit comments

Comments
 (0)