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

tox failed with "ValueError: Can't find the JSON-Schema-Test-Suite directory. Set the 'JSON_SCHEMA_TEST_SUITE' environment variable or run the tests from alongside a checkout of the suite." #104

Closed
lonicerae opened this Issue Aug 30, 2017 · 10 comments

Comments

2 participants
@lonicerae
Copy link

lonicerae commented Aug 30, 2017

Hi,

I try to run tox under the project directory, it failed with:

ValueError: Can't find the JSON-Schema-Test-Suite directory. Set the 'JSON_SCHEMA_TEST_SUITE' environment variable or run the tests from alongside a checkout of the suite.

Could you please help to check it? Thanks!

@lonicerae

This comment has been minimized.

Copy link
Author

lonicerae commented Aug 30, 2017

For more information, please refer to the attachment:

output.txt

@iranzo iranzo self-assigned this Aug 30, 2017

@iranzo

This comment has been minimized.

Copy link
Member

iranzo commented Aug 30, 2017

Hi,
On Fedora 26 works as expected and got also good results for python 2.7 on a RHEL 7 machine I do use for tests.

@lonicerae can you please let me know more details about the host you're running on?

I want to check if there's any missing dependencies that my systems have by default and need to be specified in tox environment file.

Thanks!
Pablo

@lonicerae

This comment has been minimized.

Copy link
Author

lonicerae commented Aug 30, 2017

Hi Pablo,

I'm using RHEL7. The pip list is as follows:

(citellus) [shine@r7prod citellus]$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
configparser (3.5.0)
contextlib2 (0.5.5)
enum34 (1.1.6)
extras (1.0.0)
fixtures (3.0.0)
flake8 (3.4.1)
funcsigs (1.0.2)
functools32 (3.2.3.post2)
jsonschema (2.6.0)
linecache2 (1.0.0)
mccabe (0.6.1)
mock (2.0.0)
pbr (3.1.1)
pip (9.0.1)
py (1.4.34)
pycodestyle (2.3.1)
pyflakes (1.5.0)
pytest (3.2.1)
python-mimeparse (1.6.0)
setuptools (36.3.0)
six (1.10.0)
testresources (2.0.1)
testscenarios (0.5.0)
testtools (2.3.0)
traceback2 (1.4.0)
unittest2 (1.1.0)
virtualenv (15.1.0)
wheel (0.29.0)

Feel free to let me know if you need more information.

Thanks!
Flos

@lonicerae

This comment has been minimized.

Copy link
Author

lonicerae commented Aug 30, 2017

One more thing is that I remove the 'py35' from the envlist as my system doesn't have python3.5 installed:

$ git diff
diff --git a/tox.ini b/tox.ini
index 3ce8bbb..bfb2ad3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,7 @@
 [tox]
 minversion = 2.0
-envlist = pep8, py27, py35
+#envlist = pep8, py27, py35
+envlist = pep8, py27
 skipsdist = True
 
 [testenv]

If i keep the py35 unchanged, the tox will failed with:

$ tox
pep8 create: /tmp/citellus/.tox/pep8
pep8 installdeps: -r/tmp/citellus/requirements.txt, -r/tmp/citellus/test-requirements.txt
pep8 develop-inst: /tmp/citellus
pep8 installed: -e git+https://github.com/zerodayz/citellus.git@2fae7131ef056280dd77dfcc55493be318f4e83f#egg=citellus,click==4.1,configparser==3.5.0,coverage==4.4.1,enum34==1.1.6,flake8==3.4.1,mccabe==0.6.1,py==1.4.34,pycodestyle==2.3.1,pyflakes==1.5.0,pymarkdownlint==0.3.1,pytest==3.2.1,pytest-cov==2.5.1
pep8 runtests: PYTHONHASHSEED='2430175860'
pep8 runtests: commands[0] | flake8
py27 create: /tmp/citellus/.tox/py27
py27 installdeps: -r/tmp/citellus/requirements.txt, -r/tmp/citellus/test-requirements.txt
py27 develop-inst: /tmp/citellus
py27 installed: -e git+https://github.com/zerodayz/citellus.git@2fae7131ef056280dd77dfcc55493be318f4e83f#egg=citellus,click==4.1,configparser==3.5.0,coverage==4.4.1,enum34==1.1.6,flake8==3.4.1,mccabe==0.6.1,py==1.4.34,pycodestyle==2.3.1,pyflakes==1.5.0,pymarkdownlint==0.3.1,pytest==3.2.1,pytest-cov==2.5.1
py27 runtests: PYTHONHASHSEED='2430175860'
py27 runtests: commands[0] | /usr/bin/find . -type f -name *.pyc -delete
py27 runtests: commands[1] | py.test --cov=citellus
============================================================================= test session starts =============================================================================
platform linux2 -- Python 2.7.5, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
rootdir: /tmp/citellus, inifile:
plugins: cov-2.5.1
collected 14 items                                                                                                                                                             

tests/test_citellus.py .........
tests/test_magui.py .....

---------- coverage: platform linux2, python 2.7.5-final-0 -----------
Name                   Stmts   Miss  Cover
------------------------------------------
citellus/__init__.py       0      0   100%
citellus/citellus.py     163     84    48%
citellus/magui.py         94     29    69%
------------------------------------------
TOTAL                    257    113    56%


========================================================================== 14 passed in 0.24 seconds ==========================================================================
py35 create: /tmp/citellus/.tox/py35
ERROR: InterpreterNotFound: python3.5
___________________________________________________________________________________ summary ___________________________________________________________________________________
  pep8: commands succeeded
  py27: commands succeeded
ERROR:   py35: InterpreterNotFound: python3.5
@iranzo

This comment has been minimized.

Copy link
Member

iranzo commented Aug 30, 2017

Hi Flos,
On the EL7 system I do have more packages (as part of default install), but no 'jsonschema' which is the one showing errors.

Would it be possible for you to remove that package and test? (then reinstall it later if needed for other software)

Thanks!

(I was writing this when your new update came in )

@lonicerae

This comment has been minimized.

Copy link
Author

lonicerae commented Aug 30, 2017

Hi Plabo,

It works!!

$ tox
pep8 develop-inst-noop: /tmp/citellus
pep8 installed: -e git+https://github.com/zerodayz/citellus.git@2fae7131ef056280dd77dfcc55493be318f4e83f#egg=citellus,click==4.1,configparser==3.5.0,coverage==4.4.1,enum34==1.1.6,flake8==3.4.1,mccabe==0.6.1,py==1.4.34,pycodestyle==2.3.1,pyflakes==1.5.0,pymarkdownlint==0.3.1,pytest==3.2.1,pytest-cov==2.5.1
pep8 runtests: PYTHONHASHSEED='1461878653'
pep8 runtests: commands[0] | flake8
py27 develop-inst-noop: /tmp/citellus
py27 installed: -e git+https://github.com/zerodayz/citellus.git@2fae7131ef056280dd77dfcc55493be318f4e83f#egg=citellus,click==4.1,configparser==3.5.0,coverage==4.4.1,enum34==1.1.6,flake8==3.4.1,mccabe==0.6.1,py==1.4.34,pycodestyle==2.3.1,pyflakes==1.5.0,pymarkdownlint==0.3.1,pytest==3.2.1,pytest-cov==2.5.1
py27 runtests: PYTHONHASHSEED='1461878653'
py27 runtests: commands[0] | /usr/bin/find . -type f -name *.pyc -delete
py27 runtests: commands[1] | py.test --cov=citellus
============================================================================= test session starts =============================================================================
platform linux2 -- Python 2.7.5, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
rootdir: /tmp/citellus, inifile:
plugins: cov-2.5.1
collected 14 items                                                                                                                                                             

tests/test_citellus.py .........
tests/test_magui.py .....

---------- coverage: platform linux2, python 2.7.5-final-0 -----------
Name                   Stmts   Miss  Cover
------------------------------------------
citellus/__init__.py       0      0   100%
citellus/citellus.py     163     84    48%
citellus/magui.py         94     29    69%
------------------------------------------
TOTAL                    257    113    56%


========================================================================== 14 passed in 0.28 seconds ==========================================================================
___________________________________________________________________________________ summary ___________________________________________________________________________________
  pep8: commands succeeded
  py27: commands succeeded
  congratulations :)

Thanks for your prompt reply!

Cheers,
Flos

@iranzo

This comment has been minimized.

Copy link
Member

iranzo commented Aug 30, 2017

Flos, was this just after removing the py35 part of tox?

Thanks,
Pablo

PD: On our jenkins server we did manually install python3.5 from source but if it fails for you, I can make a comment on the contribution document.

@lonicerae

This comment has been minimized.

Copy link
Author

lonicerae commented Aug 30, 2017

Thanks for your information, Pablo. What I did on my EL7 are:

  1. Newly clone the repo to /tmp.
  2. Remove the py35 from tox.ini
  3. Run tox and get the succeesful message.

BTW, I can bear that keeping the py35 env in the tox.ini of official repo, as I can create a branch for myself with the modification. ;)

@iranzo

This comment has been minimized.

Copy link
Member

iranzo commented Aug 30, 2017

Ok, perfect, closing then this and will put a comment on the citellus contributing guide.

@iranzo

This comment has been minimized.

Copy link
Member

iranzo commented Aug 30, 2017

Proposing update to docs in in https://review.gerrithub.io/376333

@iranzo iranzo closed this Aug 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment