Skip to content

Conversation

@jgadling
Copy link
Contributor

This pr does a couple things:

  1. Updates the migration codegen so that it doesn't produce migration files when nothing's changed
  2. Updates the linkml schema generation command to run inside a docker container, to prevent errors
  3. Update the docs to align better with our current dev process.

@jgadling jgadling requested review from manasaV3 and uermel March 20, 2025 17:41
update-schema: codegen alembic-autogenerate alembic-upgrade-head
# $(docker_compose_run) $(CONTAINER) ruff check --fix .
$(docker_compose_run) $(APP_CONTAINER) sh -c 'strawberry export-schema main:schema > /app/graphql_api/schema.graphql'
linkml generate erdiagram --structural --classes Alignment --classes AnnotationAuthor --classes AnnotationFile --classes AnnotationShape --classes Annotation --classes DatasetAuthor --classes DatasetFunding --classes Dataset --classes DepositionAuthor --classes Deposition --classes Frame --classes PerSectionAlignmentParameters --classes AnnotationMethodLink --classes GainFile --classes FrameAcquisitionFile --classes Run --classes Tiltseries --classes PerSectionParameters --classes TomogramAuthor --classes TomogramVoxelSpacing --classes Tomogram schema/schema.yaml> schema/README.md
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Makefile Outdated
.PHONY: update-api-schema
update-api-schema:
$(MAKE) -C apiv2 update-schema
pre-commit run --all-files
Copy link
Contributor

Choose a reason for hiding this comment

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

This might not be needed for --all-files when only files inside apiv2 would have changed.

Also, should this be a part of the make command for apiv2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohhh I didn't realize we can run pre-commit from subdirectories!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wait actually it is part of that make target. It looks like pre-commit behaves differently when run from inside vs outside the apiv2 directory

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

Successfully merging this pull request may close these issues.

4 participants