Skip to content

Commit

Permalink
fix static assets (#926)
Browse files Browse the repository at this point in the history
* fix static assets

* tweak

* pin

* comment

* fix literal use

* literal
  • Loading branch information
vangheem authored May 23, 2023
1 parent c9a53cd commit cd6cc12
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.11.0
2.12.0
4 changes: 2 additions & 2 deletions nucliadb/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include *.rst
include *.txt
include VERSION
include nucliadb/py.typed
include nucliadb/static
include nucliadb/static/*
include nucliadb/standalone/static
include nucliadb/standalone/static/*
include **/*.pb
include **/*.png
11 changes: 4 additions & 7 deletions nucliadb/nucliadb/reader/api/v1/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from typing import List, Literal, Optional, Union
from typing import get_args as typing_get_args
from typing import List, Optional, Union

from fastapi import Header, HTTPException, Query, Request, Response
from fastapi_versioning import version
Expand Down Expand Up @@ -191,10 +190,6 @@ async def get_resource(
return result


PageShortcuts = Literal["last", "first"]
PAGE_SHORTCUTS = typing_get_args(PageShortcuts)


@api.get(
f"/{KB_PREFIX}/{{kbid}}/{RSLUG_PREFIX}/{{rslug}}/{{field_type}}/{{field_id}}",
status_code=200,
Expand Down Expand Up @@ -229,7 +224,9 @@ async def get_resource_field(
ExtractedDataTypeName.FILE,
]
),
page: Union[Literal["last", "first"], int] = Query("last"),
# not working with latest pydantic/fastapi
# page: Union[Literal["last", "first"], int] = Query("last"),
page: Union[str, int] = Query("last"),
) -> Response:
storage = await get_storage(service_name=SERVICE_NAME)
driver = await get_driver()
Expand Down

1 comment on commit cd6cc12

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: cd6cc12 Previous: d19d131 Ratio
nucliadb/tests/benchmarks/test_search.py::test_search_returns_labels 66.9759836484415 iter/sec (stddev: 0.0005557774382613999) 68.48176450054224 iter/sec (stddev: 0.00011698806646091496) 1.02
nucliadb/tests/benchmarks/test_search.py::test_search_relations 158.96848528492106 iter/sec (stddev: 0.00011845191443187555) 128.13602179672588 iter/sec (stddev: 0.000027569798386079616) 0.81

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.