-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from UDST/travis-setup
[0.1.dev18] Installation improvements and continuous integration
- Loading branch information
Showing
9 changed files
with
100 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
language: python | ||
|
||
python: | ||
- '2.7' | ||
- '3.5' | ||
- '3.6' | ||
|
||
matrix: | ||
include: | ||
- python: '3.7' # temp solution until python 3.7 is more cleanly supported | ||
dist: xenial | ||
sudo: true | ||
allow_failures: | ||
- python: '3.7' # dependencies are blocking installation | ||
fast_finish: true | ||
|
||
install: | ||
- pip install git+git://github.com/udst/choicemodels.git | ||
- pip install . | ||
- pip install -r requirements-full.txt | ||
- pip install -r requirements-dev.txt | ||
- pip list | ||
- pip show urbansim_templates | ||
|
||
script: | ||
- cd urbansim_templates/tests | ||
- coverage run --source urbansim_templates --module pytest --verbose | ||
|
||
after_success: | ||
- coverage report --show-missing | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[![Build Status](https://travis-ci.org/UDST/urbansim_templates.svg?branch=master)](https://travis-ci.org/UDST/urbansim_templates) | ||
[![Coverage Status](https://coveralls.io/repos/github/UDST/urbansim_templates/badge.svg?branch=master)](https://coveralls.io/github/UDST/urbansim_templates?branch=master) | ||
|
||
# UrbanSim Templates | ||
|
||
UrbanSim Templates defines a common structure for new model steps and provides a core set of flexible templates and related tools. The goal is to enable smoother model setup, easier code reuse, and improvements to task orchestration. | ||
|
@@ -9,17 +12,31 @@ UrbanSim Templates is currently in pre-release. API documentation is in the Pyth | |
|
||
## Installation | ||
|
||
You can follow the setup instructions in [UAL/urbansim_parcel_bayarea](https://github.com/ual/urbansim_parcel_bayarea) to create a conda environment with everything you need for working in the UrbanSim Templates ecosystem. | ||
It can be helpful to set up a dedicated Python environment for working on UrbanSim projects, for reproducibility and to avoid conflicts with other projects. MORE INFO TK. | ||
|
||
### Production releases | ||
|
||
Coming soon to pip and conda. | ||
|
||
If you already have most of it installed, this should be sufficient: | ||
### Development releases | ||
|
||
The latest development release can be installed using the Github URL. These currently require having a development release of ChoiceModels as well, which you should install first. | ||
|
||
``` | ||
pip install git+git://github.com/udst/choicemodels.git | ||
pip install git+git://github.com/udst/urbansim_templates.git | ||
``` | ||
|
||
### Cloning the repository | ||
|
||
If you will be editing the library code or frequently updating to newer development versions, you can clone the repository and link it to your Python environment: | ||
|
||
``` | ||
git clone https://github.com/udst/urbansim_templates.git | ||
cd urbansim_templates | ||
python setup.py develop | ||
``` | ||
|
||
|
||
## Bug reports | ||
|
||
Open an issue, or contact Sam ([email protected]). | ||
|
@@ -104,3 +121,5 @@ ModelManager works directly with the current versions of [UrbanSim](https://gith | |
- Shared template functionality is in `utils.py`. There's also a `TemplateStep` parent class in `shared.py`, but this hasn't worked very well; see [issue #38](https://github.com/UDST/urbansim_templates/issues/38). | ||
|
||
- We don't have design patterns yet for templates whose final output is to _generate_ DataFrames or Series, rather than modifying existing ones, but we're working on it. | ||
|
||
- To avoid dependency bloat, the default installation only includes the external libraries required for core model management and the most commonly used templates. Templates using additional libraries should check whether they're installed before fitting or running a model step, and provide helpful error messages if not. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# requirements for development and testing | ||
|
||
coverage | ||
coveralls | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# additional requirements for less-used templates | ||
|
||
pylogit >= 0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# minimal requirements for model management and core templates | ||
|
||
choicemodels >= 0.2.dev4 | ||
numpy >= 1.14 | ||
orca >= 1.4 | ||
pandas >= 0.22 | ||
patsy >= 0.4 | ||
statsmodels >= 0.8 | ||
urbansim >= 3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version = __version__ = '0.1.dev17' | ||
version = __version__ = '0.1.dev17' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.coverage | ||
__pycache__/* |