Skip to content
Snippets Groups Projects
Commit 302617e9 authored by spmohanty's avatar spmohanty
Browse files

Addresses #30 - Consistently use requirements_dev for specifying the dependencies of the package

parent 05a4fd73
No related branches found
No related tags found
No related merge requests found
...@@ -109,3 +109,4 @@ ENV/ ...@@ -109,3 +109,4 @@ ENV/
images/test/ images/test/
test_save.dat
...@@ -3,6 +3,7 @@ include CONTRIBUTING.rst ...@@ -3,6 +3,7 @@ include CONTRIBUTING.rst
include HISTORY.rst include HISTORY.rst
include LICENSE include LICENSE
include README.rst include README.rst
include requirements_dev.txt
recursive-include tests * recursive-include tests *
recursive-exclude * __pycache__ recursive-exclude * __pycache__
......
...@@ -219,8 +219,8 @@ class TreeObsForRailEnv(ObservationBuilder): ...@@ -219,8 +219,8 @@ class TreeObsForRailEnv(ObservationBuilder):
if possible_transitions[branch_direction]: if possible_transitions[branch_direction]:
new_cell = self._new_position(agent.position, branch_direction) new_cell = self._new_position(agent.position, branch_direction)
branch_observation, branch_visited = self._explore_branch(handle, new_cell, branch_direction, root_observation, branch_observation, branch_visited = \
1) self._explore_branch(handle, new_cell, branch_direction, root_observation, 1)
observation = observation + branch_observation observation = observation + branch_observation
visited = visited.union(branch_visited) visited = visited.union(branch_visited)
else: else:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""The setup script.""" """The setup script."""
import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
with open('README.rst') as readme_file: with open('README.rst') as readme_file:
...@@ -11,11 +11,19 @@ with open('README.rst') as readme_file: ...@@ -11,11 +11,19 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file: with open('HISTORY.rst') as history_file:
history = history_file.read() history = history_file.read()
requirements = ['Click>=6.0', ] # Gather requirements from requirements_dev.txt
# TODO : We could potentially split up the test/dev dependencies later
setup_requirements = ['pytest-runner', ] install_reqs = []
requirements_path = 'requirements_dev.txt'
test_requirements = ['pytest', ] with open(requirements_path, 'r') as f:
install_reqs += [
s for s in [
line.strip(' \n') for line in f
] if not s.startswith('#') and s != ''
]
requirements = install_reqs
setup_requirements = install_reqs
test_requirements = install_reqs
setup( setup(
author="S.P. Mohanty", author="S.P. Mohanty",
......
...@@ -23,7 +23,10 @@ commands = make docs ...@@ -23,7 +23,10 @@ commands = make docs
[testenv:coverage] [testenv:coverage]
basepython = python basepython = python
whitelist_externals = make whitelist_externals = make
commands = make coverage commands =
pip install -U pip
pip install -r requirements_dev.txt
make coverage
[testenv] [testenv]
setenv = setenv =
...@@ -35,6 +38,7 @@ deps = ...@@ -35,6 +38,7 @@ deps =
; -r{toxinidir}/requirements.txt ; -r{toxinidir}/requirements.txt
commands = commands =
pip install -U pip pip install -U pip
pip install -r requirements_dev.txt
py.test --basetemp={envtmpdir} py.test --basetemp={envtmpdir}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment