-
Notifications
You must be signed in to change notification settings - Fork 4
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
a nix
build and testing infra
#10
base: v8.13
Are you sure you want to change the base?
Conversation
If the nix stuff works we'll have made a lot of progress on #1, but not enough to close it. Still, in an upcoming push I changed |
Python version of #7 is in an upcoming push. |
lmao, |
@quinn-dougherty , what is the error message? Note that
Note that dune exec doesn't build any other stuff needed for the python3 call. I bet that's the problem! So for example, In the dune world this is fixed by letting dune manage the tests, so you have something like:
This is cool as this way your test suite can be run incrementally! How to best integrate this into python, I'm unsure. |
ok that's good info. I'm being careful to run it after the dune build. quinn@Latitude-3340:~/Dropbox/Projects/misc-coq/pycoq$ dune exec -- python3 test/py/unit/spec.py
Traceback (most recent call last):
File "test/py/unit/spec.py", line 1, in <module>
import pycoq
File "/home/quinn/.local/lib/python3.8/site-packages/pycoq/__init__.py", line 9, in <module>
dll = PyDLL(f"{curdir}/pycoq.so", RTLD_GLOBAL)
File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/quinn/.local/lib/python3.8/site-packages/pycoq/pycoq.so: cannot open shared object file: No such file or directory |
Can we maybe pass test files to |
Up to us indeed, but actually it is not that hard to make pytest work, usually the way people integrate this is to add a dune rule for running pytest. This way you can ensure a) the correct deps are built and b) the test suite is run in a hygineic mode, and some other features of dune such as different profiles are used. So a rule like that would be (need to fix the paths)
|
@ejgallego I should take a break, but perhaps you can provide the git remote add quinn git@github.com:quinn-dougherty/pycoq.git
git fetch quinn |
Makefile
Outdated
flake8 . | ||
# pytype . # haven't gotten `dune` to work with this yet. | ||
# `dune` doesn't work with `pytest` yet. | ||
# dune exec -- python3 test/py/property/spec.py # module state blocks property tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be workaroundable if I import coq
from inside a pytest.fixture
.
dune exec -- flake8 . | ||
# dune exec -- pytype . | ||
dune build test/py/unit/spec.py test/py/property/spec.py | ||
dune exec -- python3 _build/default/test/py/unit/spec.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you may want to put this inside a dune rule, actually Dune 3 supports directory targets so that would work pretty nicely I think? Depends on what the targets are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 3 in 087d3e9
(:test-dir py) |
This has conflicts, we follow Coq policy here w.r.t. rebasing / squashing, see https://github.com/coq/coq/blob/master/CONTRIBUTING.md |
Had a quick look despite the conflicts, thanks! I think we have a few unrelated things here, I suggest we cherry-pick them to their own PR, a some of them are ready:
|
Roger, can make a bunch of smaller PRs. Did the whole rebase process but I'm right back to square one, it's as if I didn't do anything. also |
You probably didn't do a true rebase, because I don't see a force-push operation here. You should probably reset hard to fc0ba5e and do it again. Furthermore, I suggest that you squash fixup commits with the commits that they are supposed to fix before rebasing, otherwise, you risk a lot of pain. |
TODO:
pytest
stuff.