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

Refactor cli structure #254

Merged
merged 22 commits into from
Aug 27, 2020
Merged

Refactor cli structure #254

merged 22 commits into from
Aug 27, 2020

Conversation

AntoineRondelet
Copy link
Contributor

@AntoineRondelet AntoineRondelet commented Aug 26, 2020

  • Refactored the structure of the CLIs

  • Renamed zeth_debug CLI to zeth_helper

  • Re-arranged the client code:

    • zeth becomes core (the cli is called zeth, enhance having a zeth folder suggested it was the code of the cli while it actually was the "core"/"backend" of the client)
    • test becomes tests
    • commands becomes cli
    • test_commands is now split in:
      - test_commands: scripts used to carry out "integration" tests and deploy testing contracts/generate data for the tests
      - helper: CLI allowing to carry out non-zeth related things. This is not strictly used for tests, but rather to ease the use of Zeth on an Ethereum-like blockchain by exposing some useful functionalities
  • core, api, helper, cli are bundled into a zeth package

@AntoineRondelet
Copy link
Contributor Author

Supersedes #252

@dtebbs
Copy link
Contributor

dtebbs commented Aug 26, 2020

Just a few comments up front:

zeth becomes core (the cli is called zeth, enhance having a zeth folder suggested it was the code of the cli while it actually was the "core"/"backend" of the client)

It woudl be great if you could put everything in a zeth subdirectory, like we do in zecale. This makes the hierarchy deeper unfortunately (so we have client/zeth/core, client/zeth/commands etc), but seems to be standard practice for python and it makes it much easier to use the code as a dependency (we can import zeth.core instead of import core)
I hit conflicts with this kind of thing in several projects that use zeth, and meant to add this structure to zeth. If you are renaming modules than now might be a good time to do it.

commands becomes zeth_cli

So this can become zeth/cli, etc... (The scripts entry in setup.py can refer to zeth/cli/zeth of course)

test becomes unit_tests

I think test is a reserved name, known to the unit test framework and the package manager (dependencies cannot import the test module, I think), so it might be better to keep this as it is.

@AntoineRondelet AntoineRondelet mentioned this pull request Aug 26, 2020
@AntoineRondelet AntoineRondelet changed the base branch from zeth-client-flags to develop August 27, 2020 19:44
@AntoineRondelet AntoineRondelet merged commit 20e2ab7 into develop Aug 27, 2020
@AntoineRondelet AntoineRondelet deleted the refactor-cli-structure branch August 28, 2020 14:19
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.

2 participants