Skip to content
Snippets Groups Projects
Verified Commit b5633b0f authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'dev' into f-filesystem

parents 8cbd1757 c36376e0
Branches
No related tags found
2 merge requests!86Draft: ENH: file system: core,!58F filesystem
Pipeline #24504 failed
......@@ -64,16 +64,21 @@ unittest:
# Trigger building of server image and integration tests
trigger_build:
tags: [ docker ]
stage: deploy
script:
- /usr/bin/curl -X POST
-F token=$CI_JOB_TOKEN
-F "variables[F_BRANCH]=$CI_COMMIT_REF_NAME"
-F "variables[PYLIB]=$CI_COMMIT_REF_NAME"
-F "variables[TriggerdBy]=PYLIB"
-F "variables[TriggerdByHash]=$CI_COMMIT_SHORT_SHA"
-F ref=$DEPLOY_REF https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline
inherit:
variables:
- DEPLOY_REF
variables:
# Renaming variables.
F_BRANCH: $CI_COMMIT_REF_NAME
PYLIB: $CI_COMMIT_REF_NAME
TriggeredBy: PYLIB
TriggeredByHash: $CI_COMMIT_SHORT_SHA
trigger:
project: caosdb/src/caosdb-deploy
branch: $DEPLOY_REF
strategy: depend
# Build a docker image in which tests for this repository can run
build-testenv:
......
......@@ -15,12 +15,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed ###
* Support for Python 3.6 and Python 3.7
### Fixed ###
### Security ###
### Documentation ###
## [0.7.4] - 2022-05-31
(Florian Spreckelsen)
### Fixed ###
* [#64](https://gitlab.com/caosdb/caosdb-pylib/-/issues/64) Use `Dict[]` and
`List[]` from `typing` for type hinting instead of `dict[]` and `list[]` for
compatibility with Python<3.9.
## [0.7.3] - 2022-05-03
(Henrik tom Wörden)
......@@ -36,27 +47,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added additional customization options to the plantuml module.
- The to_graphics function in the plantuml module uses a temporary directory now for creating the output files.
### Deprecated ###
### Removed ###
### Fixed ###
* [#75](https://gitlab.indiscale.com/caosdb/src/caosdb-pylib/-/issues/75), [#103](https://gitlab.indiscale.com/caosdb/src/caosdb-pylib/-/issues/103) Fixed JSON schema to allow more sections, and correct requirements for
password method.
### Security ###
### Documentation ###
## [0.7.2] - 2022-03-25 ##
(Timm Fitschen)
### Added ###
### Changed ###
### Deprecated ###
* In module `caosdb.apiutils`:
......@@ -64,8 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `convert_to_entity` function
* `convert_to_python_object` function
### Removed ###
### Fixed ###
* [caosdb-pylib#106](https://gitlab.indiscale.com/caosdb/src/caosdb-pylib/-/issues/106)
......@@ -73,8 +69,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
unintentional revocation of permissions for some users or roles during
updates. However, no additional permissions are being granted.
### Security ###
### Documentation ###
## [0.7.1] - 2022-03-11 ##
......@@ -140,8 +134,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `yaml_file_to_xml`
* `insert_yaml_file`
### Removed ###
### Fixed ###
* #60 Unintuitive behavior of `Entity.role` after a `Entity(id).retrieve()`
......@@ -166,10 +158,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Updated error-handling tutorial in documentation to reflect the new
error classes
### Deprecated ###
### Removed ###
### Fixed ###
* #45 - test_config_ini_via_envvar
......@@ -262,14 +250,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
assumed that `password_method` is `auth_token` if the the `auth_token` is
set.
### Removed ###
### Fixed ###
- Replaced deprecated Logger.warn() method.
### Security ###
## [0.3.0] - 2020-04-24##
### Added ###
......@@ -277,10 +261,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `apiutils.apply_to_ids` -- a helper which applies a function to all ids which
are used by an entity (own entity, parents, properties, references etc.).
### Changed ###
### Deprecated ###
### Fixed ###
* import bugs in apiutils
......
* caosdb-server >= 0.7.2
* Python >= 3.6
* Python >= 3.8
* pip >= 20.0.2
Any other dependencies are defined in the setup.py and are being installed via pip
......@@ -4,7 +4,7 @@
### Requirements ###
PyCaosDB needs at least Python 3.6. Additionally, the following packages are required (they will
PyCaosDB needs at least Python 3.8. Additionally, the following packages are required (they will
typically be installed automatically):
- `lxml`
......@@ -19,7 +19,7 @@ Optional packages:
#### Linux ####
Make sure that Python (at least version 3.6) and pip is installed, using your system tools and
Make sure that Python (at least version 3.8) and pip is installed, using your system tools and
documentation.
Then open a terminal and continue in the [Generic installation](#generic-installation) section.
......
......@@ -48,7 +48,7 @@ from setuptools import find_packages, setup
ISRELEASED = False
MAJOR = 0
MINOR = 7
MICRO = 4
MICRO = 5
# Do not tag as pre-release until this commit
# https://github.com/pypa/packaging/pull/515
# has made it into a release. Probably we should wait for pypa/packaging>=21.4
......@@ -168,7 +168,7 @@ def setup_package():
"Topic :: Scientific/Engineering :: Information Analysis",
],
packages=find_packages('src'),
python_requires='>=3.6',
python_requires='>=3.8',
package_dir={'': 'src'},
install_requires=['lxml>=4.6.3',
'PyYAML>=6.0', 'future', 'PySocks>=1.6.7'],
......
......@@ -33,7 +33,7 @@ import warnings
from collections.abc import Iterable
from subprocess import call
from typing import Optional, Any
from typing import Optional, Any, Dict, List
from caosdb.common.datatype import (BOOLEAN, DATETIME, DOUBLE, FILE, INTEGER,
REFERENCE, TEXT, is_reference)
......@@ -205,8 +205,8 @@ def compare_entities(old_entity: Entity, new_entity: Entity):
In case of changed information the value listed under the respective key shows the
value that is stored in the respective entity.
"""
olddiff: dict[str, Any] = {"properties": {}, "parents": []}
newdiff: dict[str, Any] = {"properties": {}, "parents": []}
olddiff: Dict[str, Any] = {"properties": {}, "parents": []}
newdiff: Dict[str, Any] = {"properties": {}, "parents": []}
if old_entity is new_entity:
return (olddiff, newdiff)
......@@ -467,7 +467,7 @@ def resolve_reference(prop: Property):
prop.value = retrieve_entity_with_id(prop.value)
def create_flat_list(ent_list: list[Entity], flat: list[Entity]):
def create_flat_list(ent_list: List[Entity], flat: List[Entity]):
"""
Recursively adds all properties contained in entities from ent_list to
the output list flat. Each element will only be added once to the list.
......@@ -483,8 +483,10 @@ def create_flat_list(ent_list: list[Entity], flat: list[Entity]):
if isinstance(el, Entity):
if el not in flat:
flat.append(el)
create_flat_list([el], flat) # TODO: move inside if block?
# TODO: move inside if block?
create_flat_list([el], flat)
elif isinstance(p.value, Entity):
if p.value not in flat:
flat.append(p.value)
create_flat_list([p.value], flat) # TODO: move inside if block?
# TODO: move inside if block?
create_flat_list([p.value], flat)
......@@ -176,16 +176,7 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
if "ssl_version" in config and config["cacert"] is not None:
ssl_version = getattr(ssl, config["ssl_version"])
else:
try:
ssl_version = ssl.PROTOCOL_TLS
except AttributeError:
# deprecated since Python 3.6, but necessary until there.
try:
ssl_version = ssl.PROTOCOL_TLSv1_2
except AttributeError:
print("It seems as if your Python version does not support current encryption"
"standards (such as TLS > 1.0), please upgrade to at least Python 3.4.")
sys.exit(1)
ssl_version = ssl.PROTOCOL_TLS
context = ssl.SSLContext(ssl_version)
context.verify_mode = ssl.CERT_REQUIRED
......
......@@ -561,7 +561,7 @@ class CaosDBPythonEntity(object):
return propval
def resolve_references(self, deep: bool, references: db.Container,
visited: dict[Union[str, int],
visited: Dict[Union[str, int],
"CaosDBPythonEntity"] = None):
"""
Resolve this entity's references. This affects unresolved properties as well
......@@ -692,7 +692,7 @@ class CaosDBPythonEntity(object):
if self in visited:
return visited[self]
metadata: dict[str, Any] = dict()
metadata: Dict[str, Any] = dict()
properties = dict()
parents = list()
......
......@@ -39,7 +39,7 @@ import shutil
import caosdb as db
from caosdb.common.datatype import is_reference, get_referenced_recordtype
from typing import Optional
from typing import List, Optional
import tempfile
......@@ -341,9 +341,9 @@ def retrieve_substructure(start_record_types, depth, result_id_set=None, result_
return None
def to_graphics(recordtypes: list[db.Entity], filename: str,
def to_graphics(recordtypes: List[db.Entity], filename: str,
output_dirname: Optional[str] = None,
formats: list[str] = ["tsvg"],
formats: List[str] = ["tsvg"],
silent: bool = True,
add_properties: bool = True,
add_recordtypes: bool = True,
......@@ -367,7 +367,7 @@ def to_graphics(recordtypes: list[db.Entity], filename: str,
the destination directory for the resulting images as defined by the "-o"
option by plantuml
default is to use current working dir
formats : list[str]
formats : List[str]
list of target formats as defined by the -t"..." options by plantuml, e.g. "tsvg"
silent : bool
Don't output messages.
......
......@@ -29,10 +29,10 @@ copyright = '2022, IndiScale GmbH'
author = 'Daniel Hornung'
# The short X.Y version
version = '0.7.3'
version = '0.7.4'
# The full version, including alpha/beta/rc tags
# release = '0.5.2-rc2'
release = '0.7.3'
release = '0.7.4'
# -- General configuration ---------------------------------------------------
......
[tox]
envlist=py36, py37, py38, py39, py310
envlist=py38, py39, py310
skip_missing_interpreters = true
[testenv]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment