Closed utdemir closed 3 years ago
LGTM, I waited to merge since I haven't been able to get the nix shell to build. Running into the following error when fetching MarkupSafe:
Yeah, I got that after doing a garbage collection too. Lucky for us, there is an upstream PR already: https://github.com/nix-community/poetry2nix/pull/304 . But until that gets merged and ends up in nixpkgs; I'll hack it.
I fixed the nix issue, so I am merging this.
Lucky for us, there is an upstream PR already
Oh nice, I had checked for issues on poetry2nix but had missed that PR. Thanks!
This PR adds a sample test case using Pytezos, and adds the necessary Nix boilerplate to bring the Python stuff to the environment:
It introduces two top-level directories:
client/
: This is a Python library exporting a functions to deploy checker and other contracts. I think we should evolve this project to also be a command line application which can deploy checker, and possibly interact with a checker instance.e2e/
: Includes the initial e2e test. I think we should keep these as simple as possible (without having too many assertions as we do on tests on the ocaml side), but it is worth checking each entrypoint at least once.It introduces some dependencies:
poetry
to manage Python dependencies (mainlypytezos
anddocker
libraries), and use a single lock file at the root of the project. These are made available on the Nix environment viapoetry2nix
. So, withinnix-shell
, we should just be able to use regularpython
command likepython e2e/main.py
.ctez
repository as a submodule, because the tests needs to deploy it in order to use checkerLligo
andtezos-client
binaries to be in scope, because of thectez
repository mentioned above which requires those in order to compile and deploy ctez. They are already in our Nix environment, so it shouldn't be too much of a problem for Linux users (sorry @purcell).There're some pieces missing, but I would like to merge this and we should address them later on:
cc'ing @0xd34df00d and @dorranh