Skip to content

Issues running code #1

@ChrisJefferson

Description

@ChrisJefferson

While there is a .gitmodules file, if I do a fresh clone I can't get the submodule to be initalized, no matter what I do.

I explictly wrote

git submodule add https://github.com/tias/cppy.git -b tseitin -- cppy

Which adds a new commit which looks like:

% git diff HEAD~1
diff --git a/cppy b/cppy
new file mode 160000
index 0000000..676c290
--- /dev/null
+++ b/cppy
@@ -0,0 +1 @@
+Subproject commit 676c29048bbf9f486b89aa4fb8e04ac5a472f9eb

After this, I had a bit of trouble running the 'simple_explanations.py' from jair, due to path issues finding 'pyexplain' (a clear command to run might be useful!), after those were fixed I get stuck by:

Traceback (most recent call last):
  File "/Users/caj/files/reps/cp/ocus-explain/jair2023/code/examples/simple_explanations.py", line 5, in <module>
    from pyexplain.explain.parallel_greedy_incr_naive_explain import ParallelGreedyIncrNaiveExplain
  File "/Users/caj/files/reps/cp/ocus-explain/jair2023/code/pyexplain/explain/parallel_greedy_incr_naive_explain.py", line 2, in <module>
    from pyexplain.explain.csp_explain import CSPExplain
  File "/Users/caj/files/reps/cp/ocus-explain/jair2023/code/pyexplain/explain/csp_explain.py", line 112
    assert all(True if abs(lit) in U else False for lit in I0), f"Part of supplied literals not in U (user variables): {lit for lit in I if lit not in U}"

I can fix that with some square brackets (as I couldn't find the version of python where this worked? I'm happy to install it if you can tell me)

But then I get stuck as python can't find cppy, and I'm not positive how to make sure all the code can find each other?

Do you have a script that will run the commands?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions