diff --git a/docs/debugging.md b/docs/debugging.md index 84d67dd..d66a11a 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -15,9 +15,15 @@ * Set up python virtual environment for the project * Connect IDE to venv python interpreter * Run flask at command prompt +* Assuming that the project directory is ```zsh +export PROJDIR=~/git/lmtrex +cd $PROJDIR/lmtrex/flask_app/broker/ + +export PYTHONPATH=$PROJECT_DIR export FLASK_ENV=development +export FLASK_APP=routes flask run ``` diff --git a/lmtrex/flask_app/broker/resolve.py b/lmtrex/flask_app/broker/resolve.py index f141a58..e69eb43 100644 --- a/lmtrex/flask_app/broker/resolve.py +++ b/lmtrex/flask_app/broker/resolve.py @@ -1,7 +1,7 @@ from http import HTTPStatus from werkzeug.exceptions import (BadRequest, InternalServerError) -from lmtrex.common.lmconstants import (APIService, ServiceProvider) +from lmtrex.common.lmconstants import (APIService) from lmtrex.common.s2n_type import (S2nKey, S2nOutput, S2nSchema, print_s2n_output) from lmtrex.flask_app.broker.base import _S2nService from lmtrex.tools.provider.specify_resolver import SpecifyResolverAPI diff --git a/lmtrex/tools/misc/dwca.py b/lmtrex/tools/misc/dwca.py index eed524a..19d1369 100644 --- a/lmtrex/tools/misc/dwca.py +++ b/lmtrex/tools/misc/dwca.py @@ -6,9 +6,9 @@ from lmtrex.common.lmconstants import ( SPECIFY_ARK_PREFIX, DWCA, ENCODING, TEST_SPECIFY7_SERVER, TST_VALUES, SPECIFY7_RECORD_ENDPOINT, SPECIFY7_SERVER_KEY, SPCOCO_FIELDS) -from lmtrex.fileop.logtools import (LMLog, log_info, log_warn, log_error) -from lmtrex.fileop.csvtools import (get_csv_dict_reader, get_csv_dict_writer) -from lmtrex.fileop.ready_file import ready_filename, delete_file +from lmtrex.tools.fileop.logtools import (LMLog, log_info, log_warn, log_error) +from lmtrex.tools.fileop.csvtools import (get_csv_dict_reader, get_csv_dict_writer) +from lmtrex.tools.fileop.ready_file import ready_filename, delete_file from lmtrex.tools.provider.api import APIQuery import lmtrex.tools.misc.solr as SpSolr from lmtrex.tools.s2n.utils import is_valid_uuid diff --git a/lmtrex/tools/misc/lm_xml.py b/lmtrex/tools/misc/lm_xml.py index f80fb72..4517fb3 100644 --- a/lmtrex/tools/misc/lm_xml.py +++ b/lmtrex/tools/misc/lm_xml.py @@ -2,7 +2,7 @@ Note: Mainly wraps elementTree functionality to fit Lifemapper needs """ -from lmtrex.tools.attribute_object import LmAttList, LmAttObj +from lmtrex.tools.misc.attribute_object import LmAttList, LmAttObj from types import (BuiltinFunctionType, BuiltinMethodType, FunctionType, LambdaType, MethodType) diff --git a/lmtrex/tools/provider/api.py b/lmtrex/tools/provider/api.py index 37cd459..a0d3a3b 100644 --- a/lmtrex/tools/provider/api.py +++ b/lmtrex/tools/provider/api.py @@ -6,8 +6,8 @@ from lmtrex.common.lmconstants import (URL_ESCAPES, ENCODING) from lmtrex.common.s2n_type import S2nKey, S2nOutput -from lmtrex.fileop.logtools import (log_warn) -from lmtrex.tools.lm_xml import fromstring, deserialize +from lmtrex.tools.fileop.logtools import (log_warn) +from lmtrex.tools.misc.lm_xml import fromstring, deserialize from lmtrex.tools.s2n.utils import add_errinfo, combine_errinfo, get_traceback import lmtrex.tools.s2n.utils as lmutil diff --git a/lmtrex/tools/provider/gbif.py b/lmtrex/tools/provider/gbif.py index 0c1e0c6..8dc4523 100644 --- a/lmtrex/tools/provider/gbif.py +++ b/lmtrex/tools/provider/gbif.py @@ -8,7 +8,7 @@ from lmtrex.common.lmconstants import ( APIService, GBIF, ServiceProvider, URL_ESCAPES, ENCODING) from lmtrex.common.s2n_type import S2nEndpoint, S2nKey, S2nOutput, S2nSchema -from lmtrex.fileop.logtools import (log_info, log_error) +from lmtrex.tools.fileop.logtools import (log_info, log_error) from lmtrex.tools.provider.api import APIQuery diff --git a/lmtrex/tools/provider/idigbio.py b/lmtrex/tools/provider/idigbio.py index 650bd57..4cd7b0d 100644 --- a/lmtrex/tools/provider/idigbio.py +++ b/lmtrex/tools/provider/idigbio.py @@ -6,8 +6,8 @@ from lmtrex.common.lmconstants import ( GBIF_MISSING_KEY, Idigbio, ServiceProvider, ENCODING, DATA_DUMP_DELIMITER) from lmtrex.common.s2n_type import S2nEndpoint, S2nKey, S2nSchema -from lmtrex.fileop.logtools import (log_info) -from lmtrex.fileop.ready_file import ready_filename +from lmtrex.tools.fileop.logtools import (log_info) +from lmtrex.tools.fileop.ready_file import ready_filename from lmtrex.tools.provider.api import APIQuery from lmtrex.tools.s2n.utils import add_errinfo diff --git a/lmtrex/tools/provider/itis.py b/lmtrex/tools/provider/itis.py index 1cada99..3e329a9 100644 --- a/lmtrex/tools/provider/itis.py +++ b/lmtrex/tools/provider/itis.py @@ -5,7 +5,7 @@ from lmtrex.common.lmconstants import ( ITIS, ServiceProvider, URL_ESCAPES, TST_VALUES) from lmtrex.common.s2n_type import S2nEndpoint, S2nOutput, S2nSchema -from lmtrex.fileop.logtools import log_info +from lmtrex.tools.fileop.logtools import log_info from lmtrex.tools.provider.api import APIQuery from lmtrex.tools.s2n.utils import get_traceback, add_errinfo diff --git a/lmtrex/tools/provider/mopho.py b/lmtrex/tools/provider/mopho.py index 6796c20..2d6ea89 100644 --- a/lmtrex/tools/provider/mopho.py +++ b/lmtrex/tools/provider/mopho.py @@ -2,7 +2,7 @@ from lmtrex.common.lmconstants import (MorphoSource, ServiceProvider, TST_VALUES) from lmtrex.common.s2n_type import S2nEndpoint, S2nKey, S2nSchema -from lmtrex.fileop.logtools import (log_info) +from lmtrex.tools.fileop.logtools import (log_info) from lmtrex.tools.provider.api import APIQuery from lmtrex.tools.s2n.utils import add_errinfo, get_traceback diff --git a/tests/test_specify_resolver/test_dwca.py b/tests/test_specify_resolver/test_dwca.py index 27de5af..308dc35 100644 --- a/tests/test_specify_resolver/test_dwca.py +++ b/tests/test_specify_resolver/test_dwca.py @@ -2,7 +2,7 @@ import shutil import time -from lmtrex.tools.dwca import ( +from lmtrex.tools.misc.dwca import ( assemble_download_filename, DwCArchive, get_dwca_urls, download_dwca) from lmtrex.tools.s2n.utils import is_valid_uuid from lmtrex.common.lmconstants import (DWCA, TST_VALUES)