Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST: Remove dependency on setup.py test as it is deprecated #267

Merged
merged 2 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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