This project uses semantic versioning. This change log uses principles from keep a changelog.
pkg_resourceshas been deprecated with Python 3.12. Replaced use ofpkg_resources.iter_entry_pointswithimportlib.metadata.entry_pointsfor >= Python 3.8- Added configuration option
DISABLE_JWT_AUTHORISATIONto disable JWT authorisation for testing purposes or for running locally - Added configuration option
DEFAULT_USERto specify the default user identity used when JWT authorisation is disabled
- return dataset size and item number in dataset schemas
- yield size in bytes information with user-wise summary
- Automated github release
- Zenodo integration
- Trusted publishing on PyPI
- Changed URLs from
livMatSprefix tojic-dtoolprefix.
- Renamed from
dtool-lookup-servertodservercore
- Sorting mechanism in analogy to
flask_smorest's Pagination mechanism - Deletion, put, and patch routes
/tagstag retrieval route
- All routes refactored to adhere to a few simple REST API conventions from "Mark Masse, REST API Design Rulebook, O'Reilly Media, Inc., 2011", namely
- Forward slash separator indicates hierarchical relationship,
and URI path conveys the REST API's resource model,
e.g.
/users/test-user,/base-uris/smb/test-share,/uris/s3/test-bucket/aad1c62b-b184-422b-841e-ac68eda26fe7 - Hyphens used to improve readability and underscores avoided in URIs,
e.g.
/base-urisinstead of/base_uris - Plural nouns are used for collections, e.g.
/users,/base-uris - Singular nouns are used for specific documents, e.g.
/users/test-user/summary - Query component of a URI used to filter collections, e.g.
/uris?creator_usernames=test-user&free_text=apple - Query component of URI used to paginate and sort collections , e.g.
/users?page=2&page_size=5&sort=is_admin,-username
- Forward slash separator indicates hierarchical relationship,
and URI path conveys the REST API's resource model,
e.g.
- use HTTP methods GET, PUT, DELETE for managing resources in the sense of https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods:
- GET retrieves a resource, e.g. GET
/users/test-user - PUT registers a resource or replaces an existing resource and behaves idempotent,
e.g. PUT
/users/test-userwill create the usertest-useror replace them if already existing - DELETE removes a resource from dserver
- GET retrieves a resource, e.g. GET
- use HTTP response codes to transparently indicate errors in the sense of https://developer.mozilla.org/en-US/docs/Web/HTTP/Status, e.g.
- 200 OK, Request succeeded, e.g. used by
- GET to indicate the resource has been fetched and transmitted,
- PUT to indicate an existing resource has been updated successfully,
- DELETE to indicate successful removal of a resource
- 201 Created, The request succeeded, and a new resource was created as a result, e.g. used by PUT if the resource had not existed before the request and has been newly created
- 400 Bad Request, e.g. a dataset to be registered is not valid.
- 401 Unauthorized, semantically this response means "unauthenticated", e.g. user needs to authenticate to access the resource.
- 403 Forbidden, client does not have access rights to the content, e.g. user is authenticated and known to the server, but lacks admin rights to access the specified resource
- 404 Not Found, server cannot find the requested resource, e.g. user is authenticated and has permissions to search a specific base URI, but no dataset entry exists for the requested URI
- Integrated openapi
- Pagination for all listing endpoints
- Defined schemas for endpoint arguments
- Missing and improved docstrings for endpoints
- Replaces get_json() uses for the use of request's arguments
- Flask CLI commands for inspecting app configuration
/config/versionsroute- Entrypoints
extensions,search,retrievefor plugins - Abstract base classes for plugins
- Plugins provied a metho
get_config_secrets_to_obfuscatethat tells the core app which configuration parameters are not to be reported clear text - Sample
wsgi.pyscript for wrapping Flask app and dumping all HTTP requests and responses
- The frozen_at and created_at fields for /dataset/register endpoint are string representation of the floating point value. Previously the application was permissive and accepted any integer, float or string type. The type sanitation shall happen in the API client.
- When registering a dataset the readme should now be provided as a string (text) rather than as a dictionary of key value entries
- The
/config/inforoute now provides a dump of the actual Flask app config - Expose
X-Paginationheaders per default.
pluginsentrypoint
- Made code compatible with flask-jwt-extended version 4 API #19
- Resolve SQLAlchemy warnings about conflicting relationships #20
- Resolve SQLAlchemy warning about cartesian product
- Fixed version of flask-jwt-extended to be less than 4 to fix #19
Improved user management.
- Added
flask user deleteCLI command - Added
flask user updateCLI command - Added
dtool_lookup_server.utils.delete_usershelper function - Added
dtool_lookup_server.utils.update_usershelper function
- Moved
iter_datasets_in_base_urifromdtool_lookup_server.utilstodtoolcore
- Fixed issues registering datasets with "too much" metadata, resulting in datasets information JSON documents that were too large for the mongo database. These datasets are now ignored. See issue 16 for more information:
This release makes it possible to create plugins to the dtool-lookup-server!
Many thanks to Johannes L. H�rmann and Lars Pastewka for bug reports, design discussions and code contributions.
- Added hook to allow the loading of plugins. Scaffold code for implementing a plugin can be found in https://github.com/livMatS/dserver-plugin-scaffolding. For examples of actual plugins see: https://github.com/livMatS/dserver-dependency-graph-plugin and https://github.com/livMatS/dserver-plugin-scaffolding
- Added /config route; see #6
- Added ability to filter searches by UUID by supplying
uuidskeyword and list of UUIDs of interest to a query submitted to the /dataset/search route; see #8 - Added dtool_lookup_server.utils.preprocess_query_base_uris helper function; see #7 and #10
- Fixed timestamps returned form /dataset/search route; they are now returned as floats rather than as strings; see #3
- Fixed defect in
flask user tokenCLI command when using python3; see #5
- Made /dataset/summary route able to cope with individual datasets in the mongo database missing the tags key
- Added "tags" and "datasets_per_tag" keys to JSON response from /dataset/summary route
- Added ability to filter/search based on tags
- Registering a dataset now requires a key for
tagsin the JSON content
- Added /dataset/annotations route to which one can POST a URI and get back the associated dataset annotations
- Registering a dataset now requires a key for
annotationsin the JSON content - The /dataset/search route no longer returns manifest and readme in the body of the JSON response. These will now have to be retrieved using the /dataset/manifest and /dataset/readme routes respectively. This change was implemented to overcome the slow response time when accessing many (>1000) datasets using the /dataset/search route.
- Made registration of datasets more tolerant to type of frozen_at in admin_metadata, now accepts value as a string
- Added /dataset/manifest route to which one can POST a URI and get back the associated dataset manifest
- Added /dataset/readme route to which one can POST a URI and get back the associated dataset readme
- Ability to log request headers in debug mode
- Added logic to config.Config that ignores
JWT_PRIVATE_KEY_FILEandJWT_PUBLIC_KEY_FILEifJWT_PUBLIC_KEYis set in the environment. This makes it easier to configure thedtool-lookup-serverto make use of tokens generated from another server. In other words where the private key file is maintained in a different service.
- Improved the JSON query format when sending POST requests to the /dataset/search route
- Added "/dataset/summary" route with summary information about the datasets accessible to a user
- Added the manifest structural metadata to the MongoDB
- Made "/dataset/register" route more robust when "created_at" is a string as opposed to a floating point value
- Added
frozen_atcolumn to admin metadata stored in SQL table - Added
created_atcolumn to admin metadata stored in SQL table - Added Ansible provisioning script to git repository
dtool_lookup_server.utils.dataset_info_is_valid()helper function now returns false if "frozen_at" is missing.
- Made /dataset/register route more robust if base URI has not been registered
- Added support for Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible
- Added
creator_usernamecolumn to admin metadata stored in SQL table
dtool_lookup_server.utils.dataset_info_is_valid()helper function now return s false if "creator_username" is missing.
Added authentication and authorization!
New and replacement routes.
- /admin/base_uri/list
- /admin/base_uri/register
- /dataset/list
- /dataset/lookup/<uuid>
- /dataset/register
- /dataset/search
- /admin/permission/info
- /admin/permission/update_on_base_uri
- /user/info/<username>
- /admin/user/list
- /admin/user/register
Flask CLI utilities for managing dserver.
flask base_uri addflask base_uri indexflask base_uri listflask user addflask user listflask user register_permissionflask user search_permissionflask user token
All previous routes.
- /register_dataset route
- /lookup_datasets route
- /search_for_datasets route
- Add ability to update a record
- Add inclusion of descriptive metadata from README to mass_registration.py script
- Add entire document wild card search indexing
- Ability to mass register datasets from a base URI
- Ability to search for datasets
Initial release
- Ability to view the number of registered datasets
- Ability to register a dataset
- Ability to access the copies of a dataset associated with a UUID