-
Notifications
You must be signed in to change notification settings - Fork 5
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
Hello World contract family #63
base: main
Are you sure you want to change the base?
Conversation
92a78b1
to
bf4a82d
Compare
#64 should be committed first. |
bf4a82d
to
768421c
Compare
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.
Great detailed hello world tutorial. It really helped to get an idea how to start writing my first contract family.
However, I was not able to run my helloworld contract within my personal time limit of ~45min.
Is there a dev container image that helps me to kickstart and provides me all the tools/deps needed as described in docs/install.md
?
docs/notebooks/index.md
Outdated
|
||
There are a number of configuration options for interacting with PDO | ||
contracts. More information can be found in the | ||
[Getting Started](common/documents/getting_started.ipynb) notebook. |
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.
link does not work. Do you mean ../../common-contracts/................
?
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 would work from the jupyter server. i'll clarify how these work.
docs/notebooks/index.md
Outdated
|
||
|
||
To experiment with these contracts, explore the | ||
[Exchange Contract Family notebook](exchange/index.ipynb) |
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.
link does not work
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.
Maybe also link to the document that tell me how to setup my environment (install PDO client, etc ...) (with docker?!!) :D
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.
same as above. these are designed to work from the jupyter server, not from the shell. this needs to be clarified. AND... per your more general comment, it would be nice to build a dev image that had a jupyter server running so you could get at this information structured correctly.
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.
ahh cool! so I suggest that somewhere, maybe the root README.md one should explain how jump into the dev container and how to read things using jupyter. However, if the "jupyter" root is set to the repository root, couldnt one create links that work for both, jupyter and the normal github or any local IDE? 🤓
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.
possibly...
first i'm going to 1) create a getting started container, 2) update the readme with instructions on how to get that started, and possibly 3) make the notebooks here more interactive & supportive of the builds.
we do have the issue that many of the docs are generated by jupytext (jupyter notebooks are notoriously difficult to manage with git).
docs/notebooks/index.md
Outdated
|
||
[Hyperledger Private Data Objects](https://github.com/hyperledger-labs/private-data-objects) operates as a Hyperledger Labs project. This code is provided solely to demonstrate basic PDO mechanisms and to facilitate | ||
collaboration to refine PDO architecture and define minimum viable product requirements. | ||
[Hyperledger Private Data Objects](https://github.com/hyperledger-labs/private-data-objects) |
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.
For consistency I would rename index.md
to README.md
.
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 is the same issue as above. anything in the "notebooks" subdirectory is supposed to be viewed through the jupyter server. in that context... index.md make more sense than README.md
This directory contains a number of pdo-shell scripts to test the | ||
digital asset contract family. The scripts assume that a complete | ||
installation of the PDO client is complete. |
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.
You mean the example contact family I guess?!
This script sets up and runs the functional test suite for the digital asset | ||
contract family. The actual tests will be found in the pdo-shell script |
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.
example contract familiy?
@@ -26,13 +26,13 @@ will refer to the windows as `container_1` (for the user) and | |||
`container_2` (for the issuer). | |||
|
|||
**Container_1: Create the keys for the token user.** Open the | |||
notebook `documents/getting_started.ipynb` and run all cells. Navigate | |||
notebook `common/documents/getting_started.ipynb` and run all cells. Navigate |
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.
these links seem to be broken. I was wondering if I am missing some commit in this PR
|
||
**The protocols and software are for reference purposes only and not intended for production usage.** | ||
|
||
# Example Contract Family # |
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.
In your PR you call it Hello World Contract Family
... maybe that is a better name than Example
, in particular, if there are folders in the recommended project structure that is called example
.
|
||
1. Copy the `example-contract` directory to a new directory. To be | ||
picked up by the build system automatically, the new directory | ||
should be named with `myfirst-contract`. |
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.
to be consistent with your PR title ... helloworld-contract
maybe call is?
cff4977
to
e46de56
Compare
Initial commit for the example contract family. The example contract family is primarily used as a means of documenting the process of writing, building, and extending a contract family. In addition, the example contract family provides a template for building a new contract family. Copying the example contract family to a new directory and editing family.cmake should be sufficient to create a new family. Signed-off-by: Mic Bowman <[email protected]>
…tract family Signed-off-by: Mic Bowman <[email protected]>
Adds a simple, getting started target for building and running the example contract. Signed-off-by: Mic Bowman <[email protected]>
Adds the basic factory/template model for the example contract. This should allow for, more or less, a cut and paste for creating a new contract that preserved the counter. That is, the factory & template are for the specific contract type and would have to be replaced completely for a new contract. Signed-off-by: Mic Bowman <[email protected]>
There is no particular reason to remove the downloaded model during docker clean up. This should save some time during build/debug/test cycles. The model can be removed with the clean_model target. Signed-off-by: Mic Bowman <[email protected]>
Signed-off-by: Mic Bowman <[email protected]>
Signed-off-by: Mic Bowman <[email protected]>
Add a docker target to start a contracts container that is running Jupyter. The current source directory is mounted in /project/pdo/dev inside the container. When used with the Jupyter shell, this provides a relatively easy way to develop and test contracts. Signed-off-by: Mic Bowman <[email protected]>
e46de56
to
62b1591
Compare
Initial commit for the example contract family. The example contract family is primarily used as a means of documenting the process of writing, building, and extending a contract family. In addition, the example contract family provides a template for building a new contract family. Copying the example contract family to a new directory and editing family.cmake should be sufficient to create a new family.
Detailed documentation is provided that includes an explanation of the various parts of a contract family, how to create a new one, and how to define additional methods in a contract family. Most of this is provided as a step-by-step guide.
A functioning Jupyter notebook is also provided. However, documentation for customizing Jupyter is still work in progress.
NOTE: This PR depends on #64