Skip to content
Snippets Groups Projects
Commit 43d6d0b3 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

REL: Release v0.15.1

Merge branch 'release-0.15.1' into 'main'

Release 0.15.1

See merge request !147
parents 06980886 6f55add6
No related branches found
No related tags found
1 merge request!147Release 0.15.1
Pipeline #59168 passed
...@@ -66,12 +66,12 @@ test-server-side-scripting: ...@@ -66,12 +66,12 @@ test-server-side-scripting:
# Build a docker image in which tests for this repository can run # Build a docker image in which tests for this repository can run
build-testenv: build-testenv:
tags: [ cached-dind ] tags: [ cached-dind ]
image: docker:19.03 image: docker:27.3.1
stage: setup stage: setup
timeout: 3 h timeout: 3 h
only: # only:
- web # - web
- schedules # - schedules
script: script:
- cd test/docker - cd test/docker
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
...@@ -93,7 +93,8 @@ pages_prepare: &pages_prepare ...@@ -93,7 +93,8 @@ pages_prepare: &pages_prepare
refs: refs:
- /^release-.*$/i - /^release-.*$/i
script: script:
- npm install jsdoc jsdoc-sphinx - npm install -g jsdoc
- npm install @indiscale/jsdoc-sphinx
- echo "Deploying" - echo "Deploying"
- make doc - make doc
- rm -r public || true ; cp -r build/doc/html public - rm -r public || true ; cp -r build/doc/html public
......
...@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. ...@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.15.1] - 2014-12-20 ##
### Fixed ###
- [#254](https://gitlab.com/linkahead/linkahead-webui/-/issues/254) "Download files referenced in the table" failed
- [#230](https://gitlab.com/linkahead/linkahead-webui/-/issues/230)
`make doc` is now compatible with npm >= 9.0.0.
## [0.15.0] - 2024-10-01 ## ## [0.15.0] - 2024-10-01 ##
### Added ### ### Added ###
......
...@@ -80,13 +80,16 @@ See `build.properties.d/00_default.properties` for more information. ...@@ -80,13 +80,16 @@ See `build.properties.d/00_default.properties` for more information.
## Build the documentation # ## Build the documentation #
Build documentation in `build/` with `make doc`. Install the below requirements and build documentation in `build/`
with `make doc`. You may need to set the environment variables used in
`src/doc/Makefile`, especially `JSDOC_BIN` in case you didn't install
jsdoc globally.
### Requirements ## ### Requirements ##
- sphinx - sphinx
- sphinx-autoapi - sphinx-autoapi
- jsdoc (`npm install jsdoc`) - jsdoc (`npm install jsdoc`)
- jsdoc-sphinx (`npm install jsdoc-sphinx`) - @indiscale/jsdoc-sphinx (`npm install @indiscale/jsdoc-sphinx`)
- sphinx-js - sphinx-js
- recommonmark - recommonmark
...@@ -24,16 +24,15 @@ ...@@ -24,16 +24,15 @@
# It is based upon the autocreated makefile for Sphinx documentation. # It is based upon the autocreated makefile for Sphinx documentation.
# You can set these variables from the command line, and also # You can set these variables from the command line, and also
# from the environment for the first two. # from the environment for the first four.
SPHINXOPTS ?= -a SPHINXOPTS ?= -a
SPHINXBUILD ?= sphinx-build SPHINXBUILD ?= sphinx-build
NPM_PREFIX ?= ../..
JSDOC_BIN ?= jsdoc
# SPHINXAPIDOC ?= javasphinx-apidoc # SPHINXAPIDOC ?= javasphinx-apidoc
SOURCEDIR = . SOURCEDIR = .
BUILDDIR = ../../build/doc BUILDDIR = ../../build/doc
# npm is not always in the global PATH
NPM_PATH = $(shell npm bin)
NPM_PREFIX = $(shell npm prefix)
.PHONY: doc-help Makefile api .PHONY: doc-help Makefile api
...@@ -44,8 +43,8 @@ doc-help: ...@@ -44,8 +43,8 @@ doc-help:
# Catch-all target: route all unknown targets to Sphinx using the new # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile api %: Makefile api
PATH=$(NPM_PATH):$$PATH $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# sphinx-build -M html . ../../build/doc # sphinx-build -M html . ../../build/doc
api: api:
PATH=$(NPM_PATH):$$PATH jsdoc -t $(NPM_PREFIX)/node_modules/jsdoc-sphinx/template -d $@ -r "../../src/core" $(JSDOC_BIN) -t $(NPM_PREFIX)/node_modules/@indiscale/jsdoc-sphinx/template -d $@ -r "../../src/core"
...@@ -26,9 +26,9 @@ copyright = '2022 - 2024, IndiScale GmbH' ...@@ -26,9 +26,9 @@ copyright = '2022 - 2024, IndiScale GmbH'
author = 'Daniel Hornung' author = 'Daniel Hornung'
# The short X.Y version # The short X.Y version
version = '0.15.0' version = '0.15.1'
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
release = '0.15.0' release = '0.15.1'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
...@@ -196,7 +196,7 @@ primary_domain = 'js' # Not strictly necessary? ...@@ -196,7 +196,7 @@ primary_domain = 'js' # Not strictly necessary?
# -- Options for intersphinx extension --------------------------------------- # -- Options for intersphinx extension ---------------------------------------
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None} intersphinx_mapping = {}
# TODO Which options do we want? # TODO Which options do we want?
autodoc_default_options = { autodoc_default_options = {
......
...@@ -28,5 +28,4 @@ the most important concepts and offers a range of ...@@ -28,5 +28,4 @@ the most important concepts and offers a range of
Indices and tables Indices and tables
================== ==================
* :ref:`genindex`
* :ref:`search` * :ref:`search`
...@@ -32,7 +32,7 @@ from zipfile import ZipFile ...@@ -32,7 +32,7 @@ from zipfile import ZipFile
import linkahead as db import linkahead as db
import pandas as pd import pandas as pd
from linkaheadadvancedtools.serverside import helper from caosadvancedtools.serverside import helper
from linkahead import LinkAheadException, ConsistencyError, EntityDoesNotExistError from linkahead import LinkAheadException, ConsistencyError, EntityDoesNotExistError
...@@ -71,9 +71,7 @@ def collect_files_in_zip(ids, table): ...@@ -71,9 +71,7 @@ def collect_files_in_zip(ids, table):
# download and add all files # download and add all files
for file_id in ids: for file_id in ids:
try: try:
tmp = db.execute_query("FIND FILE WITH ID={a:}".format( tmp = db.get_entity_by_id(file_id, role="FILE")
a=file_id),
unique=True)
except EntityDoesNotExistError as e: except EntityDoesNotExistError as e:
# TODO # TODO
# Current behavior: script terminates with error if just one # Current behavior: script terminates with error if just one
...@@ -81,14 +79,14 @@ def collect_files_in_zip(ids, table): ...@@ -81,14 +79,14 @@ def collect_files_in_zip(ids, table):
# Desired behavior: The script should go on with the other # Desired behavior: The script should go on with the other
# ids, but the user should be informed about the missing files. # ids, but the user should be informed about the missing files.
# How should we do this? # How should we do this?
logger = logging.getLogger("linkaheadadvancedtools") logger = logging.getLogger("caosadvancedtools")
logger.error("Did not find Entity with ID={}.".format( logger.error("Did not find File with ID={}.".format(
file_id)) file_id))
raise e raise e
savename = nc.get_unique_savename(os.path.basename(tmp.path)) savename = nc.get_unique_savename(os.path.basename(tmp.path))
val_file = helper.get_file_via_download( val_file = helper.get_file_via_download(
tmp, logger=logging.getLogger("linkaheadadvancedtools")) tmp, logger=logging.getLogger("caosadvancedtools"))
zf.write(val_file, savename) zf.write(val_file, savename)
......
...@@ -35,8 +35,8 @@ from datetime import datetime ...@@ -35,8 +35,8 @@ from datetime import datetime
import linkahead as db import linkahead as db
import pandas as pd import pandas as pd
from linkaheadadvancedtools.serverside.helper import get_argument_parser from caosadvancedtools.serverside.helper import get_argument_parser
from linkaheadadvancedtools.serverside.logging import configure_server_side_logging from caosadvancedtools.serverside.logging import configure_server_side_logging
MAXIMUMFILESIZE = 1e8 MAXIMUMFILESIZE = 1e8
VALID_ENDINGS = [".csv", ".tsv", ".xls", ".xlsx"] VALID_ENDINGS = [".csv", ".tsv", ".xls", ".xlsx"]
...@@ -135,7 +135,7 @@ if __name__ == "__main__": ...@@ -135,7 +135,7 @@ if __name__ == "__main__":
args = parser.parse_args() args = parser.parse_args()
debug_file = configure_server_side_logging() debug_file = configure_server_side_logging()
logger = logging.getLogger("linkaheadadvancedtools") logger = logging.getLogger("caosadvancedtools")
db.configure_connection(auth_token=args.auth_token) db.configure_connection(auth_token=args.auth_token)
entity_id = args.filename entity_id = args.filename
......
FROM debian:11 FROM debian:12
ADD node_gpg.asc /etc/apt/ ADD node_gpg.asc /etc/apt/
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y gnupg ca-certificates\ && apt-get install -y gnupg ca-certificates\
...@@ -12,14 +12,15 @@ RUN apt-get update \ ...@@ -12,14 +12,15 @@ RUN apt-get update \
nodejs npm \ nodejs npm \
&& apt-get install -f && apt-get install -f
RUN pip3 install pylint pytest RUN pip3 install --break-system-packages pylint pytest
RUN pip3 install --break-system-packages sphinx-js sphinx-autoapi recommonmark sphinx-rtd-theme
RUN pip3 install --break-system-packages pandas
# TODO rename to linkahead # TODO rename to linkahead
# RUN pip3 install caosdb>=0.7.4 RUN pip3 install --break-system-packages git+https://gitlab.com/caosdb/caosdb-pylib.git@dev
RUN pip3 install git+https://gitlab.com/caosdb/caosdb-pylib.git@f-linkahead-rename
RUN pip3 install pandas
# TODO rename to linkahead # TODO rename to linkahead
RUN pip3 install git+https://gitlab.com/caosdb/caosdb-advanced-user-tools.git@f-linkahead-rename RUN pip3 install --break-system-packages git+https://gitlab.com/caosdb/caosdb-advanced-user-tools.git@dev
# For automatic documentation # For automatic documentation
# RUN npm install -g jsdoc # RUN npm install -g jsdoc
# RUN npm install -g jsdoc-sphinx # RUN npm install -g jsdoc-sphinx
RUN pip3 install sphinx-js sphinx-autoapi recommonmark sphinx-rtd-theme
#!/usr/bin/env python3
# encoding: utf-8
#
# This file is a part of the LinkAhead Project.
#
# Copyright (C) 2024 IndiScale GmbH <info@indiscale.com>
# Copyright (C) 2024 Daniel Hornung <d.hornung@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
import os
import unittest
import linkahead as db
from linkahead.common.models import _parse_single_xml_element
from lxml import etree
from zip_files import (collect_files_in_zip)
class ZipTest(unittest.TestCase):
pass
../../../src/server_side_scripting/ext_file_download/zip_files.py
\ No newline at end of file
linkahead
# TODO rename to linkahead # TODO rename to linkahead
caosdb
caosadvancedtools caosadvancedtools
pandas pandas
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment