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

Merge branch 'f-pylint' into 'dev'

F pylint

See merge request !161
parents dde1d2a7 ea22429f
No related branches found
No related tags found
2 merge requests!162DOC WIP: Tutorial: Single structured file,!161F pylint
Pipeline #49007 passed
......@@ -10,7 +10,7 @@ RUN apt-get update && \
python3-sphinx \
tox \
-y
RUN pip3 install recommonmark sphinx-rtd-theme
RUN pip3 install pylint recommonmark sphinx-rtd-theme
COPY .docker/wait-for-it.sh /wait-for-it.sh
ARG PYLIB
ADD https://gitlab.indiscale.com/api/v4/projects/97/repository/commits/${PYLIB} \
......
......@@ -279,7 +279,7 @@ cert:
- cd .docker
- CAOSHOSTNAME=caosdb-server ./cert.sh
style:
code-style:
tags: [docker]
stage: style
image: $CI_REGISTRY_IMAGE
......@@ -290,6 +290,17 @@ style:
- autopep8 -r --diff --exit-code .
allow_failure: true
pylint:
tags: [docker]
stage: style
image: $CI_REGISTRY_IMAGE
needs:
- job: build-testenv
optional: true
allow_failure: true
script:
- pylint --unsafe-load-any-extension=y -d all -e E,F src/caoscrawler
# 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
# Based on: https://gitlab.indiscale.com/caosdb/src/caosdb-pylib/-/ci/editor?branch_name=main
......
......@@ -24,24 +24,22 @@
"""
an integration test module that runs a test against a (close to) real world example
"""
from caosdb.utils.register_tests import clear_database, set_test_key
import logging
import json
import logging
import os
import pytest
import sys
import caosdb as db
from caosdb.cached import cache_clear
import linkahead as db
from linkahead.cached import cache_clear
from linkahead.utils.register_tests import clear_database, set_test_key
from caosadvancedtools.loadFiles import loadpath
from caosadvancedtools.models.parser import parse_model_from_json_schema, parse_model_from_yaml
from caoscrawler.crawl import Crawler, crawler_main
from caoscrawler.identifiable_adapters import CaosDBIdentifiableAdapter
from caoscrawler.structure_elements import Directory
import pytest
from caosadvancedtools.models.parser import parse_model_from_json_schema, parse_model_from_yaml
from caosadvancedtools.loadFiles import loadpath
from caoscrawler.scanner import load_definition, scan_structure_elements, create_converter_registry
import sys
from caoscrawler.structure_elements import Directory
set_test_key("10b128cf8a1372f30aa3697466bb55e76974e0c16a599bb44ace88f19c8f61e2")
......@@ -91,15 +89,6 @@ def usemodel():
dataset_inherits.sync_data_model(noquestion=True)
@pytest.fixture
def clear_database():
# TODO(fspreck): Remove once the corresponding advancedtools function can
# be used.
ents = db.execute_query("FIND ENTITY WITH ID>99")
if ents:
ents.delete()
def create_identifiable_adapter():
ident = CaosDBIdentifiableAdapter()
ident.load_from_yaml_definition(os.path.join(DATADIR, "identifiables.yml"))
......
......@@ -1599,6 +1599,7 @@ def crawler_main(crawled_directory_path: str,
logger.debug(err)
if "SHARED_DIR" in os.environ:
# pylint: disable=E0601
domain = get_config_setting("public_host_url")
logger.error("Unexpected Error: Please tell your administrator about this and provide the"
f" following path.\n{domain}/Shared/" + debuglog_public)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment