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
Pipeline #589 passed with stage
in 4 minutes and 23 seconds
......@@ -109,3 +109,4 @@ ENV/
images/test/
test_save.dat
......@@ -3,6 +3,7 @@ include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
include README.rst
include requirements_dev.txt
recursive-include tests *
recursive-exclude * __pycache__
......
......@@ -219,8 +219,8 @@ class TreeObsForRailEnv(ObservationBuilder):
if possible_transitions[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,
1)
branch_observation, branch_visited = \
self._explore_branch(handle, new_cell, branch_direction, root_observation, 1)
observation = observation + branch_observation
visited = visited.union(branch_visited)
else:
......
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
"""The setup script."""
import os
from setuptools import setup, find_packages
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:
history = history_file.read()
requirements = ['Click>=6.0', ]
setup_requirements = ['pytest-runner', ]
test_requirements = ['pytest', ]
# Gather requirements from requirements_dev.txt
# TODO : We could potentially split up the test/dev dependencies later
install_reqs = []
requirements_path = 'requirements_dev.txt'
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(
author="S.P. Mohanty",
......
......@@ -23,7 +23,10 @@ commands = make docs
[testenv:coverage]
basepython = python
whitelist_externals = make
commands = make coverage
commands =
pip install -U pip
pip install -r requirements_dev.txt
make coverage
[testenv]
setenv =
......@@ -35,6 +38,7 @@ deps =
; -r{toxinidir}/requirements.txt
commands =
pip install -U pip
pip install -r requirements_dev.txt
py.test --basetemp={envtmpdir}
  • Also fixes a few stray flake8 errors, and tox configurations for more inclusive requirements specifications

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment