Skip to content

Commit

Permalink
PEP8 cleanup and change requirement for pynmrstar >= 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Nov 25, 2024
1 parent 3f0efeb commit 89ea3cf
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions azure-template-tox-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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##)
#
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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
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.
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions wwpdb/utils/nmr/NmrDpUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 89ea3cf

Please sign in to comment.