diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68fb90fc027f1d706430358822b7aa8d5c4e2959..80f38616e1abbe4e560d9bbfbd2542d02bfe5007 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ variables: CI_REGISTRY_IMAGE_BASE: $CI_REGISTRY/caosdb/src/caosdb-advanced-user-tools/base:latest -stages: +stages: - setup - cert - style @@ -53,15 +53,15 @@ test: - time docker load < /image-cache/mariadb.tar || true - time docker load < /image-cache/caosdb-dev.tar || true - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - - EXEPATH=`pwd` CAOSDB_TAG=$CAOSDB_TAG docker-compose + - EXEPATH=`pwd` CAOSDB_TAG=$CAOSDB_TAG docker-compose -f .docker/docker-compose.yml up -d - - cd .docker + - cd .docker - /bin/sh ./run.sh - - cd .. + - cd .. - docker logs docker-caosdb-server-1 &> caosdb_log.txt - docker logs docker-sqldb-1 &> mariadb_log.txt - docker-compose -f .docker/docker-compose.yml down - - rc=`cat .docker/result` + - rc=`cat .docker/result` - exit $rc dependencies: [cert] needs: [cert] @@ -76,19 +76,19 @@ build-testenv: tags: [cached-dind] image: docker:18.09 stage: setup - # Hint: do not use only here; the image needs always to be build since it + # Hint: do not use only here; the image needs always to be build since it # contains the repo code #only: - script: + script: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY # use here general latest or specific branch latest... - - docker build + - docker build --file .docker/Dockerfile -t $CI_REGISTRY_IMAGE . - docker push $CI_REGISTRY_IMAGE - docker save $CI_REGISTRY_IMAGE > /image-cache/caosdb-advanced-testenv.tar - cd .docker-base - - docker build + - docker build -t $CI_REGISTRY_IMAGE_BASE . - docker push $CI_REGISTRY_IMAGE_BASE @@ -123,14 +123,45 @@ linting: - make lint allow_failure: true -unittest: +unittest_py39: tags: [docker] stage: unittest image: $CI_REGISTRY_IMAGE needs: [build-testenv] script: - - python3 -c "import caosdb; print('CaosDB Version:', caosdb.__version__)" - - tox + # First verify that system Python actually is 3.9 + - python3 -c "import sys; assert sys.version.startswith('3.9')" + - python3 -c "import caosdb; print('CaosDB Version:', caosdb.__version__)" + - tox + +unittest_py37: + tags: [docker] + stage: unittest + image: python:3.7 + script: &python_test_script + - pip install nose pandas pytest pytest-cov gitignore-parser openpyxl>=3.0.7 xlrd==1.2 h5py + - pip install git+https://gitlab.indiscale.com/caosdb/src/caosdb-pylib.git@dev + - pip install . + - pytest --cov=caosadvancedtools unittests + +unittest_py38: + tags: [docker] + stage: unittest + image: python:3.8 + script: *python_test_script + +unittest_py310: + tags: [docker] + stage: unittest + image: python:3.10 + script: *python_test_script + +unittest_py311: + tags: [docker] + stage: unittest + image: python:3.11 + script: *python_test_script + allow_failure: true # Build the sphinx documentation and make it ready for deployment by Gitlab Pages # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a8c585cbe657f1ee4463ce908d3ea4bab36f25..0dc08e1da9d00c52006137d1d865fdad1cb5e46e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.1] - 2023-01-20## + +### Added ### + +* Re-introduced support for Python 3.7 + ## [0.6.0] - 2022-10-11 ## (Florian Spreckelsen) diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000000000000000000000000000000000000..5e863ebcc2c0a97a5b63772010cc4d2ba80c5d48 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,25 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: + - family-names: Fitschen + given-names: Timm + orcid: https://orcid.org/0000-0002-4022-432X + - family-names: Schlemmer + given-names: Alexander + orcid: https://orcid.org/0000-0003-4124-9649 + - family-names: Hornung + given-names: Daniel + orcid: https://orcid.org/0000-0002-7846-6375 + - family-names: tom Wörden + given-names: Henrik + orcid: https://orcid.org/0000-0002-5549-578X + - family-names: Parlitz + given-names: Ulrich + orcid: https://orcid.org/0000-0003-3058-1435 + - family-names: Luther + given-names: Stefan + orcid: https://orcid.org/0000-0001-7214-8125 +title: CaosDB - Advanced User Tools +version: 0.6.1 +doi: 10.3390/data4020083 +date-released: 2023-01-20 \ No newline at end of file diff --git a/README.md b/README.md index 83a767476286acba98d113b8fa7ab6b482751230..ebda4f641bc3b5e6a74cf72f4bc25a4237a73131 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Conduct](https://gitlab.com/caosdb/caosdb/-/blob/dev/CODE_OF_CONDUCT.md). [documentation](https://docs.indiscale.com/caosdb-advanced-user-tools/), the preferred way is also a merge request as describe above (the documentation resides in `src/doc`). However, you can also create an issue for it. -- You can also contact us at **info (AT) caosdb.de** and join the CaosDB +- You can also contact us at **info (AT) caosdb.org** and join the CaosDB community on [#caosdb:matrix.org](https://matrix.to/#/!unwwlTfOznjEnMMXxf:matrix.org). diff --git a/README_SETUP.md b/README_SETUP.md index daab4707679e30cfecf6f995dfb75f327304cb33..894777aeccb64ceb0fe840ba5f16f0cc540b2996 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -52,6 +52,8 @@ Optional h5-crawler: `make style` ## Documentation # +We use sphinx to create the documentation. Docstrings in the code should comply +with the Googly style (see link below). Build documentation in `build/` with `make doc`. @@ -60,3 +62,9 @@ Build documentation in `build/` with `make doc`. - `sphinx` - `sphinx-autoapi` - `recommonmark >= 0.6.0` + +### How to contribute ### + +- [Google Style Python Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) +- [Google Style Python Docstrings 2nd reference](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings) +- [References to other documentation](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#role-external) diff --git a/RELEASE_GUIDELINES.md b/RELEASE_GUIDELINES.md index 8e4897e7e42c02e2c2620661c9f51e39630f6b50..adeab4ddf8a321bdf4e2794f07f18f5c0f4425b3 100644 --- a/RELEASE_GUIDELINES.md +++ b/RELEASE_GUIDELINES.md @@ -24,6 +24,7 @@ guidelines of the CaosDB Project - `version` variables in `src/doc/conf.py` - Version on [setup.py](./setup.py): Check the `MAJOR`, `MINOR`, `MICRO`, `PRE` variables and set `ISRELEASED` to `True`. Use the possibility to issue pre-release versions for testing. + - `CITATION.cff` (update version and date) 5. Merge the release branch into the main branch. diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index e65efaf9aaf061a8a1ec0040f87d682536fac4c2..0000000000000000000000000000000000000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -testpaths = unittests -addopts = -vv diff --git a/setup.py b/setup.py index 1a1cbd953e0fabb08425b6d1972be301730aa744..379418314d0ca7d9b53ba79bedff2aa628fb1607 100755 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from setuptools import find_packages, setup MAJOR = 0 MINOR = 6 -MICRO = 0 +MICRO = 1 PRE = "" # e.g. rc0, alpha.1, 0.beta-23 ISRELEASED = True @@ -154,7 +154,8 @@ def setup_package(): long_description_content_type="text/markdown", author='Henrik tom Wörden', author_email='h.tomwoerden@indiscale.com', - install_requires=["caosdb>=0.7.0", + python_requires='>=3.7', + install_requires=["caosdb>=0.11.0", "jsonschema>=4.4.0", "numpy>=1.17.3", "openpyxl>=3.0.7", diff --git a/src/caosadvancedtools/models/data_model.py b/src/caosadvancedtools/models/data_model.py index d9079e6196b4751ca86ba41275108330b946d57c..df2f3ad2244c24049830cb3c2f06d1def5b22e0c 100644 --- a/src/caosadvancedtools/models/data_model.py +++ b/src/caosadvancedtools/models/data_model.py @@ -141,7 +141,7 @@ class DataModel(dict): # in via the extern keyword: ref = db.Property(name=ent.name).retrieve() else: - query = db.Query(f"FIND * with id={ent.id}") + query = db.Query(f"FIND ENTITY with id={ent.id}") ref = query.execute(unique=True) diff = (describe_diff(*compare_entities(ent, ref ), name=ent.name)) diff --git a/src/doc/conf.py b/src/doc/conf.py index 8302fd6f8087b7fc2c3b0352d975b3d340be3677..e293c6e3ae1816e1f15427872c3f94eba2d8106f 100644 --- a/src/doc/conf.py +++ b/src/doc/conf.py @@ -27,9 +27,9 @@ copyright = '2021, IndiScale GmbH' author = 'Daniel Hornung' # The short X.Y version -version = '0.6.0' +version = '0.6.1' # The full version, including alpha/beta/rc tags -release = '0.6.0' +release = '0.6.1' # -- General configuration --------------------------------------------------- diff --git a/tox.ini b/tox.ini index 42ff0df986d179ce9770937dba4886f3b4e7ad0f..0e9664c377366923b60e11d138825e1543cc8c7f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] -envlist=py36, py37, py38, py39, py310 +envlist=py37, py38, py39, py310, py311 skip_missing_interpreters = true + [testenv] deps=nose pandas @@ -15,3 +16,8 @@ commands=py.test --cov=caosadvancedtools -vv {posargs} [flake8] max-line-length=100 + +[pytest] +testpaths = unittests +addopts = -vv +xfail_strict = True