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

Models and Schemas, Batch 1: Simple/One-Off Models #127

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

slaarti
Copy link
Contributor

@slaarti slaarti commented Jul 9, 2024

Description

This is the first batch of models and schemas for #72, covering the simpler, one-off models that don't have relationships. Further PRs will be batched out according to groups of related models.

Changes

  • Add simple example model for Comment.

  • Correct schema names for OtherModel.

    Skipping defining the model/schemas this time, as nothing else uses them and it's irrelevant to just showing an additional endpoint router. I considered changing it to another more commonly used model/schema set, but decided it wasn't worth the hassle of figuring out.

  • Add pymdownx.details to mkdocs config.

    Used for collapsed/folded code blocks as needed for doing multiple file includes via snippets.

  • Model, schemas, and doc fixes for Item.

    This makes use of the pymdownx.details extension to allow for collapsed/folded code example blocks. (Other commits/PRs to come will also use this, but this is the first set.) I also replaced some uses of MyModel and YourModel (and associated schemas) with Item (and etc.) for simplicity, although there will also be some MyModel usage in the following commit.

  • MyModel model, schemas, docs/docstrings.

Tests

No changes to tests; this is purely in documentation and examples.

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • I have added necessary documentation (if appropriate).

Skipping defining the model/schemas this time, as nothing else uses them
and it's irrelevant to just showing an additional endpoint router. I
considered changing it to another more commonly used model/schema set,
but decided it wasn't worth the hassle of figuring out.
Used for collapsed/folded code blocks as needed for doing multiple file
includes via snippets.
This makes use of the `pymdownx.details` extension to allow for
collapsed/folded code example blocks. (Other commits/PRs to come will
also use this, but this is the first set.) I also replaced some uses of
`MyModel` and `YourModel` (and associated schemas) with `Item` (and
etc.) for simplicity, although there will also be some `MyModel` usage
in the following commit.
Copy link
Owner

@igorbenav igorbenav left a comment

Choose a reason for hiding this comment

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

Really great work again, @slaarti, thank you so much!

@igorbenav igorbenav added the documentation Improvements or additions to documentation label Jul 17, 2024
@igorbenav igorbenav merged commit 69465e6 into igorbenav:main Jul 17, 2024
7 checks passed
@slaarti slaarti deleted the models_schemas_simple branch July 17, 2024 05:14
slaarti added a commit to slaarti/fastcrud that referenced this pull request Jul 22, 2024
These are some tweaks to spacing and naming that I apparently missed
while doing igorbenav#127. Trying to combo-pack it with other changes I'm doing
was proving confusing, so I'm making it its own thing.
@slaarti slaarti mentioned this pull request Jul 22, 2024
3 tasks
slaarti added a commit to slaarti/fastcrud that referenced this pull request Jul 23, 2024
These are some tweaks to spacing and naming that I apparently missed
while doing igorbenav#127. Trying to combo-pack it with other changes I'm doing
was proving confusing, so I'm making it its own thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants