-
Notifications
You must be signed in to change notification settings - Fork 39
Conversation
This is also to confirm with @leolara, but my understanding is that Chiquito Python code (non examples) should be in |
.gitignore
Outdated
@@ -1,3 +1,6 @@ | |||
/target | |||
/Cargo.lock | |||
.vscode | |||
.env | |||
__pycache__ | |||
*.so |
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.
Entirely cosmetic but we typically add one empty line to end of file.
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.
cosmetic haha
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.
Actually, in some edge cases it can lead to unnecessary git conflicts when several people changes the last lines of the file. So we have this rule of always ending all files with an empty line
README.md
Outdated
### Install chiquito with pip | ||
|
||
```bash | ||
pip install chiquito | ||
``` | ||
|
||
### Build from source | ||
|
||
In the root of this repo run | ||
|
||
```bash | ||
python -m venv .env | ||
source .env/bin/activate | ||
pip install maturin | ||
maturin develop | ||
``` |
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.
Thanks for adding this!
Are "install chiquito with pip" and "build from source" considered two different methods for installation or two steps of installation?
To confirm, after pip install chiquito
, is rust_chiquito
directly accessible from chiquito.rust_chiquito
or requires maturin develop
? My guess is the latter.
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.
It's either to install, pip package will be available for python user, maturin develop
is only for who want to build from source/develop.
Will make it clear
examples/fibonacci.py
Outdated
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.
Note that I've updated the example in the PyChiquito repo, but we can focus on getting the structure working before porting over the latest PyChiquito updates.
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.
Note to self: there are also some python comments that I should delete once we have this merged.
src/python.rs
Outdated
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.
Again, my understanding is that this file plus pychiquito.rs
should go into src/frontend/python/mod.rs
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.
Yes, that is the spec of the task, if that is possible, i would like it to be there
Let wait for Leo to reach the agreement for the structure then I will reorg accordingly. |
the content of frontend/pychiquito.rs together with this PR src/pyton.rs should be in frontend/python/mod.rs |
Yes, when I have said frontend/python, I meant src/frontend/python |
It was my mistake, I put it wrong in the issue, I have corrected it now. |
FYI, we should also add a |
👍 |
Dont merge yet but please see how it look |
@trangnv we usually let the contributor to merge once approved |
@trangnv I think it is missing:
|
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.
Excellent!!
@trangnv It is approved, merge it please |
👍 |
Resolve #82
scr/python.rs
contains Python Modulefrontend/python/chiquito
is home for python-sourcepyproject.toml
so users don't have topip install py_ecc
fibonacci.py
to examples