Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.
/ proto-gen-py Public archive

Generates the nibiru_proto types package for the Nibiru Python SDK

License

Notifications You must be signed in to change notification settings

NibiruChain/proto-gen-py

Repository files navigation

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.

About

Generates the nibiru_proto types package for the Nibiru Python SDK

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages