Skip to content
Snippets Groups Projects
Commit 96046fae authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Use teklia-toolbox instead of arkindex-common for tooling

parent b9c3f63e
No related branches found
No related tags found
No related merge requests found
......@@ -8,4 +8,4 @@ line_length = 120
default_section=FIRSTPARTY
known_first_party = arkindex_common,ponos,transkribus
known_third_party = boto3,botocore,corsheaders,django,django_admin_hstore_widget,django_rq,elasticsearch,elasticsearch_dsl,enumfields,gitlab,psycopg2,requests,responses,rest_framework,rq,setuptools,sqlparse,tenacity,tripoli,yaml
known_third_party = boto3,botocore,corsheaders,django,django_admin_hstore_widget,django_rq,elasticsearch,elasticsearch_dsl,enumfields,gitlab,psycopg2,requests,responses,rest_framework,rq,setuptools,sqlparse,teklia_toolbox,tenacity,tripoli,yaml
......@@ -3,9 +3,9 @@ import logging
import uuid
from django.core.management.base import BaseCommand
from teklia_toolbox.time import Timer
from arkindex.documents.models import Element
from arkindex_common.tools import Timer
# Enable deletion signal logs
logging.basicConfig(
......
from django.core.management.base import BaseCommand
from django.db import connections, transaction
from arkindex_common.tools import Timer
from teklia_toolbox.time import Timer
class Command(BaseCommand):
......
......@@ -2,7 +2,7 @@ import uuid
from enum import Enum
from pathlib import Path
from arkindex_common.config_parser import ConfigParser, ConfigurationError, dir_path
from teklia_toolbox.config import ConfigParser, ConfigurationError, dir_path
class CacheType(Enum):
......
......@@ -5,9 +5,9 @@ from unittest import TestCase
from unittest.mock import patch
import yaml
from teklia_toolbox.config import ConfigParser, ConfigurationError
from arkindex.project.config import get_settings_parser
from arkindex_common.config_parser import ConfigParser, ConfigurationError
SAMPLES = Path(__file__).resolve().parent / 'config_samples'
......@@ -42,8 +42,7 @@ class TestConfig(TestCase):
return stream.getvalue()
# Ignore non-existent paths
@patch('arkindex_common.config_parser.dir_path', new=Path)
@patch('arkindex_common.config_parser.file_path', new=Path)
@patch('teklia_toolbox.config.dir_path', new=Path)
def test_settings_defaults(self):
parser = get_settings_parser(Path('/somewhere/backend/arkindex'))
self.assertIsInstance(parser, ConfigParser)
......@@ -57,8 +56,7 @@ class TestConfig(TestCase):
self.maxDiff = None
self.assertEqual(expected, actual)
@patch('arkindex_common.config_parser.dir_path', new=Path)
@patch('arkindex_common.config_parser.file_path', new=Path)
@patch('teklia_toolbox.config.dir_path', new=Path)
def test_settings_override(self):
parser = get_settings_parser(Path('/somewhere/backend/arkindex'))
self.assertIsInstance(parser, ConfigParser)
......@@ -72,7 +70,7 @@ class TestConfig(TestCase):
self.maxDiff = None
self.assertEqual(expected, actual)
@patch('arkindex_common.config_parser._all_checks')
@patch('teklia_toolbox.config._all_checks')
def test_settings_errors(self, all_checks_mock):
all_checks_mock.return_value = True
parser = get_settings_parser(Path('/somewhere/backend/arkindex'))
......
......@@ -18,6 +18,7 @@ pytz==2020.4
PyYAML==5.3.1
requests==2.25.0
sentry-sdk==0.19.2
teklia-toolbox==0.1.0
tenacity==6.2
transkribus-client>=0.1.1
git+https://gitlab.com/arkindex/transkribus.git#egg=transkribus-client
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment