diff --git a/.travis.yml b/.travis.yml
index fc9ff27..2fd3a39 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,8 +4,8 @@ python:
- "3.5"
- "3.6"
install:
- - pip install yapf
- - pip install -r requirements.txt
- - python setup.py install
+ - pip install pipenv yapf
+ - pipenv install
+ - pipenv run python setup.py install
script:
- yapf --diff --recursive .
diff --git a/Pipfile b/Pipfile
new file mode 100644
index 0000000..d863158
--- /dev/null
+++ b/Pipfile
@@ -0,0 +1,21 @@
+[[source]]
+
+url = "https://pypi.python.org/simple"
+verify_ssl = true
+name = "pypi"
+
+
+[packages]
+
+numpy = "==1.14.2"
+scipy = "==1.0.0"
+six = "==1.11.0"
+Theano = "==1.0.1"
+
+
+[dev-packages]
+
+
+
+[requires]
+
diff --git a/Pipfile.lock b/Pipfile.lock
new file mode 100644
index 0000000..2ca0fc1
--- /dev/null
+++ b/Pipfile.lock
@@ -0,0 +1,92 @@
+{
+ "_meta": {
+ "hash": {
+ "sha256": "482439269d062005ef07c591a2aa6c96bf9dc50f9c26479e456b19861f6e25ff"
+ },
+ "pipfile-spec": 6,
+ "requires": {},
+ "sources": [
+ {
+ "name": "pypi",
+ "url": "https://pypi.python.org/simple",
+ "verify_ssl": true
+ }
+ ]
+ },
+ "default": {
+ "numpy": {
+ "hashes": [
+ "sha256:0739146eaf4985962f07c62f7133aca89f3a600faac891ce6c7f3a1e2afe5272",
+ "sha256:07e21f14490324cc1160db101e9b6c1233c33985af4cb1d301dd02650fea1d7f",
+ "sha256:0f6a5ed0cd7ab1da11f5c07a8ecada73fc55a70ef7bb6311a4109891341d7277",
+ "sha256:0fd65cbbfdbf76bbf80c445d923b3accefea0fe2c2082049e0ce947c81fe1d3f",
+ "sha256:20cac3123d791e4bf8482a580d98d6b5969ba348b9d5364df791ba3a666b660d",
+ "sha256:528ce59ded2008f9e8543e0146acb3a98a9890da00adf8904b1e18c82099418b",
+ "sha256:56e392b7c738bd70e6f46cf48c8194d3d1dd4c5a59fae4b30c58bb6ef86e5233",
+ "sha256:675e0f23967ce71067d12b6944add505d5f0a251f819cfb44bdf8ee7072c090d",
+ "sha256:6be6b0ca705321c178c9858e5ad5611af664bbdfae1df1541f938a840a103888",
+ "sha256:719d914f564f35cce4dc103808f8297c807c9f0297ac183ed81ae8b5650e698e",
+ "sha256:768e777cc1ffdbf97c507f65975c8686ebafe0f3dc8925d02ac117acc4669ce9",
+ "sha256:7f76d406c6b998d6410198dcb82688dcdaec7d846aa87e263ccf52efdcfeba30",
+ "sha256:8c18ee4dddd5c6a811930c0a7c7947bf16387da3b394725f6063f1366311187d",
+ "sha256:99051e03b445117b26028623f1a487112ddf61a09a27e2d25e6bc07d37d94f25",
+ "sha256:a1413d06abfa942ca0553bf3bccaff5fdb36d55b84f2248e36228db871147dab",
+ "sha256:a7157c9ac6bddd2908c35ef099e4b643bc0e0ebb4d653deb54891d29258dd329",
+ "sha256:a958bf9d4834c72dee4f91a0476e7837b8a2966dc6fcfc42c421405f98d0da51",
+ "sha256:bb370120de6d26004358611441e07acda26840e41dfedc259d7f8cc613f96495",
+ "sha256:d0928076d9bd8a98de44e79b1abe50c1456e7abbb40af7ef58092086f1a6c729",
+ "sha256:d858423f5ed444d494b15c4cc90a206e1b8c31354c781ac7584da0d21c09c1c3",
+ "sha256:e6120d63b50e2248219f53302af7ec6fa2a42ed1f37e9cda2c76dbaca65036a7",
+ "sha256:f2b1378b63bdb581d5d7af2ec0373c8d40d651941d283a2afd7fc71184b3f570",
+ "sha256:facc6f925c3099ac01a1f03758100772560a0b020fb9d70f210404be08006bcb"
+ ],
+ "index": "pypi",
+ "version": "==1.14.2"
+ },
+ "scipy": {
+ "hashes": [
+ "sha256:01c7040a83eb4e020ab729488637dcadef54cb728b035b76668ab92a72515d60",
+ "sha256:046705c604c6f1d63cad3e89677c0618b7abb40ed09a4c241c671a2d8e5128a9",
+ "sha256:08041e5336fcd57defcc78650b44b3df652eff3e3a801638d894e50494fb630d",
+ "sha256:1f58fbd59e8d9652759df0d137832ff2a325ed708c173cba20c86589d811c210",
+ "sha256:23a7238279ae94e088396b8b05a9795ef598dc79c5cd1adb91ad1ff87c7514fd",
+ "sha256:3b66d5e40152175bca75cbbfd1eb5c108c50de9ae5625923f1c4f8f51cbe2dea",
+ "sha256:424500b2fe573d30de6dea927076c01acaadb3efb3d1f40340e8cc37151ccf27",
+ "sha256:5774adb6047983489bc81edaa72cd132e665e5680f0b2cf8ea28cd3b99e65d39",
+ "sha256:5964dba6a3c0be226d44d2520de8fb4ba1501768bad57eec687d36d3f53b6254",
+ "sha256:70e6fc3f2f52c9152f05e27eb9bd8543cb862cacb71f8521a571e4ffb837f450",
+ "sha256:87ea1f11a0e9ec08c264dc64551d501fa307289460705f6fccd84cbfc7926d10",
+ "sha256:889602ead28054a15e8c26e1a6b8420d5a4fa777cfeb3ec98cfa52b9f317d153",
+ "sha256:912499ddb521b7ac6287ac4ccf5f296a83d38996c2d04f43c9e62a91f7b420aa",
+ "sha256:97123a25216616723083942eb595f47fee18da6b637a88b803de5f078009003c",
+ "sha256:9bd193686fd837472bdb6425486cb234ed0a4db76b930c141cc8d095ab213c8d",
+ "sha256:a79b99b8b5af9a63312bd053bbb7bdb7710e6bbb9cc81617f9f6b9b1e49c72f8",
+ "sha256:a9e479648aab5f36330da94f351ebbfe79acb4e6f5e6ac6aeddc9291eb096839",
+ "sha256:bf36f3485e7b7291c36330a93bbfd4f5e8db23bbe4ea46c37b2839fef463f4e2",
+ "sha256:cd23894e1cc6eaa00e6807b6b12e4ca66d5ff092986c9c3eb01e97f24e2d6462",
+ "sha256:d84df0bc86bbdd49f0a6b6bad5cd62ccb02a3bfe546bf79263de44ae081bcd7b",
+ "sha256:e3a5673c105eab802fdecb77f102d877352e201df9328698a265b7f57546b34b",
+ "sha256:fa17be6c66985931d3a391f61a6ba97c902585cf26020aa3eb24604115732d22",
+ "sha256:ff8b6637d8d2c074ed67f3d57513e62f94747c6f1210f43e60ad3d8e93a424e4"
+ ],
+ "index": "pypi",
+ "version": "==1.0.0"
+ },
+ "six": {
+ "hashes": [
+ "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
+ "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
+ ],
+ "index": "pypi",
+ "version": "==1.11.0"
+ },
+ "theano": {
+ "hashes": [
+ "sha256:88d8aba1fe2b6b75eacf455d01bc7e31e838c5a0fb8c13dde2d9472495ff4662"
+ ],
+ "index": "pypi",
+ "version": "==1.0.1"
+ }
+ },
+ "develop": {}
+}
diff --git a/README.rst b/README.rst
index 1f9583e..1ba40ed 100644
--- a/README.rst
+++ b/README.rst
@@ -21,6 +21,12 @@ To install, clone and run:
python setup.py install
+You may also install the dependencies with `pipenv` as follows:
+
+.. code-block:: bash
+
+ pipenv install
+
Usage
-----
@@ -32,7 +38,7 @@ After installing, :code:`import` as follows:
You can see the `examples `_ directory for
`Jupyter `_ notebooks to see how common control problems
-can be solved through iLQR.
+can be solved through iLQR.
Dynamics model
^^^^^^^^^^^^^^
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index c53bfff..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-numpy==1.14.0
-scipy==1.0.0
-six==1.11.0
-Theano==1.0.1
diff --git a/setup.py b/setup.py
index 0c2abc7..46034a6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,15 +1,31 @@
#!/usr/bin/env python
+"""iLQR setup."""
import os
-from ilqr import __version__
from setuptools import setup
+from ilqr import __version__
+
def read(fname):
+ """Reads a file's contents as a string.
+
+ Args:
+ fname: Filename.
+
+ Returns:
+ File's contents.
+ """
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-base_url = "https://github.com/anassinator/ilqr"
+BASE_URL = "https://github.com/anassinator/ilqr"
+INSTALL_REQUIRES = [
+ "numpy==1.14.2",
+ "scipy==1.0.0",
+ "six==1.11.0",
+ "Theano==1.0.1",
+]
setup(
name="ilqr",
@@ -19,11 +35,11 @@ def read(fname):
author="Anass Al",
author_email="mr@anassinator.com",
license="GPLv3",
- url=base_url,
- download_url="{}/tarball/{}".format(base_url, __version__),
+ url=BASE_URL,
+ download_url="{}/tarball/{}".format(BASE_URL, __version__),
packages=["ilqr", "ilqr.examples"],
zip_safe=True,
- install_requires=[read("requirements.txt").strip().split("\n")],
+ install_requires=INSTALL_REQUIRES,
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",