Skip to content

Commit

Permalink
Merge pull request #812 from camsys/main
Browse files Browse the repository at this point in the history
Infrastructure Updates
  • Loading branch information
jpn-- authored Feb 28, 2024
2 parents 64cacd2 + 5e6795e commit 2f9afa0
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 91 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/config-testpypi-version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import argparse
import copy
import pathlib
Expand Down Expand Up @@ -44,7 +46,7 @@ def update(mapping, path, value, sep="/"):
# work around a bug in setuptools / setuptools-scm
with_setuptools_pin = copy.deepcopy(with_local_scheme)
requires = extract(with_setuptools_pin, "build-system.requires", sep=".")
requires[0] = "setuptools>=42,<60"
# requires[0] = "setuptools>=42,<60"

new_content = tomli_w.dumps(with_setuptools_pin)
args.path.write_text(new_content)
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ jobs:
develop-docbuild:
needs: foundation
if: github.ref_name == 'develop'
if: github.ref_name == 'main'
name: develop-docbuild
runs-on: ubuntu-latest
defaults:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: 3.9
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: 3.9
python-version: "3.10"
- uses: actions/download-artifact@v3
with:
name: releases
Expand Down Expand Up @@ -89,18 +89,18 @@ jobs:
with:
name: releases
path: dist
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"
- name: Install dependencies
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
environment-file: conda-environments/docbuild.yml
python-version: 3.9
python-version: "3.10"
activate-environment: docbuild
auto-activate-base: false
auto-update-conda: false
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ name: Test to PyPI
on:
push:
branches:
- 'main'
- 'develop'
- main
workflow_dispatch:

# no need for concurrency limits

jobs:
build-artifacts:
runs-on: ubuntu-latest
if: github.repository == 'ActivitySim/activitysim'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.9"
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -56,7 +55,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.9"
python-version: "3.10"
- uses: actions/download-artifact@v3
with:
name: releases
Expand All @@ -78,4 +77,4 @@ jobs:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true
verbose: true
2 changes: 1 addition & 1 deletion HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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.9 git gh -c conda-forge --override-channels
conda create -n 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
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ ActivitySim

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

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
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
practices for distribution at no charge to the public.

The ActivitySim project is led by a consortium of Metropolitan Planning Organizations
(MPOs) and other transportation planning agencies, which provides technical direction
and resources to support project development. New member agencies are welcome to join
the consortium. All member agencies help make decisions about development priorities
and benefit from contributions of other agency partners.
The ActivitySim project is led by a consortium of Metropolitan Planning Organizations
(MPOs) and other transportation planning agencies, which provides technical direction
and resources to support project development. New member agencies are welcome to join
the consortium. All member agencies help make decisions about development priorities
and benefit from contributions of other agency partners.

:fire: The `main` branch of this repository contains the Consortium's latest
in-development codebase. It is not necessarily what you'll get if you install released
code from conda-forge or by downloading one of the "release" versions here on GitHub,
but it is generally expected that code in the `main` branch should be usable.
:fire: The `main` branch of this repository contains the Consortium's latest
in-development codebase. It is not necessarily what you'll get if you install released
code from conda-forge or by downloading one of the "release" versions here on GitHub,
but it is generally expected that code in the `main` branch should be usable.

## Helpful Links

