From 4ce3d091a2cffdc1ad8687e5b553badc388a4b43 Mon Sep 17 00:00:00 2001 From: Dominick Filonowich Date: Wed, 5 Aug 2026 13:17:21 -0700 Subject: [PATCH 1/4] Fixed failing test cases --- tests/test_BaseStruc.py | 6 ++++-- tests/test_atomFill.py | 6 +++--- tests/test_atomRandomPlace.py | 6 +++--- tests/test_moleculeFill.py | 6 +++--- tests/test_moleculeRandomPlace.py | 8 +++++--- tests/test_randOrient.py | 6 +++--- tests/test_readWritePDB.py | 6 +++--- 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/tests/test_BaseStruc.py b/tests/test_BaseStruc.py index 43e61f1..ae3f7ed 100644 --- a/tests/test_BaseStruc.py +++ b/tests/test_BaseStruc.py @@ -32,10 +32,12 @@ def testBaseStruc(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc, baseUnitCell = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, baseUnitCell, baseConnectivity = readStrucFile( + iparamsSphere['baseStrucFile'] + ) else: baseStruc = None diff --git a/tests/test_atomFill.py b/tests/test_atomFill.py index b816012..fac0ac9 100644 --- a/tests/test_atomFill.py +++ b/tests/test_atomFill.py @@ -30,10 +30,10 @@ def testAtomFill(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, _, _ = readStrucFile(iparamsSphere['baseStrucFile']) else: baseStruc = None @@ -45,4 +45,4 @@ def testAtomFill(): outStrucSphere, strucTypeSphere = drawMolSphere(struc, baseStruc, iparamsSphere) assert len(outStrucSphere) != 0, "Output structure should have some length" - assert strucTypeSphere == "atom", "Structure type should be an atom" \ No newline at end of file + assert strucTypeSphere == "atom", "Structure type should be an atom" diff --git a/tests/test_atomRandomPlace.py b/tests/test_atomRandomPlace.py index 458f087..87bf8f8 100644 --- a/tests/test_atomRandomPlace.py +++ b/tests/test_atomRandomPlace.py @@ -32,10 +32,10 @@ def testRandomPlace(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, _, _ = readStrucFile(iparamsSphere['baseStrucFile']) else: baseStruc = None @@ -45,4 +45,4 @@ def testRandomPlace(): outStrucSphere, strucTypeSphere = drawMolSphere(struc, baseStruc, iparamsSphere) assert len(outStrucSphere) != 0, "Output structure should have some length" - assert strucTypeSphere == "atom", "Structure type should be an atom" \ No newline at end of file + assert strucTypeSphere == "atom", "Structure type should be an atom" diff --git a/tests/test_moleculeFill.py b/tests/test_moleculeFill.py index 12291c3..41695e6 100644 --- a/tests/test_moleculeFill.py +++ b/tests/test_moleculeFill.py @@ -30,10 +30,10 @@ def testMoleculeFill(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, _, _ = readStrucFile(iparamsSphere['baseStrucFile']) else: baseStruc = None @@ -43,4 +43,4 @@ def testMoleculeFill(): outStrucSphere, strucTypeSphere = drawMolSphere(struc, baseStruc, iparamsSphere) assert len(outStrucSphere) != 0, "Output structure should have some length" - assert strucTypeSphere == "molecule", "Structure type should be an atom" \ No newline at end of file + assert strucTypeSphere == "molecule", "Structure type should be an atom" diff --git a/tests/test_moleculeRandomPlace.py b/tests/test_moleculeRandomPlace.py index d820f4c..76c62ec 100644 --- a/tests/test_moleculeRandomPlace.py +++ b/tests/test_moleculeRandomPlace.py @@ -32,10 +32,12 @@ def testMoleculeRandomPlace(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc, baseUnitCell = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, baseUnitCell, baseConnectivity = readStrucFile( + iparamsSphere['baseStrucFile'] + ) else: baseStruc = None @@ -45,4 +47,4 @@ def testMoleculeRandomPlace(): outStrucSphere, strucTypeSphere = drawMolSphere(struc, baseStruc, iparamsSphere) assert len(outStrucSphere) != 0, "Output structure should have some length" - assert strucTypeSphere == "molecule", "Structure type should be an atom" \ No newline at end of file + assert strucTypeSphere == "molecule", "Structure type should be an atom" diff --git a/tests/test_randOrient.py b/tests/test_randOrient.py index 6544c7f..5514b5f 100644 --- a/tests/test_randOrient.py +++ b/tests/test_randOrient.py @@ -32,10 +32,10 @@ def testRandOrient(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, _, _ = readStrucFile(iparamsSphere['baseStrucFile']) else: baseStruc = None @@ -45,4 +45,4 @@ def testRandOrient(): outStrucSphere, strucTypeSphere = drawMolSphere(struc, baseStruc, iparamsSphere) assert len(outStrucSphere) != 0, "Output structure should have some length" - assert strucTypeSphere == "molecule", "Structure type should be an atom" \ No newline at end of file + assert strucTypeSphere == "molecule", "Structure type should be an atom" diff --git a/tests/test_readWritePDB.py b/tests/test_readWritePDB.py index 1b9e141..55d48c1 100644 --- a/tests/test_readWritePDB.py +++ b/tests/test_readWritePDB.py @@ -30,10 +30,10 @@ def testReadWritePDB(): if name not in iparamsCube: iparamsCube[name] = dparams[name] - struc, unitCell = readStrucFile(iparamsSphere['structureFile']) + struc, unitCell, connectivity = readStrucFile(iparamsSphere['structureFile']) if iparamsSphere['baseStrucFile']: - baseStruc = readStrucFile(iparamsSphere['baseStrucFile']) + baseStruc, _, _ = readStrucFile(iparamsSphere['baseStrucFile']) else: baseStruc = None @@ -45,4 +45,4 @@ def testReadWritePDB(): outStrucSphere, strucTypeSphere = drawMolSphere(struc, baseStruc, iparamsSphere) assert len(outStrucSphere) != 0, "Output structure should have some length" assert strucTypeSphere == "molecule", "Structure type should be an atom" - assert isinstance(outStrucSphere[0][0][-1], str), 'Final place should be residue ID' \ No newline at end of file + assert isinstance(outStrucSphere[0][0][-1], str), 'Final place should be residue ID' From 37cb3068ba73c6af7e7522b9130acb14b3041277 Mon Sep 17 00:00:00 2001 From: Dominick Filonowich Date: Wed, 5 Aug 2026 13:24:07 -0700 Subject: [PATCH 2/4] Fixed deprciation error with pandas --- TurtleMol/avogadroPlugin/definiteBox.py | 2 +- TurtleMol/avogadroPlugin/definiteMesh.py | 2 +- TurtleMol/avogadroPlugin/definiteSphere.py | 2 +- TurtleMol/avogadroPlugin/densityBox.py | 2 +- TurtleMol/avogadroPlugin/densityMesh.py | 2 +- TurtleMol/avogadroPlugin/densitySphere.py | 2 +- TurtleMol/avogadroPlugin/fillBox.py | 2 +- TurtleMol/avogadroPlugin/fillMesh.py | 2 +- TurtleMol/avogadroPlugin/fillSphere.py | 2 +- TurtleMol/readWriteFiles.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TurtleMol/avogadroPlugin/definiteBox.py b/TurtleMol/avogadroPlugin/definiteBox.py index cab536f..47c588b 100644 --- a/TurtleMol/avogadroPlugin/definiteBox.py +++ b/TurtleMol/avogadroPlugin/definiteBox.py @@ -110,7 +110,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/definiteMesh.py b/TurtleMol/avogadroPlugin/definiteMesh.py index 8b0828e..441249b 100644 --- a/TurtleMol/avogadroPlugin/definiteMesh.py +++ b/TurtleMol/avogadroPlugin/definiteMesh.py @@ -96,7 +96,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/definiteSphere.py b/TurtleMol/avogadroPlugin/definiteSphere.py index c86a81c..9c8a195 100644 --- a/TurtleMol/avogadroPlugin/definiteSphere.py +++ b/TurtleMol/avogadroPlugin/definiteSphere.py @@ -90,7 +90,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/densityBox.py b/TurtleMol/avogadroPlugin/densityBox.py index e0d6d1a..e507195 100644 --- a/TurtleMol/avogadroPlugin/densityBox.py +++ b/TurtleMol/avogadroPlugin/densityBox.py @@ -104,7 +104,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/densityMesh.py b/TurtleMol/avogadroPlugin/densityMesh.py index 83218d9..bda31f1 100644 --- a/TurtleMol/avogadroPlugin/densityMesh.py +++ b/TurtleMol/avogadroPlugin/densityMesh.py @@ -104,7 +104,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/densitySphere.py b/TurtleMol/avogadroPlugin/densitySphere.py index c890054..4df6aa6 100644 --- a/TurtleMol/avogadroPlugin/densitySphere.py +++ b/TurtleMol/avogadroPlugin/densitySphere.py @@ -84,7 +84,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/fillBox.py b/TurtleMol/avogadroPlugin/fillBox.py index b425c8e..5200a77 100644 --- a/TurtleMol/avogadroPlugin/fillBox.py +++ b/TurtleMol/avogadroPlugin/fillBox.py @@ -95,7 +95,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/fillMesh.py b/TurtleMol/avogadroPlugin/fillMesh.py index 340be56..1f67974 100644 --- a/TurtleMol/avogadroPlugin/fillMesh.py +++ b/TurtleMol/avogadroPlugin/fillMesh.py @@ -89,7 +89,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/avogadroPlugin/fillSphere.py b/TurtleMol/avogadroPlugin/fillSphere.py index e5ae84a..5d06732 100644 --- a/TurtleMol/avogadroPlugin/fillSphere.py +++ b/TurtleMol/avogadroPlugin/fillSphere.py @@ -75,7 +75,7 @@ def runCommand(): strucIO = io.StringIO(iparams['structureFile']) - struc = pd.read_csv(strucIO, delim_whitespace=',', + struc = pd.read_csv(strucIO, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]) diff --git a/TurtleMol/readWriteFiles.py b/TurtleMol/readWriteFiles.py index d73ef9c..eb3b495 100644 --- a/TurtleMol/readWriteFiles.py +++ b/TurtleMol/readWriteFiles.py @@ -26,7 +26,7 @@ def readStrucFile(filePath): '''Reads structure file''' # Reads XYZ if str(filePath[-3:]).lower() == 'xyz': - return pd.read_csv(filePath, delim_whitespace=True, + return pd.read_csv(filePath, sep=r'\s+', skiprows=2, names=["Atom", "X", "Y", "Z"]), None, None # Reads PDB if str(filePath[-3:]).lower() == 'pdb': From 8535aa886c574cf5b61818ffe4dc856d298744ef Mon Sep 17 00:00:00 2001 From: Dominick Filonowich Date: Wed, 5 Aug 2026 13:34:11 -0700 Subject: [PATCH 3/4] Corrected pylint issues --- .github/workflows/pylint.yml | 4 ++-- .pylintrc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index abf7fc7..df41ed3 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -17,7 +17,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint + pip install 'pylint==3.3.9' - name: Analysing the code with pylint run: | - pylint $(git ls-files '*.py') --rcfile .pylintrc --fail-under=7.0 + pylint $(git ls-files '*.py') --rcfile .pylintrc diff --git a/.pylintrc b/.pylintrc index 3a7dc9f..0dc1a02 100644 --- a/.pylintrc +++ b/.pylintrc @@ -16,4 +16,6 @@ method-rgx=(([a-z][a-zA-Z0-9]*)|([A-Z][a-zA-Z0-9]+))$ module-rgx=(([a-z][a-z0-9]*)|([A-Z][a-zA-Z0-9]+))$ [MASTER] +fail-under=7.0 +persistent=no ignore-patterns=(.)*_test\.py,test_(.)*\.py From bfd640f913acca1eeda5509449d3cc1111c8a552 Mon Sep 17 00:00:00 2001 From: Dominick Filonowich Date: Wed, 5 Aug 2026 13:38:44 -0700 Subject: [PATCH 4/4] Fixed further pylint errors --- .github/workflows/pylint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index df41ed3..76e5849 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -17,7 +17,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install 'pylint==3.3.9' + pip install 'pylint==3.2.7' - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') --rcfile .pylintrc