-
Notifications
You must be signed in to change notification settings - Fork 28
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 code fails - rdflib 3.2.0 #1
Comments
Thanks for raising this - it has prompted me to make some adjustments to the FuXi repos. I've removed support for rdflib2.4.X because Chimezie recommends his "layercake" fork if you are running with rdflib 2. I've also trimmed the Python version support to 2.6 and above, at least for the time being. I have tightened FuXi's dependency on rdflib to >2 and corrected the omission of a dependency on rdfextras, which I have set to the GitHub rdfextras repository code. You should have better results if you follow this path (virtualenv usually gives the best experience):: $ git clone git://github.com/RDFLib/FuXi.git
$ cd FuXi If you want to tinker with the FuXi code, you can install as "python setup.py develop" if you first make a soft-link from ./lib to ./FuXi. Otherwise, just:: $ python setup.py install This should trigger the installation of rdfextras-0.2-dev, rdflib==3.0.2 , pyparsing1.5.6 and isodate 0.4.7 If you want to run the tests (recommended): $ pip install nose
$ nosetests The results should match the console output of the Hudson Python 2.7 continuous integration build, e.g. http://bel-epa.com/hudson/job/FuXi/TOXENV=py27/4/console To run all the tests in testOwl.py, you'll need to download the approved test files. $ cd test/OWL
$ wget http://www.w3.org/2002/03owlt/approved.zip
$ unzip approved.zip
$ cd ..
$ python testOwl.py Locally (Ubuntu 11.10 Python 2.7), all but one of the approved tests are passing. HTH. Graham |
Hi there, I can't seem to run setup.py install. I tried two different versions of Python 2.7 (2.7.2 and 2.7.3), but the setup fails because the correct version of rdfextras (0.2-dev) is somehow not available. I have checked out the describe-fix branch of rdfextras, and that seems to provide the right version, so setup.py install actually terminates without errors. But nosetests fails, and also testOWL.py under test. What should I do? |
Hi. FuXi currently isn't compatible with rdflib 3+ see earlier thread: Chime Ogbuji On Tuesday, October 23, 2012 at 9:31 PM, lucag wrote:
|
Chimezie: but this is the issue tracker for Graham's FuXi fork that SHOULD support rdflib >3 I guess the issue is that rdfextras has actually seen "releases" - so that now there exists an rdfextras 0.3 available from pypi among other places. Updating the setup.py to refer to rdfextras 0.3 without any download location should "just work". I wont actually make the change though - since I know nothing about FuXi, maybe Graham will drop by and make sure it's ok? lucag: if you try to edit it locally and it works, please report back! |
Hey everybody, thank you all for your prompt response! So, I tried, as gromgull suggested, to change the required library (setup.py:79), and re-ran the tests. Unfortunately nosetests fails: [... FuXi] $ nosetests 2>&1 | egrep -i "error|fail" Ideas? Thanks a lot! |
I have to admit that I'm in two minds whether to remove this fork from the github RDFLib organisation space because it's verging on the unsupportable or whether to keep it around because of its unique status as a Python-native reasoner for RDFLib. I would welcome comments/opinions on the matter. Attempting an RDFLib3-compatible version was an experimental venture for me in the first place. I consider a Python-native reasoning package to be potentially a hugely valuable addition to RDFLib's capability and I was concerned not to let the code simply fall by the wayside for lack of basic TLC. What I find promising about the RDFLib3-compat version is, given the following doctest in a file "footest.py":
The command "./.tox/pypy/bin/nosetests --with-doctest footest.py" produces:
So that's FuXi running under PyPy. It also runs under Python3.2 and Python3.3. On the minus side, the main problem is that in many places the original development of the FuXi codebase had outstripped the docstrings/tests and the resultant failure "noise" makes it very difficult to assess how much work is likely to be involved in bringing (at least) the docstrings/tests up to date as part of a comprehensive test suite that can be successfully executed against an RDFLib3-compatible codebase. For anyone interested in deep-diving into the FuXi-under-RDFLib3 test suite, I strongly recommend checking the current test output against the screed of test results produced by a virtualenv instance of a pukka "layercake" distro (Python 2.5.2, rdflib2.4.1/2), as recommended on http://code.google.com/p/fuxi/. FTR, I've included the "layercake" test output in a separate follow-up comment. Note, the FuXi test suite runner is specific to the package, unittest-only and unsuitable for testing with "nosetests", the test output can be reproduced with "python test/suite.py". (It would appear that some of the test failures have been extant for some time. For example, googling for the 'NON_LINEAR_MS_QUERY' complained about in "NameError: name 'NON_LINEAR_MS_QUERY' is not defined" reveals no references other than the test code itself.) |
Test output from layercake:
|
Slightly different results from the RDFLib3-compat codebase:
|
I have recently started to use FuXi and I had problems installing it following the instruction in FuXi website. Finally I installed it using the FuXi_master in GitHub. Now I want to run the test code but the testOWL.py returns no module named Collection. could anyone help me to either fix it or find a clean version of the FuXi. I am really in urgent need of a python based reasoner for my work. |
Yes, Collection is required, e.g. But it is provided by RDFLib: from rdflib.collection import Collection https://rdflib.readthedocs.org/en/latest/apidocs/rdflib.html#module-rdflib.collection Try with the latest version of RDFLib. |
Tests are all passing for Python 2.6, 2.7, 3.3, 3.4 & PyPy |
The following code fails (in the test directory):
Traceback (most recent call last):
File "testOWL.py", line 6, in
from FuXi.Rete import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/init.py", line 1, in
from Network import ReteNetwork, InferredGoal
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/Network.py", line 18, in
from Util import xcombine
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/Util.py", line 5, in
from FuXi.Rete.AlphaNode import AlphaNode
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/AlphaNode.py", line 3, in
from RuleStore import N3Builtin
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/FuXi-1.3.production-py2.7.egg/FuXi/Rete/RuleStore.py", line 11, in
from rdflib.Graph import QuotedGraph, Graph
ImportError: No module named Graph
I saw that, when I installed this library, rdflib 3.2.0 is installed. Is this correct?
The text was updated successfully, but these errors were encountered: