Coder Social home page Coder Social logo

nibiruchain / proto-gen-py Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 2.0 1.48 MB

Generates the nibiru_proto types package for the Nibiru Python SDK

License: MIT License

Makefile 0.01% Python 99.64% Shell 0.36%
nibiru blockchain protobuf protoc-gen sdk

proto-gen-py's Introduction

sdk-proto-gen

Generates the nibiru_proto Python package for the Nibiru Python SDK.

PyPI Version MIT license

Python Code Generation

All you need to do is run:

poetry run make proto-gen

This executes the code generation script, proto-gen-py.sh. The protobuf files come from the NibiruChain/nibiru repo.

Other Development Guidelines

Our recommended Python setup is to use pyenv in combination with poetry.

  • pyenv is a tool for installing and managing Python interpreters. This will let you seamlessly switch between Python versions.
  • poetry is used for managing virtual environments, dependency resolution, package installations, package building, and package publishing.
  • We assume you're on a Unix machine such as WSL2 Ubuntu, MacOS, or a common Linux distro.

See NibiruChain/py-sdk for installation instructions.

Testing

poetry install
poetry run pytest

Publishing to PyPI

The publish workflow looks like this:

  1. Code-gen the new types from the chain. If there are changes, these should be committed.

    poetry run make proto-gen
  2. Increment the package version. For example, use poetry version preminor to do a pre-release for a minor version.

    poetry version [update-keyword]
  3. Create a tag and push it the remote origin.

    git tag -asm "v0.16.2" v0.16.2
    git push --tags
  4. The tag should trigger a GitHub Action Workflow.

๐Ÿ”“ License

This software is licensed under the MIT license. See LICENSE for full disclosure.

ยฉ 2022 Nibi, Inc.

proto-gen-py's People

Contributors

k-yang avatar matthiasmatt avatar nibiruheisenberg avatar onikonychev avatar unique-divine avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

proto-gen-py's Issues

test: Test the code generation in CI

Testing the code generation

  • Clone NibiruChain/nibiru or check for local protos
  • Run the code generation with make proto-gen

Testing after the package is built

  • Setup python + poetry
  • Run pytest to try importing the generated code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.