From 89ea3cf3b2a099770d834c4109323dcd20e53d31 Mon Sep 17 00:00:00 2001 From: yokochi47 Date: Mon, 25 Nov 2024 19:30:24 +0900 Subject: [PATCH] PEP8 cleanup and change requirement for pynmrstar >= 3.2 --- azure-template-tox-job.yml | 10 +++++----- requirements.txt | 8 ++++---- setup.py | 8 ++++---- tox.ini | 2 +- wwpdb/utils/nmr/NmrDpUtility.py | 24 ++++++++++++------------ 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/azure-template-tox-job.yml b/azure-template-tox-job.yml index 69d2cbe5d..d068bab30 100644 --- a/azure-template-tox-job.yml +++ b/azure-template-tox-job.yml @@ -156,11 +156,11 @@ jobs: export CONFIG_SUPPORT_TOKEN_ENV=$(VAR_CONFIG_SUPPORT_TOKEN_ENV) ${{ format('python -m tox -e {0}-py37', parameters.tox) }} displayName: 'Running tox task' - - ${{ if and(not(startsWith(parameters.tox, 'py')), startsWith(parameters.python, '2.7')) }}: - - script: | - export CONFIG_SUPPORT_TOKEN_ENV=$(VAR_CONFIG_SUPPORT_TOKEN_ENV) - ${{ format('python -m tox -e {0}-py27', parameters.tox) }} - displayName: 'Runing tox task' + # - ${{ if and(not(startsWith(parameters.tox, 'py')), startsWith(parameters.python, '2.7')) }}: + # - script: | + # export CONFIG_SUPPORT_TOKEN_ENV=$(VAR_CONFIG_SUPPORT_TOKEN_ENV) + # ${{ format('python -m tox -e {0}-py27', parameters.tox) }} + # displayName: 'Runing tox task' # # Build artifacts if this is a test target (i.e. labeled as py##) # diff --git a/requirements.txt b/requirements.txt index 4653467ed..8c6a4b7e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ wwpdb.utils.config wwpdb.utils.align -pynmrstar ~= 2.6; python_version < '3' -pynmrstar; python_version >= '3' -munkres==1.0.12; python_version == '2.7' +# pynmrstar ~= 2.6; python_version < '3' +pynmrstar >= 3.2; python_version >= '3' +# munkres==1.0.12; python_version == '2.7' munkres; python_version >= '3' mmcif numpy @@ -10,7 +10,7 @@ packaging rmsd chardet scikit-learn -antlr4-python2-runtime; python_version == '2.7' +# antlr4-python2-runtime; python_version == '2.7' antlr4-python3-runtime; python_version >= '3' striprtf # typing_extensions was missing from rmsd 1.5. Remove someday from here. diff --git a/setup.py b/setup.py index 75402ec8e..7531164db 100755 --- a/setup.py +++ b/setup.py @@ -42,14 +42,14 @@ # # munkres 1.0.12 last to support python 2. Developers did not tag properly install_requires=['wwpdb.utils.config ~= 0.34', 'wwpdb.utils.align', - "pynmrstar ~= 2.6; python_version < '3'", - "pynmrstar; python_version >= '3'", - "munkres==1.0.12; python_version == '2.7'", + # "pynmrstar ~= 2.6; python_version < '3'", + "pynmrstar >= 3.2; python_version >= '3'", + # "munkres==1.0.12; python_version == '2.7'", "munkres; python_version >= '3'", 'mmcif', 'numpy', "scikit-learn", "rmsd", "packaging", "chardet", "typing_extensions", # typing_extensions was missing from rmsd 1.5 package - "antlr4-python2-runtime; python_version == '2.7'", + # "antlr4-python2-runtime; python_version == '2.7'", "antlr4-python3-runtime ~= 4.13.0; python_version >= '3'", "striprtf"], packages=find_packages(exclude=['wwpdb.utils.tests-nmr', 'wwpdb.utils.tests-nmr-tox', 'mock-data']), diff --git a/tox.ini b/tox.ini index 2bb520727..86117f739 100644 --- a/tox.ini +++ b/tox.ini @@ -53,7 +53,7 @@ allowlist_externals = echo commands = echo "Starting default tests in testenv" -[testenv:py3{9,10,11,12},py27] +[testenv:py3{9,10,11,12}] description = 'Run unit tests (unittest runner) using {envpython}' platform= macos: darwin diff --git a/wwpdb/utils/nmr/NmrDpUtility.py b/wwpdb/utils/nmr/NmrDpUtility.py index cbfcf2aca..31e5b9e23 100644 --- a/wwpdb/utils/nmr/NmrDpUtility.py +++ b/wwpdb/utils/nmr/NmrDpUtility.py @@ -14346,18 +14346,18 @@ def __detectOtherPossibleFormatAsErrorOfLegacyMr(self, file_path, file_name, fil genuine_type.append(_genuine_type) valid_types.update(_valid_types) possible_types.update(_possible_types) - """ conflict with nm-res-cya (2kcp) - if (not is_valid or multiple_check) and file_type != 'nm-aux-cha': - _is_valid, _err, _genuine_type, _valid_types, _possible_types =\ - self.__detectOtherPossibleFormatAsErrorOfLegacyMr__(file_path, file_name, file_type, dismiss_err_lines, 'nm-aux-cha') - - is_valid |= _is_valid - err += _err - if _genuine_type is not None: - genuine_type.append(_genuine_type) - valid_types.update(_valid_types) - possible_types.update(_possible_types) - """ + # """ conflict with nm-res-cya (2kcp) + # if (not is_valid or multiple_check) and file_type != 'nm-aux-cha': + # _is_valid, _err, _genuine_type, _valid_types, _possible_types =\ + # self.__detectOtherPossibleFormatAsErrorOfLegacyMr__(file_path, file_name, file_type, dismiss_err_lines, 'nm-aux-cha') + # + # is_valid |= _is_valid + # err += _err + # if _genuine_type is not None: + # genuine_type.append(_genuine_type) + # valid_types.update(_valid_types) + # possible_types.update(_possible_types) + # """ if (not is_valid or multiple_check) and file_type != 'nm-res-dyn': _is_valid, _err, _genuine_type, _valid_types, _possible_types =\ self.__detectOtherPossibleFormatAsErrorOfLegacyMr__(file_path, file_name, file_type, dismiss_err_lines, 'nm-res-dyn')