Skip to content

Compat with Tiled 0.1.0b21 #842

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 4 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,6 @@ docs/data.h5

# generated by docker-compose
data/*

# version file generated by setuptools
*_version.py
8 changes: 4 additions & 4 deletions databroker/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from jsonschema import ValidationError

from event_model import DocumentNames, schema_validators
from fastapi import APIRouter, HTTPException, Request
from fastapi import APIRouter, HTTPException, Request, Security
import pydantic
from starlette.responses import StreamingResponse
from tiled.server.dependencies import SecureEntry
from tiled.server.dependencies import get_entry


class NamedDocument(pydantic.BaseModel):
Expand All @@ -23,7 +23,7 @@ class NamedDocument(pydantic.BaseModel):
def get_documents(
request: Request,
fill: Optional[bool] = False,
run=SecureEntry(scopes=["read:data", "read:metadata"]),
run=Security(get_entry(), scopes=["read:data", "read:metadata"])
):

from .mongo_normalized import BlueskyRun
Expand Down Expand Up @@ -65,7 +65,7 @@ def generator_func():
def post_documents(
request: Request,
named_doc: NamedDocument,
catalog=SecureEntry(scopes=["write:data", "write:metadata"]),
catalog=Security(get_entry(), scopes=["write:data", "write:metadata"]),
):
from .mongo_normalized import MongoAdapter

Expand Down
2 changes: 1 addition & 1 deletion requirements-client.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bluesky-tiled-plugins
msgpack >=1.0.0
orjson
tiled[client] >=0.1.0-b13
tiled[client] >=0.1.0b21
2 changes: 1 addition & 1 deletion requirements-server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pytz
rich
starlette
suitcase-mongo >=0.5.0
tiled[server] >=0.1.0-b13
tiled[server] >=0.1.0b21
toolz
typer
tzlocal
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ sphinx
suitcase-jsonl >=0.1.0b2
suitcase-mongo >=0.5.0
suitcase-msgpack >=0.2.2
tiled[all] >=0.1.0-b13
tiled[all] >=0.1.0b21
ujson
vcrpy
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def read_requirements(filename):
return requirements


suffixes = ["client", "server", "back-compat", "docs", "test"]
extras_require = {
key: read_requirements(f"requirements-{key}.txt") for key in ["client", "server", "back-compat"]
suffix: read_requirements(f"requirements-{suffix}.txt") for suffix in suffixes
}
extras_require["complete"] = sorted(set(sum(extras_require.values(), [])))
extras_require["all"] = extras_require["complete"] # for back-compat
Expand Down
Loading