Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

✨ Add field-level db comments when a field description exists#1293

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
iloveitaly wants to merge5 commits intofastapi:main
base:main
Choose a base branch
Loading
fromiloveitaly:db-comments

Conversation

iloveitaly
Copy link

This PRfixes#492 (comment) by adding column-level db comments
when a field description exists.

I can add some tests if this is the sort of PR that would be accepted.

I've implemented this in my SQLModel extension here:https://github.com/iloveitaly/activemodel/blob/master/activemodel/get_column_from_field_patch.py

Details:

  • feat: pull field descriptions into db comments
  • docs: document autostring
  • feat: add use_attribute_docstrings pydantic config for improved docstrings

jaapromijn and ruslandanilin reacted with thumbs up emoji
@svlandegsvlandeg added the featureNew feature or request labelFeb 20, 2025
Copy link
Member

@svlandegsvlandeg left a comment

Choose a reason for hiding this comment

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

Hi, thanks for the contribution!

There are some linting errors and test failures - could you look into those? It will facilitate the review process if the CI is green. I'll go ahead and put this PR in draft in the meantime 🙏

@svlandegsvlandeg marked this pull request as draftFebruary 20, 2025 10:42
@svlandegsvlandeg changed the titlefeat: add field-level db comments when a field description exists✨ Add field-level db comments when a field description existsFeb 20, 2025
@iloveitaly
Copy link
Author

@svlandeg awesome, will work on CI and we can go from there! Is there anything else that I should work on in order to get this merged?

@svlandeg
Copy link
Member

@svlandeg awesome, will work on CI and we can go from there! Is there anything else that I should work on in order to get this merged?

A test case is always useful, as it helps the reviewer as well to quickly run a small example. And it'll likely be necessary anyway to get the test coverage back to 100% (ensuring that all code in the code base gets tested).

@iloveitaly
Copy link
Author

iloveitaly commentedFeb 26, 2025
edited
Loading

Awesome, I should have some time to help there. I have a bunch of other SQLModel improvements I'd love to pull over fromactivemodel, so understanding the best contribution flow would be really helpful

svlandeg reacted with heart emoji

@svlandeg
Copy link
Member

Awesome, I should have some time to help there. I have a bunch of other SQLModel improvements I'd love to pull over fromactivemodel, so understanding the best contribution flow would be really helpful

Sure thing, let me know if you have specific questions/doubts about contributing tosqlmodel, happy to provide guidance if needed!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@svlandegsvlandegsvlandeg left review comments

Assignees
No one assigned
Labels
featureNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

add comments on tables and columns, visible also on the generated DB
2 participants
@iloveitaly@svlandeg

[8]ページ先頭

©2009-2025 Movatter.jp