- [AMPO Research Foundation](https://research.ampo.org/#research)
- [Documentation](https://activitysim.github.io/activitysim)
- [Releases](https://github.com/ActivitySim/activitysim/releases)
- [Documentation](https://activitysim.github.io/activitysim)
- [Releases](https://github.com/ActivitySim/activitysim/releases)
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"outputs": [],
"source": [
"!conda create -n asim python=3.9 activitysim -c conda-forge --override-channels"
"!conda create -n asim python=3.10 activitysim -c conda-forge --override-channels"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions conda-environments/activitysim-dev-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ dependencies:
- scikit-learn = 1.2.*
- simwrapper > 1.7
- snakeviz # for profiling
- sparse
- sphinx = 6.1.*
- sphinx_rtd_theme = 1.2.*
- sphinx-argparse = 0.4.*
Expand Down
1 change: 1 addition & 0 deletions conda-environments/activitysim-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies:
- sharrow >= 2.6.0
- simwrapper > 1.7
- snakeviz # for profiling
- sparse
- sphinx = 6.1.*
- sphinx_rtd_theme = 1.2.*
- sphinx-argparse = 0.4.*
Expand Down
1 change: 1 addition & 0 deletions conda-environments/docbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies:
- scikit-learn >= 1.1
- sharrow >= 2.6.0
- simwrapper > 1.7
- sparse
- sphinx-argparse
- sphinx-autosummary-accessors
- sphinx-copybutton
Expand Down
1 change: 1 addition & 0 deletions conda-environments/github-actions-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ dependencies:
- scikit-learn = 1.2.*
- sharrow >= 2.6.0
- simwrapper > 1.7
- sparse
- xarray = 2023.2.*
- zarr = 2.14.*
- zstandard
8 changes: 4 additions & 4 deletions docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ home installation folder, such as:
3. Create a conda environment (basically a Python install just for this project)
using conda Prompt (on Windows) or the terminal (macOS or Linux)::

mamba create -n asim python=3.9 activitysim -c conda-forge --override-channels
mamba create -n asim python=3.10 activitysim -c conda-forge --override-channels

This command will create the environment and install all the dependencies
required for running ActivitySim. It is only necessary to create the environment
once per machine, you do not need to (re)create the environment for each session.
If you would also like to install other tools or optional dependencies, it is
possible to do so by adding additional libraries to this command. For example::

mamba create -n asim python=3.9 activitysim jupyterlab larch -c conda-forge --override-channels
mamba create -n asim python=3.10 activitysim jupyterlab larch -c conda-forge --override-channels

This example installs a specific version of Python, version 3.9. A similar
This example installs a specific version of Python, version 3.10. A similar
approach can be used to install specific versions of other libraries as well,
including ActivitySim, itself. For example::

mamba create -n asim python=3.9 activitysim=1.0.2 -c conda-forge --override-channels
mamba create -n asim python=3.10 activitysim=1.0.2 -c conda-forge --override-channels

Additional libraries can also be installed later. You may want to consider these
tools for certain development tasks::
Expand Down
2 changes: 1 addition & 1 deletion other_resources/installer/construct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ channels:
- conda-forge

specs:
- python 3.9.*
- python 3.10.*
- conda
- activitysim {{ version }}
- pip
54 changes: 52 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,52 @@
[build-system]
requires = [
"setuptools>=42,<64",
"setuptools>=69",
"wheel",
"setuptools_scm[toml]>=7.0",
"setuptools_scm>=8.0",
]
build-backend = "setuptools.build_meta"

[project]
name = "activitysim"
dynamic = ["version"]
dependencies = [
"cytoolz >= 0.8.1",
"numba >= 0.55.2",
"numpy >= 1.16.1",
"openmatrix >= 0.3.4.1",
"orca >= 1.6",
"pandas >= 1.4, <2",
"platformdirs",
"psutil >= 4.1",
"pyarrow >= 2.0",
"pydantic >= 2.6",
"pypyr >= 5.3",
"pyyaml >= 5.1",
"requests >= 2.7",
"scikit-learn >= 1.1",
"sharrow >= 2.6",
"simwrapper > 1.7",
"sparse",
"tables >= 3.5.1",
"xarray >= 0.21"
]
readme = "README.md"
requires-python = ">=3.10"

[project.scripts]
activitysim = "activitysim.cli.main:main"
activitysim_checksums = "activitysim.cli.create:display_sha256_checksums"

[tool.setuptools.packages.find]
exclude = [
"other*", "test*",
"activitysim/estimation/test*",
"activitysim/abm/test*",
"activitysim/cli/test*",
"activitysim/core/test*",
"activitysim/abm/models/util/test*",
]

[tool.setuptools_scm]
fallback_version = "999"
write_to = "activitysim/_generated_version.py"
Expand Down Expand Up @@ -36,6 +77,15 @@ tb = "native"
[tool.ruff]
select = ["E", "F", "B", "UP", "TID"]
line-length = 140
exclude = [
".git",
"__pycache__",
"docs/_build",
"docs/conf.py",
"**/__sharrowcache__",
"other_resources/",
"sandbox/"
]

[tool.ruff.isort]
known-first-party = ["activitysim"]
Expand Down
49 changes: 0 additions & 49 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

0 comments on commit 2f9afa0

Please sign in to comment.