-
Notifications
You must be signed in to change notification settings - Fork 42
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
Overhaul Python common package build #421
Overhaul Python common package build #421
Conversation
This looks like a great start! I'll have to spend more time with the CMakefile to understand all the ins & outs of what you're doing there. One other note... should we consider packaging the SWIG files separately? that is, move them out of the python directory tree into one of their own and keep the python tree strictly python? (and maybe combine it with the client tree) |
One thing I would really like to see from this... can we get to where we can build the packages without the virtual environment in place? Clearly we need the dependencies to run, but do we need them to build? This is part of pushing for a clean separation between the build, install, configure and run phases. |
I'll look into this, because agreed, it would be nice to separate out the different phases more cleanly. |
88818a7
to
7104c8d
Compare
"viewBackgroundColor": "#ffffff" | ||
}, | ||
"files": {} | ||
} |
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.
is there a particular reason to include this? have you checked license implications?
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 provides the definitions for the figures. In case they need to be edited later down the line, anyone should be able to open them up in an Excalidraw editor. As far as I can tell, the editor is licensed under MIT, and their terms say that content created in their editor belongs to the creator. Happy to remove these files.
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.
Is Excalidraw a common tool? I've never heard of it. Any reason not to make them something more commonly used (google draw?). Or maybe i'm just way behind the times.
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.
I think excalidraw is actually being used under the hood by other whiteboard applications, I just realized recently that there's a separate in-browser service as well.
On a related note... #433 moves the directory structure of the ledgers to align with the value in PDO_LEDGER_TYPE. Could we set up the python packages to load from a common directory in each of the ledgers (e.g. PDO_SOURCE_ROOT/ledgers/ccf/python) to pull in modules for submitter, install, and maybe key generation? (And maybe the tools as well.) This might make it possible to remove all ledger-specific code from the base python packages. |
All components use the ledger APIs, though, don't they? I'd rather keep as much of the python code in one place as possible. It makes it a bit easier to track, IMO, and also makes the python package build more straight-forward. That said, I am in favor of mirroring the |
The only ledger specific code we have right now is the submitter and a few of the key functions. Those can be pulled into the package (setup includes the designated directory in the ledger/$PDO_LEDGER_TYPE/python directory. There is a super class for the submitter that stays in python... OK... i guess there is more... the registration and configuration functions. Point is... I would like to keep all the CCF related stuff together. |
Maybe I'm missing something, but why do we want to build and configure CCF separately? I understand doing this for the TP, though the submitter is used by several other components besides the client. I can move the CCF-specific submitter to the ccf directory since it's just one file, but in general, I would like to avoid/minimize having more python code spread across a bunch of different directories. Right now we have python code mixed with cpp code in practically every directory, and I think the dependencies will be clearer, and also easier to maintain, if we separate the cpp layers from the python layers. |
i don't want to build it separately. I want the python to pull the packages from PDO_SOURCE_ROOT/ledgers/ccf/python instead. That way all of the ccf code is in one place rather than scattered throughout PDO_SOURCE_ROOT/python. and in the end it isn't just one file... we already reach into the ccf directory for the registration code. and we have several places where we customize for ccf keys. and... the configuration PR has a chunk of code that is used to configure ccf. And... this can probably wait for a separate PR. |
This is precisely because we have separate packages. We do NOT want the eservice or pservice code being packaged with the client package because it would pull in all the sgx dependencies. We should be building something like:
we may also want a "ledger" package. but i'm ok rolling this into the client/service support packages |
I 100% agree AND this can be accomplished even if all of the python code is in a single directory. |
41d7ea6
to
dee1115
Compare
@cmickeyb We currently ship the contents of |
c51f2f2
to
a687bdb
Compare
3116179
to
05a5ae6
Compare
05a5ae6
to
59e1d78
Compare
I think we can drop the etc & bin directories. Nothing goes in them right now. |
99d5aa9
to
1244770
Compare
951afdd
to
11226fb
Compare
11226fb
to
2c0d41f
Compare
7cbcae0
to
4c4eee7
Compare
* Add figure for package structure * Add PDO contract registration and invocation figures to docs Signed-off-by: Marcela Melara <[email protected]>
* Separate SWIG definitions from python common * Use cmake to build SWIG python bindings Signed-off-by: Marcela Melara <[email protected]>
* Build PDO common python wheel using pre-generated SWIG bindings * Update sservice python build to use cmake and wheel dist * Fix python unit tests Signed-off-by: Marcela Melara <[email protected]>
* Only include client crypto in pdo common library * Ensure client is always built with services Signed-off-by: Marcela Melara <[email protected]>
4c4eee7
to
5114988
Compare
Closing this to break up into multiple PRs. |
This PR overhauls how we build and install the python library:
- [ ] Write pdo.common.crypto wrapper