Skip to content
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

feat: initial 3 exercises #5

Closed
wants to merge 12 commits into from
Closed

Conversation

LuqiPan
Copy link
Collaborator

@LuqiPan LuqiPan commented Feb 6, 2024

This PR consists of the agoric exercises I demo'd last Friday inspired by https://rustlings.cool

This diff is agains agoric-exercises instead of main branch for now.

Meta questions:

  1. should we create a new, separate repo for dapp-agoric-exercises or should we put it in dapp-agoric-basics(this repo)?
  2. how do we do tests/CI for agoric-exercises? The tests will fail if we don't put the answers in, however, if the answers are already in that defeats the purpose of teaching developers.
  3. how do we organize exercises? Right now there are a lot of duplicate code(see comments below), how do we avoid that while making these tests work?

More exercises ideas:

  1. create a purse for Alice and deposit money in it to teach the concepts of mint, purse, payment, etc
  2. an exercise around proposalShape, pattern
  3. an exercise around failing a join request if checks in joinHandler don't pass
  4. more to be added

@LuqiPan LuqiPan requested review from dckc and toliaqat February 6, 2024 00:55
@dckc
Copy link
Member

dckc commented Feb 6, 2024

Meta questions:

  1. should we create a new, separate repo for dapp-agoric-exercises or should we put it in dapp-agoric-basics(this repo)?

Please not more repos :)

  1. how do we do tests/CI for agoric-exercises? The tests will fail if we don't put the answers in, however, if the answers are already in that defeats the purpose of teaching developers.

put answer-patches somewhere?

  1. how do we organize exercises? Right now there are a lot of duplicate code(see comments below), how do we avoid that while making these tests work?

maybe successive versions / branches?

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughts from a quick skim...


// bundleSource() bundles contract and all of its modules into a single artifact
// and is the first thing you need to do in order to deploy a contract
// For more, see reference: https://docs.agoric.com/guides/zoe/#bundling-a-contract
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// For more, see reference: https://docs.agoric.com/guides/zoe/#bundling-a-contract
// For more discussion, see: https://docs.agoric.com/guides/zoe/#bundling-a-contract

reference doc for bundleSource is more like https://endojs.github.io/endo/modules/_endo_bundle_source.html

@0xpatrickdev
Copy link
Member

0xpatrickdev commented Feb 7, 2024

how do we organize exercises? Right now there are a lot of duplicate code(see comments below), how do we avoid that while making these tests work?
maybe successive versions / branches?

I'm in favor of successive versions. If there's multiple lessons, we could use numbered folders. We could also use something like .final. to denote the completed versions.

/01-getting-started
  getting-started.js
  getting-started.test.js
  getting-started.final.js # if different from original
  getting-started.test.final.js

how do we do tests/CI for agoric-exercises? The tests will fail if we don't put the answers in, however, if the answers are already in that defeats the purpose of teaching developers.

Ava has test.failing(...) and test.skip(...) modifiers we can leverage.

@dckc dckc marked this pull request as draft February 15, 2024 17:28
@dckc
Copy link
Member

dckc commented Feb 15, 2024

converting to draft to reduce review expectations based on recent prioritization discussion

@LuqiPan
Copy link
Collaborator Author

LuqiPan commented Mar 5, 2024

Closing as we don't have plan to merge this into main as of now

@LuqiPan LuqiPan closed this Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants