Skip to content

Commit

Permalink
Merge branch 'release-v0.28.0' into 'master'
Browse files Browse the repository at this point in the history
Release v0.28.0

See merge request Scientific-IT-Systems/SampleDB!1105
  • Loading branch information
danielkaiser committed Jun 13, 2024
2 parents b61d4b0 + 871bead commit 8c619af
Show file tree
Hide file tree
Showing 348 changed files with 11,531 additions and 5,550 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ analyze-js:
# install static analysis packages
- npm install -g jshint semistandard
# run JSHint and semistandard for some JavaScript files
- jshint sampledb/static/sampledb/js/*.js sampledb/static/sampledb/js/*/*.js
- semistandard sampledb/static/sampledb/js/*.js sampledb/static/sampledb/js/*/*.js
- jshint sampledb/static/sampledb/js/*.js sampledb/static/sampledb/js/*/*.js sampledb/static/sampledb/js/*/*/*.js
- semistandard sampledb/static/sampledb/js/*.js sampledb/static/sampledb/js/*/*.js sampledb/static/sampledb/js/*/*/*.js

.template-check-migrations:
stage: test
Expand Down Expand Up @@ -192,7 +192,7 @@ check-migrations-postgres-15:
check-translations:
stage: test
needs: []
image: python:3.11-slim-bookworm
image: python:3.12-slim-bookworm
script:
- apt-get update
# set up Python 3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ curl https://raw.githubusercontent.com/sciapp/sampledb/develop/docker-compose.ym
Then simply bring everything up with:

```bash
docker-compose up -d
docker compose up -d
```

### Using docker commands
Expand Down Expand Up @@ -63,7 +63,7 @@ docker run \
--restart=always \
--name sampledb \
-p 8000:8000 \
sciapp/sampledb:0.27.0
sciapp/sampledb:0.28.0
```

### Once it's started
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml.dist
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# sampledb docker-compose configuration file
# use: "docker-compose up -d" to start containers
# use: "docker compose up -d" to start containers
# https://github.com/sciapp/sampledb
# Note: you will need to edit some values below to run it in production!
version: '3'

services:
web:
image: sciapp/sampledb:0.27.0
image: sciapp/sampledb:0.28.0
restart: always
container_name: sampledb
# Note: this config option works with docker-compose version >1.27
Expand Down
4 changes: 4 additions & 0 deletions docs/administrator_guide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Customization
- A file, http or https URL for a PNG or JPEG logo to be included in object export PDF documents
* - SAMPLEDB_PDFEXPORT_LOGO_ALIGNMENT
- The alignment (left, center or right) of the logo, if SAMPLEDB_PDFEXPORT_LOGO_URL is set (default: right)
* - SAMPLEDB_PDFEXPORT_LOGO_WIDTH
- The width of the logo in millimeters (default: 30). Large logos will overlap with the content of the object export, so make sure the size and alignment do not cause any issues.
* - SAMPLEDB_HELP_URL
- The URL to use for the help link

Expand Down Expand Up @@ -320,5 +322,7 @@ Miscellaneous
- You can set this option to disable the :ref:`Topics <topics>` feature. (default: False, Topics enabled)
* - SAMPLEDB_LABEL_PAPER_FORMATS
- Specifies label paper formats that can be used for qr code labels. For more information, see :ref:`Label Paper Formats <labels>`. (default: ``[]``)
* - SAMPLEDB_MIN_NUM_TEXT_CHOICES_FOR_SEARCH
- The minimum number of choices a text field needs to have for search to be enabled (default: 10). Set to 0 to enable search for all choice text fields or to -1 to disable search for them.

There are other configuration values related to packages used by SampleDB. For more information on those, see the documentation of the corresponding packages.
4 changes: 2 additions & 2 deletions docs/administrator_guide/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Next, start the SampleDB container:
--restart=always \
--name sampledb \
-p 8000:8000 \
sciapp/sampledb:0.27.0
sciapp/sampledb:0.28.0
This will start a minimal SampleDB installation at ``http://localhost:8000`` and allow you to sign in with the username ``admin`` and the password ``password``.

Expand Down Expand Up @@ -109,5 +109,5 @@ Next Steps
- You might want to create :ref:`groups` or :ref:`projects` to model your existing team structures. While this can be useful, it is completely optional as users can set these up themselves.
- You might want to create a basic hierarchy of :ref:`locations`. Like groups, users can create these themselves so this is optional.
- If you already have a JupyterHub installation or want to set up one, you might want to enable SampleDB :ref:`JupyterHub support <jupyterhub_support>`.
- SampleDB is still under active development. When a new version is released, you should consider :ref`upgrading your SampleDB installation <upgrading>`.
- SampleDB is still under active development. When a new version is released, you should consider :ref:`upgrading your SampleDB installation <upgrading>`.
- If you have any questions about SampleDB or run into any issues setting up or running SampleDB, please `create an issue on GitHub <https://github.com/sciapp/sampledb/issues/new>`_.
23 changes: 23 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
Changelog
=========

Version 0.28
------------

Released on June 13th, 2024.

- Fixed search via API in combination with name_only parameter
- Fixed search for datetime attributes not being timezone-aware
- Added ``timeline`` array style for arrays of objects with a ``datetime`` property
- Added search to text fields with more than 10 choices (configurable with ``SAMPLEDB_MIN_NUM_TEXT_CHOICES_FOR_SEARCH``)
- Added support for ``"first"`` and ``"last"`` statistic for timeseries
- Added badic and project groups to the HTTP API
- Allow using dicts for the ``style`` attribute
- Added support for ``"include"`` style for object reference properties
- Allow referenced objects in search queries
- Improved .eln export
- Added support for file references as display properties
- Allow configuring multiple workflow views
- Add support for ``sorting_properties`` for workflow views
- Allow revoking group invitations
- Added ``date`` and ``time`` styles for datetime values
- Added support for additional preview images for files uploaded via HTTP API
- Added ``expandable``, ``collapsible`` and ``horizontal`` object styles

Version 0.27
------------

Expand Down
214 changes: 210 additions & 4 deletions docs/developer_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,208 @@ Reading the current user
:>json string email: the user's email (only for API requests by administrators)
:statuscode 200: no error

Basic Groups
------------

Reading a list of all basic groups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. http:get:: /api/v1/groups/
Get a list of all basic groups.

**Example request**:

.. sourcecode:: http

GET /api/v1/groups/ HTTP/1.1
Host: iffsamples.fz-juelich.de
Accept: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

**Example response**:

.. sourcecode:: http

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"group_id": 1,
"name": {
"en": "Example Basic Group"
},
"description": {
"en": "This is an example basic group."
},
"member_users": [
{
"user_id": 1,
"href": "https://iffsamples.fz-juelich.de/api/v1/users/1"
}
]
}
]

:statuscode 200: no error


Reading a basic group
^^^^^^^^^^^^^^^^^^^^^

.. http:get:: /api/v1/groups/(int:group_id)
Get the specific basic group (`group_id`).

**Example request**:

.. sourcecode:: http

GET /api/v1/groups/1 HTTP/1.1
Host: iffsamples.fz-juelich.de
Accept: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

**Example response**:

.. sourcecode:: http

HTTP/1.1 200 OK
Content-Type: application/json

{
"group_id": 1,
"name": {
"en": "Example Basic Group"
},
"description": {
"en": "This is an example basic group."
},
"member_users": [
{
"user_id": 1,
"href": "https://iffsamples.fz-juelich.de/api/v1/users/1"
}
]
}

:>json number group_id: the basic group's ID
:>json object name: the basic group's name
:>json object description: the basic group's description
:>json array member_users: the basic group's member users
:statuscode 200: no error
:statuscode 404: the basic group does not exist

Project Groups
--------------

Reading a list of all project groups
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. http:get:: /api/v1/projects/
Get a list of all project groups.

**Example request**:

.. sourcecode:: http

GET /api/v1/projects/ HTTP/1.1
Host: iffsamples.fz-juelich.de
Accept: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

**Example response**:

.. sourcecode:: http

HTTP/1.1 200 OK
Content-Type: application/json

[
{
"project_id": 1,
"name": {
"en": "Example Project Group"
},
"description": {
"en": "This is an example project group."
},
"member_users": [
{
"user_id": 1,
"permissions": "grant",
"href": "https://iffsamples.fz-juelich.de/api/v1/users/1"
}
],
"member_groups": [
{
"group_id": 1,
"permissions": "read",
"href": "https://iffsamples.fz-juelich.de/api/v1/groups/1"
}
]
}
]

:statuscode 200: no error


Reading a project group
^^^^^^^^^^^^^^^^^^^^^^^

.. http:get:: /api/v1/projects/(int:project_id)
Get the specific project group (`project_id`).

**Example request**:

.. sourcecode:: http

GET /api/v1/projects/1 HTTP/1.1
Host: iffsamples.fz-juelich.de
Accept: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

**Example response**:

.. sourcecode:: http

HTTP/1.1 200 OK
Content-Type: application/json

{
"project_id": 1,
"name": {
"en": "Example Project Group"
},
"description": {
"en": "This is an example project group."
},
"member_users": [
{
"user_id": 1,
"permissions": "grant",
"href": "https://iffsamples.fz-juelich.de/api/v1/users/1"
}
],
"member_groups": [
{
"group_id": 1,
"permissions": "read",
"href": "https://iffsamples.fz-juelich.de/api/v1/groups/1"
}
]
}

:>json number project_id: the project group's ID
:>json object name: the project group's name
:>json object description: the project group's description
:>json array member_users: the project group's member users
:>json array member_groups: the project group's member basic groups
:statuscode 200: no error
:statuscode 404: the project group does not exist

Locations
---------
Expand Down Expand Up @@ -2045,11 +2247,13 @@ Reading information for a file

:>json number object_id: the object's ID
:>json number file_id: the file's ID
:>json string storage: how the file is stored (local, database or url)
:>json string storage: how the file is stored (database, url, local_reference or federation)
:>json string url: the URL of the file (for url storage)
:>json string original_file_name: the original name of the file (for local or database storage)
:>json string base64_content: the base64 encoded content of the file (for local or database storage)
:>json object hash: hash algorithm and hexdigest of the content (optional, for local, database or local_reference storage)
:>json string original_file_name: the original name of the file (for database storage)
:>json string base64_content: the base64 encoded content of the file (for database storage)
:>json object hash: hash algorithm and hexdigest of the content (optional, for database or local_reference storage)
:>json string base64_preview_image: the base64 encoded content of the file's preview image (optional, for database storage)
:>json string preview_image_mime_type: the mime type of the file's preview image (optional, for database storage)
:statuscode 200: no error
:statuscode 403: the user does not have READ permissions for this object
:statuscode 404: the object or the file does not exist
Expand Down Expand Up @@ -2093,6 +2297,8 @@ Uploading a file
:<json string original_file_name: the original name of the file
:<json string base64_content: the base64 encoded content of the file
:<json object hash: hash algorithm and hexdigest of the content (optional)
:<json string base64_preview_image: a base64 encoded preview image (optional)
:<json string preview_image_mime_type: the MIME type of the preview image (optional)
:statuscode 201: the file has been created successfully
:statuscode 403: the user does not have WRITE permissions for this object
:statuscode 404: the object does not exist
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Topics
------

Topics allow you to filter the action list by predefined topics.
When creating or editing an action, you can optionally assign one or more topics to the action.
When creating or editing an action, you can optionally assign one or more topics to the action. If the action is assigned to an instrument, you can also mark it to use the instrument topics.
See the :ref:`topics section <topics>` for more details.

Custom Actions
Expand Down
9 changes: 9 additions & 0 deletions docs/user_guide/instruments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ Instrument Log
--------------

Instrument scientists can use the instrument log to keep track of problems, maintenance or other events. They can decide whether the log can be seen by other users, and whether other users can also create log entries, e.g. to report issues. When a new log entry is created, a notification will be sent to the instrument scientists.

.. _instrument_topics:

Topics
------

Topics allow you to filter the instrument list by predefined topics.
When creating or editing an instrument, you can optionally assign one or more topics to it.
See the :ref:`topics section <topics>` for more details.
Loading

0 comments on commit 8c619af

Please sign in to comment.