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

Update sqlmodel / pydantic / fastapi / sqlalchemy so that alembic does not create a diff #52

Open
robcxyz opened this issue Nov 8, 2024 · 1 comment

Comments

@robcxyz
Copy link
Contributor

robcxyz commented Nov 8, 2024

Current versions of above packages are out of date and need to be updated to pydantic 2.0.

You can see this commit for an example of this:

All those packages basically need updating such that when you run:

# Make your venv 
source .venv/bin/activate
make install
export PYTHONPATH=$PYTHONPATH:`pwd`/.
cd icon_governance
alembic upgrade head 
alembic revision --autogenerate -m "v0.X.0 something"
  • Now check that newly created version file to see if there are diffs
  • There will be many from changes such as nullable being default
  • These all need to be resolved so that the new migration is clean
  • Make sure to delete the migration between attempts
@coder1963
Copy link

Hey @robcxyz ,

listing out my findings here

  • Tests for API proposals, rewards, and statistics failed due to missing database data.
  • Integration tests to populate these tables are absent.

Suggestion

  • I noticed a slight discrepancy between the endpoint names and the corresponding models. For example, /governance/stats/apy/time might be more accurately represented as /governance/apy/time. Similarly, /governance/stats/commission/time could be simplified to /governance/commission/time.

Please let me know if my understanding is correct

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

No branches or pull requests

2 participants