Skip to content

Commit

Permalink
Merge pull request #267 from AkshatBajaj/test/update-setup
Browse files Browse the repository at this point in the history
TEST: Remove dependency on setup.py test as it is deprecated
  • Loading branch information
ScottyB committed Jan 4, 2021
2 parents c37b7c9 + 3f1abf4 commit 4cf896e
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 22 deletions.
34 changes: 19 additions & 15 deletions codefresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ steps:
# Go inside the surround library
- cd surround

# Install surround
- python3 setup.py install
# Remove generated tox directory
- rm -rf .tox

# Run tests
- python3 setup.py test
# Install tox
- pip install tox==3.20.1

# Run pylint tests
- pip install pylint==2.4.3
- pylint setup.py
- find surround/ -iname "*.py" | xargs pylint
# Run tests through tox
- tox

test_cli:
title: "Test Surround CLI"
Expand All @@ -52,17 +50,17 @@ steps:
# Go inside the cli
- cd surround_cli

# Install surround
- python3 setup.py install
# Remove generated tox directory
- rm -rf .tox

# Run tests
- python3 setup.py test
# Install tox
- pip install tox==3.20.1

# Run pylint tests
- pylint setup.py
- find surround_cli/ -iname "*.py" | xargs pylint
# Run tests through tox
- tox

# Run examples
- python setup.py install
- cd ..
- find examples/ -iname "*.py" | xargs pylint
- ls examples/ | xargs -n 1 -I '{}' python3 examples/'{}'/main.py
Expand All @@ -79,6 +77,9 @@ steps:
commands:
- cd surround

# Remove generated files from last release
- rm -rf dist

# Install required packages
- python3 -m pip install --user --upgrade setuptools wheel twine

Expand Down Expand Up @@ -107,6 +108,9 @@ steps:
commands:
- cd surround_cli

# Remove generated files from last release
- rm -rf dist

# Install required packages
- python3 -m pip install --user --upgrade setuptools wheel twine

Expand Down
1 change: 1 addition & 0 deletions surround/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include VERSION
include requirements.txt
include surround/*.yaml
1 change: 0 additions & 1 deletion surround/requirements-test.txt

This file was deleted.

7 changes: 1 addition & 6 deletions surround/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
with open("requirements.txt") as f:
INSTALL_REQUIRES = f.read().split("\n")

with open("requirements-test.txt") as f:
TESTS_REQUIRES = f.read().split("\n")

setup(name='surround',
version=VERSION,
description='Surround is a framework for serving machine learning pipelines in Python.',
Expand All @@ -23,8 +20,6 @@
packages=[
'surround'
],
test_suite='surround.tests',
license="BSD-3-Clause License",
zip_safe=False,
install_requires=INSTALL_REQUIRES,
tests_require=TESTS_REQUIRES)
install_requires=INSTALL_REQUIRES)
13 changes: 13 additions & 0 deletions surround/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tox]
envlist = py36, py38
skip_missing_interpreters = True

[testenv]
deps =
pylint==2.4.3

# run the tests
commands =
python -m unittest discover -p "*_test.py"
pylint setup.py
pylint surround
1 change: 1 addition & 0 deletions surround_cli/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include VERSION
include requirements.txt
include surround/visualise/*.html.txt
include surround/experiment/web/*.html
include surround/experiment/web/*.ico
Expand Down
11 changes: 11 additions & 0 deletions surround_cli/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
envlist = py36, py38
skip_missing_interpreters = True

[testenv]

# run the tests
commands =
python -m unittest discover -p "*_test.py"
pylint setup.py
pylint surround

0 comments on commit 4cf896e

Please sign in to comment.