Skip to content

Commit 0b2c0a7

Browse files
committed
feat: Initial version!
0 parents  commit 0b2c0a7

File tree

13 files changed

+282
-0
lines changed

13 files changed

+282
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__pycache__
2+
build/
3+
dist/
4+
*.egg-info
5+
.ipynb_checkpoints
6+
.build-sentinel

.pylintrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
[MASTER]
3+
4+
ignore = tests
5+
load-plugins=pylint.extensions.docparams,pylint.extensions.docstyle,pylint.extensions.check_elif
6+
7+
8+
[DESIGN]
9+
10+
max-complexity = 10
11+
12+
[FORMAT]
13+
14+
max-line-length = 150
15+
single-line-if-stmt=no
16+
expected-line-ending-format=LF
17+
variable-rgx=[a-z0-9_]{1,30}$
18+
19+
[EXCEPTIONS]
20+
21+
# Exceptions that will emit a warning when being caught. Defaults to
22+
# "Exception"
23+
overgeneral-exceptions=Exception

.versionrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"packageFiles": [
3+
{
4+
"filename": "VERSION",
5+
"type": "plain-text"
6+
}
7+
],
8+
"bumpFiles": [
9+
{
10+
"filename": "VERSION",
11+
"type": "plain-text"
12+
}
13+
]
14+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.formatting.provider": "black"
3+
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# --------------------------------------------------
2+
# standard Makefile preamble
3+
# see https://tech.davis-hansson.com/p/make/
4+
SHELL := bash
5+
.ONESHELL:
6+
.SHELLFLAGS := -eu -o pipefail -c
7+
.DELETE_ON_ERROR:
8+
MAKEFLAGS += --warn-undefined-variables
9+
MAKEFLAGS += --no-builtin-rules
10+
11+
ifeq ($(origin .RECIPEPREFIX), undefined)
12+
$(error Your Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
13+
endif
14+
.RECIPEPREFIX = >
15+
# --------------------------------------------------
16+
17+
build: .build-sentinel
18+
19+
clean:
20+
> rm -rf build
21+
> rm -rf dist
22+
> rm -f .build-sentinel
23+
.PHONY: clean
24+
25+
test:
26+
> pytest tests/
27+
.PHONY: test
28+
29+
push: test build
30+
> twine check dist/*
31+
> twine upload dist/*
32+
.PHONY: push
33+
34+
.build-sentinel: $(shell find matsim/*.py) $(shell find docs/*) README.md setup.py
35+
> rm -rf dist
36+
> python3 setup.py sdist bdist_wheel
37+
> twine check dist/*
38+
> touch $@
39+

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# simwrapper-python-tools
2+
3+
Official python library for working with SimWrapper
4+
5+
SimWrapper is...
6+
7+
## About this library
8+
9+
We are at the very early stages of building this library. The API will change, things will break, and there are certainly bugs. You probably shouldn't use this for anything.
10+
11+
- Our primary goal is to make MATSim play nice with **pandas** and **geopandas**, for data analysis workflows.
12+
- We have only tested this using Anaconda Python. Only Python 3.x is supported.
13+
- Currently MATSim network, event, and plans files are supported. Hopefully more will be coming soon.
14+
- For Geopandas network support, you also need to install `geopandas` and `shapely`.
15+
- Supports JSON and Protobuf event file formats
16+
- Can write MATSim files too!
17+
18+
## Quickstart
19+
20+
1. Install using `pip install matsim-tools`
21+
22+
2. In lieu of real documentation, here is some sample code to get you started. Good luck!

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.99.0

setup.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import pathlib
2+
3+
from setuptools import setup
4+
5+
# The directory containing this file
6+
HERE = pathlib.Path(__file__).parent
7+
8+
# The text of the README file
9+
README = (HERE / "README.md").read_text()
10+
VERSION = (HERE / "VERSION").read_text()
11+
12+
# This call to setup() does all the work
13+
setup(
14+
version=VERSION,
15+
name="simwrapper",
16+
description="Python support library for SimWrapper data visualization tool",
17+
long_description_content_type="text/markdown",
18+
url="https://github.com/simwrapper/simwrapper-python-tools",
19+
author="Billy Charlton",
20+
author_email="billy@okbecause.com",
21+
license="GPLv3",
22+
classifiers=[
23+
"License :: OSI Approved :: GNU General Public License (GPL)",
24+
"Programming Language :: Python :: 3",
25+
],
26+
packages=["simwrapper"],
27+
scripts=['simwrapper/go-simwrapper.py']
28+
install_requires=[
29+
],
30+
extras_require = {
31+
},
32+
tests_require=["assertpy", "pytest"],
33+
entry_points={},
34+
long_description=README,
35+
)

simwrapper/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#from . import Events, Network, Plans, TripEventHandler, writers
2+
3+
#read_network = Network.read_network
4+
#event_reader = Events.event_reader
5+
#plan_reader = Plans.plan_reader

0 commit comments

Comments
 (0)