Skip to content

chore: Switch to pulling the platformics library from pypi. #477

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apiv2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ start: ## Start the local dev environment.

.PHONY: codegen
codegen: ## Run codegen to convert the LinkML schema to a GQL API
$(docker_compose_run) $(APP_CONTAINER) python3 -m platformics.cli.main api generate --template-override-paths ./template_overrides --schemafile ./schema/schema.yaml --skip-render-files --output-prefix .
$(docker_compose_run) $(APP_CONTAINER) platformics api generate --template-override-paths ./template_overrides --schemafile ./schema/schema.yaml --output-prefix .
$(docker_compose_run) $(APP_CONTAINER) black .

.PHONY: test
Expand Down Expand Up @@ -92,7 +92,7 @@ logs: ## Tail the logs of the dev env containers. ex: make logs CONTAINER=graphq

.PHONY: token
token: ## Copy an auth token for this local dev env to the system clipboard
TOKEN=$$($(docker_compose_run) $(APP_CONTAINER) python3 -m platformics.cli.main auth generate-token 111 --project 444:owner --expiration 99999); echo '{"Authorization":"Bearer '$$TOKEN'"}' | tee >(pbcopy)
TOKEN=$$($(docker_compose_run) $(APP_CONTAINER) platformics auth generate-token 111 --project 444:owner --expiration 99999); echo '{"Authorization":"Bearer '$$TOKEN'"}' | tee >(pbcopy)

.PHONY: update-cli
update-cli: ## Update the GQL types used by the CLI
Expand Down
2 changes: 2 additions & 0 deletions apiv2/cerbos/config.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/alignment.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/annotation.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/annotation_author.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/annotation_file.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/annotation_method_link.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/annotation_shape.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/dataset.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/dataset_author.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/dataset_funding.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/deposition.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/deposition_author.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/deposition_type.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/derived_roles_common.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/file.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/frame.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/frame_acquisition_file.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/gain_file.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/per_section_alignment_parameters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/per_section_parameters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/run.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/tiltseries.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/tomogram.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/tomogram_author.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apiv2/cerbos/policies/tomogram_voxel_spacing.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions apiv2/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,30 @@
from httpx import AsyncClient
from moto import mock_s3
from mypy_boto3_s3.client import S3Client
from pytest_postgresql import factories
from pytest_postgresql.executor_noop import NoopExecutor
from pytest_postgresql.janitor import DatabaseJanitor
from sqlalchemy.ext.asyncio import AsyncSession
from starlette.requests import Request

from platformics.database.connect import AsyncDB, SyncDB, init_async_db, init_sync_db
from platformics.database.models.base import Base
from platformics.graphql_api.core.deps import (
get_auth_principal,
get_db_session,
get_engine,
get_s3_client,
require_auth_principal,
)
from platformics.graphql_api.core.error_handler import HandleErrors
from platformics.graphql_api.setup import get_app, get_strawberry_config
from platformics.security.authorization import Principal
from platformics.settings import APISettings
from platformics.test_infra.factories.base import FileFactory, SessionStorage
from platformics.test_infra.factories.base import SessionStorage
from pytest_postgresql import factories
from pytest_postgresql.executor_noop import NoopExecutor
from pytest_postgresql.janitor import DatabaseJanitor
from sqlalchemy.ext.asyncio import AsyncSession
from starlette.requests import Request

__all__ = [
"gql_client",
"moto_client",
"GQLTestClient",
"SessionStorage",
"FileFactory",
] # needed by tests


Expand Down Expand Up @@ -206,7 +203,6 @@ async def patched_session() -> typing.AsyncGenerator[AsyncSession, None]:
api.dependency_overrides[get_db_session] = patched_session
api.dependency_overrides[require_auth_principal] = patched_authprincipal
api.dependency_overrides[get_auth_principal] = patched_authprincipal
api.dependency_overrides[get_s3_client] = patched_s3_client


def raise_exception() -> str:
Expand Down
16 changes: 14 additions & 2 deletions apiv2/database/migrations/env.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions apiv2/database/models/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions apiv2/database/models/alignment.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions apiv2/database/models/annotation.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading