open-horizon / examples

Code examples you can use with Horizon.
Apache License 2.0
40 stars 64 forks source link

Clean-up Policy files in examples #515

Open t-fine opened 2 years ago

t-fine commented 2 years ago

A message from Glen... "It is unfortunate that the examples in the open-horizon/examples repo inconsistently use the horizon subdirectory and the policy subdirectory. I had forgotten how bad this was but today I am trying to write up something about how to use pattern and policy and I wanted to point at the examples repo but then rediscovered the inconsistency there."

The original reason for having two sets of policy files in the horizon and policy directories was to have one that the exchangePublish.sh script uses when populating a new exchange (the horizon dir), and one set for users to leverage when walking through the "Creating your own ..." README flow so there wouldn't be two agreements that deploy the helloworld service possible causing confusion as well.

saurav1004 commented 1 year ago

Hello @t-fine,
I would like to work on this issue. Could this be assigned to me ?

Also, can you guide me a little wrt what needs to be done here.

t-fine commented 1 year ago

Sorry about the delay here @saurav1004 have at it! :)

saurav1004 commented 1 year ago

No issues. I will take a look. Could you guide me a little wrt what needs to be done here, to avoid the confusion

joewxboy commented 1 year ago

@saurav1004 Take a look at our newer example services for a good pattern or example to follow regarding files living in a single folder rather than "horizon" or "policy" directories:

t-fine commented 1 year ago

@saurav1004 in regards to the files in policy/ ... perhaps their creation could be worked into the steps of the "Creating Your Own Hello World Edge Service" so there is no actual file to save ... just thinking