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

test,ci,feat: (1) Use poetry for pkg management. (2) Improve CI. (3) Re-gen protos for v0.12.1-alpha of nibiru #53

Merged
merged 18 commits into from
Aug 12, 2022

Conversation

Unique-Divine
Copy link
Member

@Unique-Divine Unique-Divine commented Aug 12, 2022

For the reviewer

You'll need the environment variables listed in the repo configs notion page.

The substance of the PR lies within 5 files:

  • nibiru/network.py: Created `devnet
  • pyproject.toml (and poetry.lock): Made deterministic build process and used poetry for dependency resolution.
  • github/workflows/.pytests.yml: Verified correctness of the new setup with CI
  • tests/chain_info_test.py: Cleaned up tests and added a vpool query to the suite
  • scipts/protocgen.sh: Improved this script to run whether or not the proto directory exists. Added docs to go with it to the README.

Summary - Commit Log

  • ci: Use poetry for the test workflow. Handle concurrency. Add cacheing.
  • fix: make it so that make proto-gen runs even if the proto dir already exists
  • feat(network): add devnet to the Network class
  • test(chain_info_test): test_query_vpool_reserve_assets
  • docs(README): Instructions on generating types with protobuf
  • proto: regenerare protos wth binary v0.12.1-alpha
  • feat: use poetry instead of pipenv b/c it's objectively better. Closes Move package management over to poetry #45

@Unique-Divine Unique-Divine added type: docs Improvements or additions to documentation type: enhancement New feature or request labels Aug 12, 2022
nibiru/clients/perp.py Outdated Show resolved Hide resolved
matthiasmatt
matthiasmatt previously approved these changes Aug 12, 2022
.github/workflows/pytests.yml Outdated Show resolved Hide resolved
.github/workflows/pytests.yml Outdated Show resolved Hide resolved
mkdir -p nibiru/proto/
cp -r ../nibiru/proto/ proto/
echo "refresh existing proto files"
if [ $(basename $(pwd)) = nibiru-py ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this if check necessary? make proto-gen will already run in the nibiru-py directory.

Copy link
Member Author

@Unique-Divine Unique-Divine Aug 12, 2022

Choose a reason for hiding this comment

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

I'm using it as an indirect form of documentation. It's a bit hard to follow this script because the the nibiru repo is assumed to be at ../nibiru, while the nibiru package is ./nibiru and the script actually cds around.
My intention here was to hint at where the execution was taking place.

We should probably add an error message for when the nibiru repo isn't found as well to make the dev exp. a little better.

if [ -d proto ]
then
# it will mess up the script, so we preemptively remove it.
rm -rf proto
Copy link
Contributor

Choose a reason for hiding this comment

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

rm -rf nibiru/proto proto will already delete if it exists, no-op if it doesn't.

tests/chain_info_test.py Outdated Show resolved Hide resolved
@Unique-Divine Unique-Divine merged commit c1063ac into master Aug 12, 2022
@Unique-Divine Unique-Divine deleted the ud/poetry branch August 12, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvements or additions to documentation type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move package management over to poetry
3 participants