Skip to content

Commit

Permalink
Prez v4.0.0 (#229)
Browse files Browse the repository at this point in the history
* Update permissions according to recommendations based on file type; fixes previous inadvertent permission changes.
Merge search endpoint with other listing functions.
Move to using sparql_grammar_pydantic as external dependency, black code, improve API documentation (examples, query params); remove unused code.
Update dependencies; minor changes to get tests passing.
Prez V4 architecture using SPARQL grammar library.

* Add CQL examples to /cql POST endpoint.
Example updates.
Fix shapely issue in Docker container

* Add mediatype examples

* fix path issue or loading CQL json

* Add example application/sparql-query MT

* Update documentation. Remove unused code. Split API extras/examples to separate file for clarity.

* Add annotations to cache on startup.

* Reverse TriplesSameSubjectPath lists in query generation for more performant queries - this was causing timeouts on link generation. Remove skos broader/narrower from extra predicates; there are concept scheme specific endpoints for these.

* Reverse TriplesSameSubjectPath lists in for performance.

* Limit Count queries to a configurable limit to prevent timeouts; defaulted to 1000.
Patch sparql-grammar-pydantic to support this.

* Group Triples with same subject to improve performance. Sort reverse order to put pattern matches with more variables last.

* Minor fixes to regressions from rebasing

* black repo
  • Loading branch information
recalcitrantsupplant committed Jul 2, 2024
1 parent 80e73a0 commit 78fda68
Show file tree
Hide file tree
Showing 283 changed files with 53,139 additions and 12,663 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ __pycache__/
dist/
!.env-template
rdf/
http/
/.python-version
http/
.ropeproject/
34 changes: 34 additions & 0 deletions .run/test_data pyoxigraph.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="test_data pyoxigraph" type="PythonConfigurationType" factoryName="Python">
<module name="prez" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="LOCAL_RDF_DIR" value="test_data" />
<env name="LOG_LEVEL" value="DEBUG" />
<env name="PORT" value="8010" />
<env name="SPARQL_REPO_TYPE" value="pyoxigraph" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/prez" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<EXTENSION ID="software.aws.toolkits.jetbrains.core.execution.PythonAwsConnectionExtension">
<option name="credential" />
<option name="region" />
<option name="useCurrentConnection" value="false" />
</EXTENSION>
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/prez/app.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>
10 changes: 7 additions & 3 deletions Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PREZ_VERSION
ARG PYTHON_VERSION=3.12.3
ARG POETRY_VERSION=1.8.1
ARG POETRY_VERSION=1.8.3
ARG VIRTUAL_ENV=/opt/venv

#
Expand All @@ -19,7 +19,9 @@ RUN apk add --no-cache \
libffi-dev \
musl-dev \
pipx \
python3-dev
python3-dev \
geos \
geos-dev

RUN pipx install poetry==${POETRY_VERSION}

Expand Down Expand Up @@ -47,7 +49,9 @@ COPY --from=base ${VIRTUAL_ENV} ${VIRTUAL_ENV}
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache \
bash
bash \
geos \
geos-dev

WORKDIR /app
# prez module is already built as a package and installed in $VIRTUAL_ENV as a library
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Loading

0 comments on commit 78fda68

Please sign in to comment.