Skip to content

Commit 4ccd02e

Browse files
authored
Merge branch 'develop' into flexible_ids
2 parents fa7cc94 + 7ead422 commit 4ccd02e

File tree

269 files changed

+89648
-3721
lines changed

Some content is hidden

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

269 files changed

+89648
-3721
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.4
2+
current_version = 1.1.0
33
commit = True
44
tag = True
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>.*))?

.github/workflows/branch-docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: ActivitySim Branch Docs
2+
# This workflow is provided as a service for forks to build branch-specific documentation.
3+
4+
on: push
5+
6+
jobs:
7+
docbuild:
8+
if: "contains(github.event.head_commit.message, '[makedocs]') && (github.repository_owner != 'ActivitySim') && (github.ref_name != 'develop')"
9+
# develop branch docs are built at the end of the core test workflow, regardless of repository owner or commit message flags
10+
name: ubuntu-latest py3.9
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
shell: bash -l {0}
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
19+
- name: Set up Python 3.9
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.9
23+
- name: Install dependencies
24+
uses: conda-incubator/setup-miniconda@v2
25+
with:
26+
miniforge-variant: Mambaforge
27+
miniforge-version: latest
28+
use-mamba: true
29+
environment-file: conda-environments/docbuild.yml
30+
python-version: 3.9
31+
activate-environment: docbuild
32+
auto-activate-base: false
33+
auto-update-conda: false
34+
- name: Install activitysim
35+
run: |
36+
python -m pip install .
37+
- name: Conda checkup
38+
run: |
39+
conda info -a
40+
conda list
41+
echo REPOSITORY ${{ github.repository }}
42+
echo REF ${{ github.ref }}
43+
echo REF_NAME ${{ github.ref_name }}
44+
- name: Build the docs
45+
run: |
46+
cd docs
47+
make clean
48+
make html
49+
- name: Push to GitHub Pages
50+
uses: peaceiris/[email protected]
51+
with:
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
# Token is created automatically by Github Actions, no other config needed
54+
publish_dir: ./docs/_build/html
55+
destination_dir: ${{ github.ref_name }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import argparse
2+
import copy
3+
import pathlib
4+
5+
import tomli
6+
import tomli_w
7+
8+
9+
def split_path(path, sep="/"):
10+
if isinstance(path, str):
11+
return [part for part in path.split(sep) if part]
12+
else:
13+
return path
14+
15+
16+
def extract(mapping, path, sep="/"):
17+
parts = split_path(path, sep=sep)
18+
cur = mapping
19+
for part in parts:
20+
cur = cur[part]
21+
22+
return cur
23+
24+
25+
def update(mapping, path, value, sep="/"):
26+
new = copy.deepcopy(mapping)
27+
28+
parts = split_path(path, sep=sep)
29+
parent = extract(new, parts[:-1])
30+
parent[parts[-1]] = value
31+
32+
return new
33+
34+
35+
parser = argparse.ArgumentParser()
36+
parser.add_argument("path", type=pathlib.Path)
37+
args = parser.parse_args()
38+
39+
content = args.path.read_text()
40+
decoded = tomli.loads(content)
41+
with_local_scheme = update(
42+
decoded, "tool.setuptools_scm.local_scheme", "no-local-version", sep="."
43+
)
44+
# work around a bug in setuptools / setuptools-scm
45+
with_setuptools_pin = copy.deepcopy(with_local_scheme)
46+
requires = extract(with_setuptools_pin, "build-system.requires", sep=".")
47+
requires[0] = "setuptools>=42,<60"
48+
49+
new_content = tomli_w.dumps(with_setuptools_pin)
50+
args.path.write_text(new_content)

0 commit comments

Comments
 (0)