dservercore 0.20.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dservercore-0.20.0/.dockerignore +13 -0
- dservercore-0.20.0/.github/dependabot.yml +17 -0
- dservercore-0.20.0/.github/workflows/publish.yml +51 -0
- dservercore-0.20.0/.github/workflows/test.yml +61 -0
- dservercore-0.20.0/.gitignore +25 -0
- dservercore-0.20.0/.readthedocs.yaml +26 -0
- dservercore-0.20.0/CHANGELOG.rst +451 -0
- dservercore-0.20.0/CONTRIBUTORS.rst +7 -0
- dservercore-0.20.0/LICENSE +21 -0
- dservercore-0.20.0/MANIFEST.in +3 -0
- dservercore-0.20.0/PKG-INFO +857 -0
- dservercore-0.20.0/README.rst +802 -0
- dservercore-0.20.0/SPEC.rst +418 -0
- dservercore-0.20.0/docs/.gitignore +2 -0
- dservercore-0.20.0/docs/Makefile +20 -0
- dservercore-0.20.0/docs/api.rst +8 -0
- dservercore-0.20.0/docs/changelog.rst +1 -0
- dservercore-0.20.0/docs/conf.py +48 -0
- dservercore-0.20.0/docs/icons/22x22/dtool_logo.png +0 -0
- dservercore-0.20.0/docs/index.rst +24 -0
- dservercore-0.20.0/docs/make.bat +35 -0
- dservercore-0.20.0/docs/readme.rst +1 -0
- dservercore-0.20.0/docs/requirements.txt +4 -0
- dservercore-0.20.0/dservercore/__init__.py +335 -0
- dservercore-0.20.0/dservercore/annotations_routes.py +49 -0
- dservercore-0.20.0/dservercore/base_uri_routes.py +153 -0
- dservercore-0.20.0/dservercore/blueprint.py +15 -0
- dservercore-0.20.0/dservercore/cli.py +268 -0
- dservercore-0.20.0/dservercore/config.py +98 -0
- dservercore-0.20.0/dservercore/config_routes.py +47 -0
- dservercore-0.20.0/dservercore/date_utils.py +22 -0
- dservercore-0.20.0/dservercore/extensions.py +8 -0
- dservercore-0.20.0/dservercore/manifest_routes.py +49 -0
- dservercore-0.20.0/dservercore/me_routes.py +50 -0
- dservercore-0.20.0/dservercore/readme_routes.py +48 -0
- dservercore-0.20.0/dservercore/schemas.py +83 -0
- dservercore-0.20.0/dservercore/sort.py +260 -0
- dservercore-0.20.0/dservercore/sql_models.py +173 -0
- dservercore-0.20.0/dservercore/tags_routes.py +49 -0
- dservercore-0.20.0/dservercore/templates/index.html +9 -0
- dservercore-0.20.0/dservercore/uri_routes.py +197 -0
- dservercore-0.20.0/dservercore/user_routes.py +169 -0
- dservercore-0.20.0/dservercore/utils.py +1050 -0
- dservercore-0.20.0/dservercore/utils_auth.py +74 -0
- dservercore-0.20.0/dservercore/uuid_routes.py +44 -0
- dservercore-0.20.0/dservercore/version.py +16 -0
- dservercore-0.20.0/dservercore.egg-info/PKG-INFO +857 -0
- dservercore-0.20.0/dservercore.egg-info/SOURCES.txt +104 -0
- dservercore-0.20.0/dservercore.egg-info/dependency_links.txt +1 -0
- dservercore-0.20.0/dservercore.egg-info/entry_points.txt +5 -0
- dservercore-0.20.0/dservercore.egg-info/requires.txt +24 -0
- dservercore-0.20.0/dservercore.egg-info/top_level.txt +1 -0
- dservercore-0.20.0/icons/22x22/dtool_logo.png +0 -0
- dservercore-0.20.0/provision/.gitignore +3 -0
- dservercore-0.20.0/provision/playbook.yml +17 -0
- dservercore-0.20.0/provision/roles/dtool_lookup_server/files/start_gunicorn.sh +5 -0
- dservercore-0.20.0/provision/roles/dtool_lookup_server/tasks/main.yml +43 -0
- dservercore-0.20.0/provision/roles/dtool_lookup_server/templates/load_env.sh +7 -0
- dservercore-0.20.0/provision/roles/epel/tasks/main.yml +6 -0
- dservercore-0.20.0/provision/roles/firewalld/tasks/main.yml +28 -0
- dservercore-0.20.0/provision/roles/mongodb/tasks/main.yml +20 -0
- dservercore-0.20.0/provision/roles/nginx/files/nginx.conf +90 -0
- dservercore-0.20.0/provision/roles/nginx/handlers/main.yml +6 -0
- dservercore-0.20.0/provision/roles/nginx/tasks/main.yml +24 -0
- dservercore-0.20.0/provision/roles/nginx/templates/dtool_lookup_server.conf +23 -0
- dservercore-0.20.0/provision/roles/ntp/handlers/main.yml +6 -0
- dservercore-0.20.0/provision/roles/ntp/tasks/main.yml +18 -0
- dservercore-0.20.0/provision/roles/ntp/templates/ntp.conf +7 -0
- dservercore-0.20.0/provision/roles/python_tools/tasks/main.yml +6 -0
- dservercore-0.20.0/pyproject.toml +60 -0
- dservercore-0.20.0/registration_utils/.gitignore +4 -0
- dservercore-0.20.0/registration_utils/deprecated-mass_registration.py +64 -0
- dservercore-0.20.0/registration_utils/get_token.sh +31 -0
- dservercore-0.20.0/registration_utils/register.py +162 -0
- dservercore-0.20.0/registration_utils/requirements.txt +4 -0
- dservercore-0.20.0/requirements.txt +1 -0
- dservercore-0.20.0/setup.cfg +14 -0
- dservercore-0.20.0/tests/conftest.py +375 -0
- dservercore-0.20.0/tests/test_base_uri_routes.py +266 -0
- dservercore-0.20.0/tests/test_cli.py +252 -0
- dservercore-0.20.0/tests/test_config.py +7 -0
- dservercore-0.20.0/tests/test_config_routes.py +74 -0
- dservercore-0.20.0/tests/test_lookup_datasets_by_user_and_uuid.py +20 -0
- dservercore-0.20.0/tests/test_me_routes.py +153 -0
- dservercore-0.20.0/tests/test_metadata_retrieval_routes.py +311 -0
- dservercore-0.20.0/tests/test_sorting.py +418 -0
- dservercore-0.20.0/tests/test_sql_dataset_utils.py +41 -0
- dservercore-0.20.0/tests/test_sql_list_datasets_by_user.py +72 -0
- dservercore-0.20.0/tests/test_summary_of_datasets_by_user.py +18 -0
- dservercore-0.20.0/tests/test_timestamp_consistency.py +24 -0
- dservercore-0.20.0/tests/test_uri_routes.py +1056 -0
- dservercore-0.20.0/tests/test_user_routes.py +478 -0
- dservercore-0.20.0/tests/test_utils.py +13 -0
- dservercore-0.20.0/tests/test_utils_auth.py +48 -0
- dservercore-0.20.0/tests/test_utils_base_uri_management.py +19 -0
- dservercore-0.20.0/tests/test_utils_dataset_info_is_valid.py +62 -0
- dservercore-0.20.0/tests/test_utils_get_annotations_from_uri_by_user.py +34 -0
- dservercore-0.20.0/tests/test_utils_get_manifest_from_uri_by_user.py +45 -0
- dservercore-0.20.0/tests/test_utils_get_readme_from_uri_by_user.py +34 -0
- dservercore-0.20.0/tests/test_utils_permission_management.py +97 -0
- dservercore-0.20.0/tests/test_utils_preprocess_query_base_uris.py +28 -0
- dservercore-0.20.0/tests/test_utils_register_dataset.py +302 -0
- dservercore-0.20.0/tests/test_utils_user_management.py +156 -0
- dservercore-0.20.0/tests/test_uuid_routes.py +33 -0
- dservercore-0.20.0/tox.ini +13 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
# Maintain dependencies for GitHub Actions
|
|
9
|
+
- package-ecosystem: "github-actions"
|
|
10
|
+
directory: "/"
|
|
11
|
+
schedule:
|
|
12
|
+
interval: "daily"
|
|
13
|
+
|
|
14
|
+
- package-ecosystem: "pip"
|
|
15
|
+
directory: "/"
|
|
16
|
+
schedule:
|
|
17
|
+
interval: "daily"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
tags:
|
|
9
|
+
- '*'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Set up Python 3.8
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: 3.8
|
|
25
|
+
|
|
26
|
+
- name: Install requirements
|
|
27
|
+
run: |
|
|
28
|
+
pip install --upgrade build
|
|
29
|
+
pip install --upgrade setuptools wheel setuptools-scm[toml]
|
|
30
|
+
pip list
|
|
31
|
+
|
|
32
|
+
- name: Package distribution
|
|
33
|
+
run: |
|
|
34
|
+
python -m build
|
|
35
|
+
|
|
36
|
+
- name: Publish distribution to Test PyPI
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
38
|
+
with:
|
|
39
|
+
user: __token__
|
|
40
|
+
password: ${{ secrets.test_pypi_password }}
|
|
41
|
+
repository-url: https://test.pypi.org/legacy/
|
|
42
|
+
verbose: true
|
|
43
|
+
skip-existing: true
|
|
44
|
+
|
|
45
|
+
- name: Publish distribution to PyPI
|
|
46
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
47
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
48
|
+
with:
|
|
49
|
+
user: __token__
|
|
50
|
+
password: ${{ secrets.pypi_password }}
|
|
51
|
+
verbose: true
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
tags:
|
|
9
|
+
- '*'
|
|
10
|
+
pull_request:
|
|
11
|
+
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
strategy:
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
|
|
21
|
+
mongodb-version: ['4.2', '4.4', '5.0', '6.0']
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: set up python3 ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: start MongoDB
|
|
33
|
+
uses: supercharge/mongodb-github-action@1.11.0
|
|
34
|
+
with:
|
|
35
|
+
mongodb-version: ${{ matrix.mongodb-version }}
|
|
36
|
+
|
|
37
|
+
- name: install requirements
|
|
38
|
+
run: |
|
|
39
|
+
python -m pip install --upgrade pip
|
|
40
|
+
pip install --upgrade setuptools wheel setuptools-scm[toml] importlib-metadata
|
|
41
|
+
pip install flake8 pytest pytest-cov
|
|
42
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
43
|
+
pip install .
|
|
44
|
+
pip list
|
|
45
|
+
|
|
46
|
+
- name: install search and retrieve plugins
|
|
47
|
+
run: |
|
|
48
|
+
# This should move into the strategy matrix once released
|
|
49
|
+
pip install git+https://github.com/livMatS/dserver-search-plugin-mongo.git@main
|
|
50
|
+
pip install git+https://github.com/livMatS/dserver-retrieve-plugin-mongo.git@main
|
|
51
|
+
|
|
52
|
+
- name: test with pytest
|
|
53
|
+
run: |
|
|
54
|
+
pytest -sv
|
|
55
|
+
|
|
56
|
+
- name: lint with flake8
|
|
57
|
+
run: |
|
|
58
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
59
|
+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
60
|
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
61
|
+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
dservercore/version.py
|
|
2
|
+
app.db
|
|
3
|
+
TODO.rst
|
|
4
|
+
.coverage
|
|
5
|
+
|
|
6
|
+
*.swp
|
|
7
|
+
*.pyc
|
|
8
|
+
*.egg-info
|
|
9
|
+
*.pdf
|
|
10
|
+
|
|
11
|
+
test_rsa*
|
|
12
|
+
migrations/*
|
|
13
|
+
data/*
|
|
14
|
+
env*
|
|
15
|
+
.cache/*
|
|
16
|
+
.pytest_cache/*
|
|
17
|
+
.tox/*
|
|
18
|
+
dist/*
|
|
19
|
+
keys/*
|
|
20
|
+
venv/*
|
|
21
|
+
old-provision/*
|
|
22
|
+
jwt-spike/*
|
|
23
|
+
keys/*
|
|
24
|
+
|
|
25
|
+
.idea/*
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the OS, Python version and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-22.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.12"
|
|
13
|
+
|
|
14
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
15
|
+
sphinx:
|
|
16
|
+
configuration: docs/conf.py
|
|
17
|
+
|
|
18
|
+
# Optional but recommended, declare the Python requirements required
|
|
19
|
+
# to build your documentation
|
|
20
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
21
|
+
python:
|
|
22
|
+
install:
|
|
23
|
+
- method: pip
|
|
24
|
+
path: .
|
|
25
|
+
extra_requirements:
|
|
26
|
+
- docs
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
CHANGELOG
|
|
2
|
+
=========
|
|
3
|
+
|
|
4
|
+
This project uses `semantic versioning <http://semver.org/>`_.
|
|
5
|
+
This change log uses principles from `keep a changelog <http://keepachangelog.com/>`_.
|
|
6
|
+
|
|
7
|
+
[0.20.0]
|
|
8
|
+
--------
|
|
9
|
+
|
|
10
|
+
Changed
|
|
11
|
+
^^^^^^^
|
|
12
|
+
|
|
13
|
+
- Renamed from ``dtool-lookup-server`` to ``dservercore``
|
|
14
|
+
|
|
15
|
+
[0.19.0] - 2024-06-12
|
|
16
|
+
---------------------
|
|
17
|
+
|
|
18
|
+
Added
|
|
19
|
+
^^^^^
|
|
20
|
+
|
|
21
|
+
- Sorting mechanism in analogy to ``flask_smorest``'s Pagination mechanism
|
|
22
|
+
- Deletion, put, and patch routes
|
|
23
|
+
- ``/tags`` tag retrieval route
|
|
24
|
+
|
|
25
|
+
Changed
|
|
26
|
+
^^^^^^^
|
|
27
|
+
|
|
28
|
+
- 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
|
|
29
|
+
- Forward slash separator indicates hierarchical relationship,
|
|
30
|
+
and URI path conveys the REST API's resource model,
|
|
31
|
+
e.g. ``/users/test-user``, ``/base-uris/smb/test-share``, ``/uris/s3/test-bucket/aad1c62b-b184-422b-841e-ac68eda26fe7``
|
|
32
|
+
- Hyphens used to improve readability and underscores avoided in URIs,
|
|
33
|
+
e.g. ``/base-uris`` instead of ``/base_uris``
|
|
34
|
+
- Plural nouns are used for collections, e.g. ``/users``, ``/base-uris``
|
|
35
|
+
- Singular nouns are used for specific documents, e.g. ``/users/test-user/summary``
|
|
36
|
+
- Query component of a URI used to filter collections, e.g. ``/uris?creator_usernames=test-user&free_text=apple``
|
|
37
|
+
- Query component of URI used to paginate and sort collections , e.g. ``/users?page=2&page_size=5&sort=is_admin,-username``
|
|
38
|
+
- use HTTP methods GET, PUT, DELETE for managing resources in the sense of https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods:
|
|
39
|
+
- GET retrieves a resource, e.g. GET ``/users/test-user``
|
|
40
|
+
- PUT registers a resource or replaces an existing resource and behaves idempotent,
|
|
41
|
+
e.g. PUT ``/users/test-user`` will create the user ``test-user`` or replace them if already existing
|
|
42
|
+
- DELETE removes a resource from dserver
|
|
43
|
+
- use HTTP response codes to transparently indicate errors in the sense of https://developer.mozilla.org/en-US/docs/Web/HTTP/Status, e.g.
|
|
44
|
+
- 200 OK, Request succeeded, e.g. used by
|
|
45
|
+
- GET to indicate the resource has been fetched and transmitted,
|
|
46
|
+
- PUT to indicate an existing resource has been updated successfully,
|
|
47
|
+
- DELETE to indicate successful removal of a resource
|
|
48
|
+
- 201 Created, The request succeeded, and a new resource was created as a result,
|
|
49
|
+
e.g. used by PUT if the resource had not existed before the request and has been newly created
|
|
50
|
+
- 400 Bad Request, e.g. a dataset to be registered is not valid.
|
|
51
|
+
- 401 Unauthorized, semantically this response means "unauthenticated",
|
|
52
|
+
e.g. user needs to authenticate to access the resource.
|
|
53
|
+
- 403 Forbidden, client does not have access rights to the content,
|
|
54
|
+
e.g. user is authenticated and known to the server, but lacks admin rights to access the specified resource
|
|
55
|
+
- 404 Not Found, server cannot find the requested resource,
|
|
56
|
+
e.g. user is authenticated and has permissions to search a specific base URI, but no dataset entry exists for the requested URI
|
|
57
|
+
|
|
58
|
+
Deprecated
|
|
59
|
+
^^^^^^^^^^
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Removed
|
|
63
|
+
^^^^^^^
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Fixed
|
|
67
|
+
^^^^^
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
Security
|
|
71
|
+
^^^^^^^^
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
[0.18.0] - 2023-08-13
|
|
75
|
+
---------------------
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
Added
|
|
79
|
+
^^^^^
|
|
80
|
+
|
|
81
|
+
- Integrated openapi
|
|
82
|
+
- Pagination for all listing endpoints
|
|
83
|
+
- Defined schemas for endpoint arguments
|
|
84
|
+
- Missing and improved docstrings for endpoints
|
|
85
|
+
- Replaces get_json() uses for the use of request's arguments
|
|
86
|
+
- Flask CLI commands for inspecting app configuration
|
|
87
|
+
- ``/config/versions`` route
|
|
88
|
+
- Entrypoints ``extensions``, ``search``, ``retrieve`` for plugins
|
|
89
|
+
- Abstract base classes for plugins
|
|
90
|
+
- Plugins provied a metho ``get_config_secrets_to_obfuscate`` that tells the core app which configuration parameters are not to be reported clear text
|
|
91
|
+
- Sample ``wsgi.py`` script for wrapping Flask app and dumping all HTTP requests and responses
|
|
92
|
+
|
|
93
|
+
Changed
|
|
94
|
+
^^^^^^^
|
|
95
|
+
|
|
96
|
+
- The frozen_at and created_at fields for /dataset/register endpoint are string representation of the floating point
|
|
97
|
+
value. Previously the application was permissive and accepted any integer, float or string type. The type sanitation
|
|
98
|
+
shall happen in the API client.
|
|
99
|
+
- When registering a dataset the readme should now be provided as a string
|
|
100
|
+
(text) rather than as a dictionary of key value entries
|
|
101
|
+
- The ``/config/info`` route now provides a dump of the actual Flask app config
|
|
102
|
+
- Expose ``X-Pagination`` headers per default.
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
Removed
|
|
106
|
+
^^^^^^^
|
|
107
|
+
|
|
108
|
+
- ``plugins`` entrypoint
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
[0.17.2] - 2021-05-17
|
|
113
|
+
---------------------
|
|
114
|
+
|
|
115
|
+
Fixed
|
|
116
|
+
^^^^^
|
|
117
|
+
|
|
118
|
+
- Made code compatible with flask-jwt-extended version 4 API
|
|
119
|
+
https://github.com/jic-dtool/dservercore/issues/19
|
|
120
|
+
- Resolve SQLAlchemy warnings about conflicting relationships
|
|
121
|
+
https://github.com/jic-dtool/dservercore/issues/20
|
|
122
|
+
- Resolve SQLAlchemy warning about cartesian product
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
[0.17.1] - 2021-05-12
|
|
127
|
+
---------------------
|
|
128
|
+
|
|
129
|
+
Fixed
|
|
130
|
+
^^^^^
|
|
131
|
+
|
|
132
|
+
- Fixed version of flask-jwt-extended to be less than 4 to fix
|
|
133
|
+
https://github.com/jic-dtool/dservercore/issues/19
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
[0.17.0] - 2021-03-15
|
|
137
|
+
---------------------
|
|
138
|
+
|
|
139
|
+
Improved user management.
|
|
140
|
+
|
|
141
|
+
Added
|
|
142
|
+
^^^^^
|
|
143
|
+
|
|
144
|
+
- Added ``flask user delete`` CLI command
|
|
145
|
+
- Added ``flask user update`` CLI command
|
|
146
|
+
- Added ``dtool_lookup_server.utils.delete_users`` helper function
|
|
147
|
+
- Added ``dtool_lookup_server.utils.update_users`` helper function
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
[0.16.0] - 2020-11-23
|
|
151
|
+
---------------------
|
|
152
|
+
|
|
153
|
+
Changed
|
|
154
|
+
^^^^^^^
|
|
155
|
+
|
|
156
|
+
- Moved ``iter_datasets_in_base_uri`` from ``dtool_lookup_server.utils`` to ``dtoolcore``
|
|
157
|
+
|
|
158
|
+
Fixed
|
|
159
|
+
^^^^^
|
|
160
|
+
|
|
161
|
+
- Fixed issues registering datasets with "too much" metadata, resulting in datasets
|
|
162
|
+
information JSON documents that were too large for the mongo database. These datasets
|
|
163
|
+
are now ignored. See
|
|
164
|
+
`issue 16 <https://github.com/jic-dtool/dservercore/issues/16>`_
|
|
165
|
+
for more information:
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
[0.15.0] - 2020-10-15
|
|
170
|
+
---------------------
|
|
171
|
+
|
|
172
|
+
This release makes it possible to create plugins to the dtool-lookup-server!
|
|
173
|
+
|
|
174
|
+
Many thanks to `Johannes L. H�rmann <https://github.com/jotelha>`_ and `Lars
|
|
175
|
+
Pastewka <https://github.com/pastewka>`_ for bug reports, design discussions
|
|
176
|
+
and code contributions.
|
|
177
|
+
|
|
178
|
+
Added
|
|
179
|
+
^^^^^
|
|
180
|
+
|
|
181
|
+
- Added hook to allow the loading of plugins. Scaffold code for implementing a
|
|
182
|
+
plugin can be found in
|
|
183
|
+
https://github.com/livMatS/dserver-plugin-scaffolding.
|
|
184
|
+
For examples of actual plugins see:
|
|
185
|
+
https://github.com/livMatS/dserver-dependency-graph-plugin
|
|
186
|
+
and
|
|
187
|
+
https://github.com/livMatS/dserver-plugin-scaffolding
|
|
188
|
+
- Added /config route; see
|
|
189
|
+
https://github.com/jic-dtool/dservercore/pull/6
|
|
190
|
+
- Added ability to filter searches by UUID by supplying ``uuids`` keyword and list of
|
|
191
|
+
UUIDs of interest to a query submitted to the /dataset/search route; see
|
|
192
|
+
https://github.com/jic-dtool/dservercore/pull/8
|
|
193
|
+
- Added dtool_lookup_server.utils.preprocess_query_base_uris helper function; see
|
|
194
|
+
https://github.com/jic-dtool/dservercore/pull/7 and
|
|
195
|
+
https://github.com/jic-dtool/dservercore/issues/10
|
|
196
|
+
|
|
197
|
+
Fixed
|
|
198
|
+
^^^^^
|
|
199
|
+
|
|
200
|
+
- Fixed timestamps returned form /dataset/search route; they are now returned
|
|
201
|
+
as floats rather than as strings; see
|
|
202
|
+
https://github.com/jic-dtool/dservercore/issues/3
|
|
203
|
+
- Fixed defect in ``flask user token`` CLI command when using python3; see
|
|
204
|
+
https://github.com/jic-dtool/dservercore/pull/5
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
[0.14.1] - 2020-04-02
|
|
208
|
+
---------------------
|
|
209
|
+
|
|
210
|
+
Fixed
|
|
211
|
+
^^^^^
|
|
212
|
+
|
|
213
|
+
- Made /dataset/summary route able to cope with individual datasets in the
|
|
214
|
+
mongo database missing the tags key
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
[0.14.0] - 2020-04-01
|
|
218
|
+
---------------------
|
|
219
|
+
|
|
220
|
+
Added
|
|
221
|
+
^^^^^
|
|
222
|
+
|
|
223
|
+
- Added "tags" and "datasets_per_tag" keys to JSON response from
|
|
224
|
+
/dataset/summary route
|
|
225
|
+
- Added ability to filter/search based on tags
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
Changed
|
|
229
|
+
^^^^^^^
|
|
230
|
+
|
|
231
|
+
- Registering a dataset now requires a key for ``tags`` in the JSON
|
|
232
|
+
content
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
[0.13.0] - 2020-03-10
|
|
236
|
+
---------------------
|
|
237
|
+
|
|
238
|
+
Added
|
|
239
|
+
^^^^^
|
|
240
|
+
|
|
241
|
+
- Added /dataset/annotations route to which one can POST a URI and get back the
|
|
242
|
+
associated dataset annotations
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
Changed
|
|
246
|
+
^^^^^^^
|
|
247
|
+
|
|
248
|
+
- Registering a dataset now requires a key for ``annotations`` in the JSON
|
|
249
|
+
content
|
|
250
|
+
- The /dataset/search route no longer returns manifest and readme in the body
|
|
251
|
+
of the JSON response. These will now have to be retrieved using the
|
|
252
|
+
/dataset/manifest and /dataset/readme routes respectively. This change was
|
|
253
|
+
implemented to overcome the slow response time when accessing many (>1000)
|
|
254
|
+
datasets using the /dataset/search route.
|
|
255
|
+
|
|
256
|
+
Fixed
|
|
257
|
+
^^^^^
|
|
258
|
+
|
|
259
|
+
- Made registration of datasets more tolerant to type of frozen_at in
|
|
260
|
+
admin_metadata, now accepts value as a string
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
[0.12.0] - 2020-02-27
|
|
264
|
+
---------------------
|
|
265
|
+
|
|
266
|
+
Added
|
|
267
|
+
^^^^^
|
|
268
|
+
|
|
269
|
+
- Added /dataset/manifest route to which one can POST a URI and get back the
|
|
270
|
+
associated dataset manifest
|
|
271
|
+
- Added /dataset/readme route to which one can POST a URI and get back the
|
|
272
|
+
associated dataset readme
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
[0.11.0] - 2019-07-08
|
|
276
|
+
---------------------
|
|
277
|
+
|
|
278
|
+
Added
|
|
279
|
+
^^^^^
|
|
280
|
+
|
|
281
|
+
- Ability to log request headers in debug mode
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
[0.10.0] - 2019-06-14
|
|
285
|
+
---------------------
|
|
286
|
+
|
|
287
|
+
Changed
|
|
288
|
+
^^^^^^^
|
|
289
|
+
|
|
290
|
+
- Added logic to config.Config that ignores ``JWT_PRIVATE_KEY_FILE`` and
|
|
291
|
+
``JWT_PUBLIC_KEY_FILE`` if ``JWT_PUBLIC_KEY`` is set in the environment.
|
|
292
|
+
This makes it easier to configure the ``dtool-lookup-server`` to make use
|
|
293
|
+
of tokens generated from another server. In other words where the private
|
|
294
|
+
key file is maintained in a different service.
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
[0.9.0] - 2019-06-06
|
|
298
|
+
--------------------
|
|
299
|
+
|
|
300
|
+
Changed
|
|
301
|
+
^^^^^^^
|
|
302
|
+
|
|
303
|
+
- Improved the JSON query format when sending POST requests to the
|
|
304
|
+
/dataset/search route
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
[0.8.0] - 2019-06-03
|
|
308
|
+
--------------------
|
|
309
|
+
|
|
310
|
+
Added
|
|
311
|
+
^^^^^
|
|
312
|
+
|
|
313
|
+
- Added "/dataset/summary" route with summary information about the datasets
|
|
314
|
+
accessible to a user
|
|
315
|
+
- Added the manifest structural metadata to the MongoDB
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
[0.7.1] - 2019-05-09
|
|
319
|
+
--------------------
|
|
320
|
+
|
|
321
|
+
- Made "/dataset/register" route more robust when "created_at" is a
|
|
322
|
+
string as opposed to a floating point value
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
[0.7.0] - 2019-05-09
|
|
326
|
+
--------------------
|
|
327
|
+
|
|
328
|
+
Added
|
|
329
|
+
^^^^^
|
|
330
|
+
|
|
331
|
+
- Added ``frozen_at`` column to admin metadata stored in SQL table
|
|
332
|
+
- Added ``created_at`` column to admin metadata stored in SQL table
|
|
333
|
+
- Added Ansible provisioning script to git repository
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
Changed
|
|
337
|
+
^^^^^^^
|
|
338
|
+
|
|
339
|
+
- ``dtool_lookup_server.utils.dataset_info_is_valid()`` helper function now
|
|
340
|
+
returns false if "frozen_at" is missing.
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
Fixed
|
|
344
|
+
^^^^^
|
|
345
|
+
|
|
346
|
+
- Made /dataset/register route more robust if base URI has not been registered
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
[0.6.0] - 2019-05-02
|
|
351
|
+
--------------------
|
|
352
|
+
|
|
353
|
+
Added
|
|
354
|
+
^^^^^
|
|
355
|
+
|
|
356
|
+
- Added support for Cross Origin Resource Sharing (CORS), making cross-origin
|
|
357
|
+
AJAX possible
|
|
358
|
+
- Added ``creator_username`` column to admin metadata stored in SQL table
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
Changed
|
|
362
|
+
^^^^^^^
|
|
363
|
+
|
|
364
|
+
- ``dtool_lookup_server.utils.dataset_info_is_valid()`` helper function now
|
|
365
|
+
return s false if "creator_username" is missing.
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
[0.5.0] - 2019-04-01
|
|
369
|
+
--------------------
|
|
370
|
+
|
|
371
|
+
Added authentication and authorization!
|
|
372
|
+
|
|
373
|
+
Added
|
|
374
|
+
^^^^^
|
|
375
|
+
|
|
376
|
+
New and replacement routes.
|
|
377
|
+
|
|
378
|
+
- /admin/base_uri/list
|
|
379
|
+
- /admin/base_uri/register
|
|
380
|
+
- /dataset/list
|
|
381
|
+
- /dataset/lookup/<uuid>
|
|
382
|
+
- /dataset/register
|
|
383
|
+
- /dataset/search
|
|
384
|
+
- /admin/permission/info
|
|
385
|
+
- /admin/permission/update_on_base_uri
|
|
386
|
+
- /user/info/<username>
|
|
387
|
+
- /admin/user/list
|
|
388
|
+
- /admin/user/register
|
|
389
|
+
|
|
390
|
+
Flask CLI utilities for managing dserver.
|
|
391
|
+
|
|
392
|
+
- ``flask base_uri add``
|
|
393
|
+
- ``flask base_uri index``
|
|
394
|
+
- ``flask base_uri list``
|
|
395
|
+
- ``flask user add``
|
|
396
|
+
- ``flask user list``
|
|
397
|
+
- ``flask user register_permission``
|
|
398
|
+
- ``flask user search_permission``
|
|
399
|
+
- ``flask user token``
|
|
400
|
+
|
|
401
|
+
Removed
|
|
402
|
+
^^^^^^^
|
|
403
|
+
|
|
404
|
+
All previous routes.
|
|
405
|
+
|
|
406
|
+
- /register_dataset route
|
|
407
|
+
- /lookup_datasets route
|
|
408
|
+
- /search_for_datasets route
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
[0.4.0] - 2018-08-09
|
|
412
|
+
--------------------
|
|
413
|
+
|
|
414
|
+
Added
|
|
415
|
+
^^^^^
|
|
416
|
+
|
|
417
|
+
- Add ability to update a record
|
|
418
|
+
- Add inclusion of descriptive metadata from README to mass_registration.py
|
|
419
|
+
script
|
|
420
|
+
- Add entire document wild card search indexing
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
[0.3.0] - 2018-03-06
|
|
424
|
+
--------------------
|
|
425
|
+
|
|
426
|
+
Added
|
|
427
|
+
^^^^^
|
|
428
|
+
|
|
429
|
+
- Ability to mass register datasets from a base URI
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
[0.2.0] - 2018-03-06
|
|
433
|
+
--------------------
|
|
434
|
+
|
|
435
|
+
Added
|
|
436
|
+
^^^^^
|
|
437
|
+
|
|
438
|
+
- Ability to search for datasets
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
[0.1.0] - 2018-03-02
|
|
442
|
+
--------------------
|
|
443
|
+
|
|
444
|
+
Initial release
|
|
445
|
+
|
|
446
|
+
Added
|
|
447
|
+
^^^^^
|
|
448
|
+
|
|
449
|
+
- Ability to view the number of registered datasets
|
|
450
|
+
- Ability to register a dataset
|
|
451
|
+
- Ability to access the copies of a dataset associated with a UUID
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 jic-dtool
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|