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

Monorepo #254

Merged
merged 11 commits into from
Jun 28, 2019
Merged

Monorepo #254

merged 11 commits into from
Jun 28, 2019

Commits on Jun 8, 2019

  1. Monorepo first commit

    Reorganized sdk and cli to be two different packages in the same
    repository
    
    Moved sdk to cli repo
    
    Rewrote SDK to match JS SDK implementation
    
    CircleCI fix
    vforvalerio87 committed Jun 8, 2019
    Configuration menu
    Copy the full SHA
    73ba53e View commit details
    Browse the repository at this point in the history
  2. fix gitignore

    vforvalerio87 committed Jun 8, 2019
    Configuration menu
    Copy the full SHA
    45581ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8c018f9 View commit details
    Browse the repository at this point in the history
  4. renamed stub object to service in service_client, exposing grpc chann…

    …el with interceptor in service_client instance
    vforvalerio87 committed Jun 8, 2019
    Configuration menu
    Copy the full SHA
    46bef82 View commit details
    Browse the repository at this point in the history
  5. Moved block_offset to payment channel strategy from config as an

    optional parameter
    
    Added call allowance to payment channel strategy as an optional
    parameter
    
    Split .gitignore to have a top level one and separate ones for each
    package
    
    Same for LICENSE
    
    Updated CLI README, added top-level README (sdk-specific is still in
    progress)
    vforvalerio87 committed Jun 8, 2019
    Configuration menu
    Copy the full SHA
    35325c6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    96633a4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    052d9b3 View commit details
    Browse the repository at this point in the history
  8. Set up monorepo:

    this monorepo is organized as a PEP 420 compliant namespace
    (https://www.python.org/dev/peps/pep-0420/).
    
    The sdk package has been restructured to conform to the PEP 420
    namespace package specification and it's under the "snet" namespace.
    
    The cli package is both a regular package and a namespace package.
    
    setup.py for the monorepo itself installs the dependencies for all
    packages in the repository.
    
    Each package and the overarching monorepo also have "requirements.txt"
    files for local installations and CI enviroments: by installing via
    "requirements.txt", the dependencies listed in "setup.py" are only
    pulled and installed from PyPI if a local version is not already
    available. This allows to get dependencies within the monorepo to be
    installed from the local filesystem.
    
    The whole package is called "snet" and gives the name to the namespace.
    The subpackages are "snet.sdk", "snet.snet_cli" and snet_cli (since the
    CLI package is both within the namespace and a regular package).
    Going forward, all of the code in the "snet_cli" package can be migrated
    to the namespace package: both were kept momentarily for compatibility.
    
    In this scenario, everything inside the "snet.sdk" package has
    visibility on the contents of the "snet.snet_cli" package and
    vice-versa.
    Everything inside the "snet_cli" regular package has visibility on the
    contents of the "snet.snet_cli" package due to the regular Python import
    mechanics, but it has no visibility on the contents of the "snet.sdk"
    package (and vice-versa).
    So, the shared code between the SDK and the CLI goes under the
    "snet.snet_cli" package which is at "packages/snet_cli/snet/snet_cli".
    
    Code and assets deduplication:
    
    thanks to the new structure, everything under "resources" has been moved
    to the "snet.snet_cli" package and is now shared between the SDK and
    CLI. Specifically, this includes the json artifacts from the compilation
    and deployment of the smart contracts, the raw ".proto" files to
    interact with the daemon and the compiled python client libraries.
    
    Changes:
    
    since the CLI is both a namespace package and a regular package, changes
    to the code have been kept to a minimum.
    The only change of note is that state service does not compile its own
    ".proto" files at runtime inside the user's home directory anymore but
    they are imported from the "resources" directory under the
    "snet.snet_cli" namespace package, where they are compiled during setup.
    vforvalerio87 committed Jun 8, 2019
    Configuration menu
    Copy the full SHA
    63e2a0a View commit details
    Browse the repository at this point in the history
  9. Fixed mutable argument in service client constructor,

    getting abi for OpenChannel event from the contract object using web3
    function
    
    passing instance of payment channel management strategy to service
    client
    vforvalerio87 committed Jun 8, 2019
    Configuration menu
    Copy the full SHA
    7113b17 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2019

  1. fixed basic setup for CLI, added setup and requirements for namespace…

    … package, moved version identifier
    vforvalerio87 committed Jun 11, 2019
    Configuration menu
    Copy the full SHA
    22ed5db View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2019

  1. Moved mpe_channel_command, mpe_service_metadata and contract to share…

    …d package
    
    Refactored SDK package to use shared code
    vforvalerio87 committed Jun 25, 2019
    Configuration menu
    Copy the full SHA
    ca6044b View commit details
    Browse the repository at this point in the history