de0bb21fb3
Apply isort (forcing single lines, not sorting by type) via ruff
...
$ ruff check --fix --select=I \
--config=lint.isort.force-single-line=true \
--config=lint.isort.order-by-type=false \
BioSQL/ Bio/ Tests/ Scripts/ Doc/ setup.py
Using ruff version 0.4.10
2024-06-26 15:31:39 +09:00
0938871295
black v23.9.1
...
Had to tweak four conflicts with D202
2023-10-05 08:47:54 +01:00
e812f38bfb
replace numpy by np in some test scripts ( #4418 )
...
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
---------
Co-authored-by: Michiel de Hoon <mdehoon@madpc2s-MacBook-Pro.local >
2023-08-14 18:31:48 +09:00
8d9d20d09c
change test_cluster type to builtin float
2022-12-22 10:08:02 +00:00
3b4804d79c
fixed additional instance of deprecated type
2022-12-22 10:08:02 +00:00
7dc2fb357c
Apply black style to test_Cluster.py, version 19.10b0. ( #3089 )
...
* Apply black style to test_Cluster.py, version 19.10b0.
* disable black format on some matrices to preserve line breaks
2020-07-24 11:39:00 +01:00
fef0cae7c7
update test_Cluster.py for python3 ( #2658 )
2020-02-09 17:30:23 +09:00
34dbd86f7d
Avoid flake8 str concatenation warning
2019-12-28 19:20:44 +00:00
0f10cf5657
fix indentation ( #2452 )
2019-12-28 22:57:27 +09:00
12f7276f7a
convert Bio.Cluster to python3 only ( #2451 )
...
* convert Bio.Cluster to python3 only
* report NaN
2019-12-28 11:29:01 +00:00
98bb06c7fb
fix clustercentroids ( #2231 )
...
* fix clustercentroids
* adding tests for clustercentroids
* getting started on transpose
* starting Transpose=True
* add checks for transpose=True
* make travis happy
2019-08-29 12:56:13 +09:00
1b9e569a7f
Using tool unify to convert Tests/ to use double quotes
...
Using https://github.com/myint/unify for this:
$ unify --quote \" --in-place Tests/*.py Tests/*/*.py
2019-08-02 14:10:22 +01:00
e4fc1f9511
flake8 E241 - fixed with autopep8
...
autopep8 -i --select E241 *.py
2019-04-23 10:35:56 +01:00
846c8f1cc6
flake8 D100: Automatically added docstrings
...
Done with the following ad-hoc script:
"""In-place fix for D100 Missing docstring in public module."""
import os
import sys
def fix(lines, docstring):
answer = []
# 0 = preamble
# 1 = waiting for it
# 2 = seen module docstring
state = 0
for line in lines:
if state == 0 and line.startswith("#") or not line.strip():
# hashbang or licence block
pass
elif state == 0 and line.lstrip().startswith('"""'):
state = 2
elif state == 2:
pass
else:
# Insert docstring
answer.append('"""%s"""\n\n' % docstring)
state = 2
answer.append(line)
return answer
for f in sys.argv[1:]:
print(f)
with open(f) as handle:
old = list(handle)
name = os.path.basename(f)
assert name.endswith(".py")
name = name[:-3].replace("_", " ")
if name.startswith("test "):
name = "Tests for %s" % name[5:]
if not name.endswith(" tool"):
name += " module"
new = fix(old, name + ".")
with open(f, "w") as handle:
for line in new:
handle.write(line)
print("Done")
2019-04-23 10:27:31 +01:00
6825235bac
flake8 E303 too many blank lines
2018-11-21 13:59:22 +00:00
158bb2e02e
add test using default weight
2018-11-21 13:59:22 +00:00
1268821636
Fill in missing licence headers in Python files ( #1714 )
...
This avoids changing files which should be ready to dual license.
2018-07-11 08:57:12 +01:00
ae31f56d1b
Need to test for numpy in test_Cluster.py
...
Even if we have a numpy check in Bio.Cluster, due
to the way it gets imported in the test we need
to have our own check her first anyway.
2018-06-22 11:44:20 +01:00
12341ae713
Cluster tests ( #1631 )
...
* fix documentation, cleanup, and one bug fix
* cosmetic changes only
* fixing Travis errors
* fixing Travis errors
* fixing Travis errors
* fixing Travis errors
* rewrote Tree index code
2018-04-29 15:30:26 +09:00
1b2d7dfc87
Cluster version 1.55, first trial ( #1599 )
...
Updating to the C Clustering Library version 1.55. This allows compiling Bio.Cluster without numpy being present (numpy is still needed at runtime).
2018-04-14 10:01:54 +09:00
c9721f453e
PEP8 whitespace
2017-08-21 10:49:34 +01:00
9f7fd3eb4c
C Clustering Library 1.53. This adds the sort method to Trees, improves the cut method, and fixes some minor bugs.
2017-08-19 15:24:51 +09:00
fd1c57adb4
autopep8 --in-place --select E305 Tests/*.py
...
Taking advantage of autopep8 being updated to fix
https://github.com/hhatto/autopep8/issues/304
2017-04-20 17:15:31 +01:00
e5bbe09052
Remove duplicated line, my mistake
2017-02-08 11:11:35 +00:00
2a3735a591
Not using lambdas just to pass arguments to assertEquals.
2017-02-08 10:29:42 +00:00
a112181dfc
Fix remaining pep8 E124 failures under Tests/
2016-06-15 11:01:14 +01:00
ae8b8ecbfb
Avoid naked except clauses.
...
Would also catch KeyboardInterupt, rightly flagged by QualifiedCode.com
as worth fixing.
Also minor PEP8 white space fixes.
2016-01-04 20:45:18 +09:00
838a8e1984
Selective use of autopep8 to remove whitespace after commas
...
Numerous examples still present where the white space is used
to make a data-structure much easier to read (arrays etc).
Part of tackling GitHub issue #406
2015-01-07 04:43:14 +00:00
a87df70051
PEP8 white space in Tests
...
autopep8 --select E225,E226,E261,E302 -i Tests/*.py
2015-01-04 04:24:47 +00:00
db6bc30338
PEP8 fixes rest of test files
2014-11-16 22:13:26 +09:00
b67cebf60e
Fix common PEP8 violation in unittest verbosity argument
2014-11-11 14:38:37 +09:00
b0496b342e
autopep8 E203 - Remove extraneous whitespace (colon related)
...
$ autopep8 -r -i --select E203 ...
Note did not apply changes to e.g. Tests/test_Crystal.py and
Bio/SCOP/Raf.py where colon used for numpy array access, nor
auto-generated files like Bio/SubsMat/MatrixInfo.py
2014-10-27 14:28:03 +00:00
82272b1f36
autopep8 E265 - Format block comments.
...
$ autopep8 --version
autopep8 1.0.4
$ autopep8 -r -i --select E265 ...
2014-10-27 14:27:12 +00:00
c7811df35b
Test Bio.Cluster error handling.
...
See previous commit and also Debian issue https://bugs.debian.org/751277
where this part of the C code was failing on Python 3 under PowerPC,
dicussion also CC'd to the Biopython mailing list.
This closes GitHub issue #340 .
2014-08-30 13:33:47 +09:00
3e0f34a2ad
Switch import testing order for Bio.Cluster test
2014-04-27 13:15:12 +01:00
14977ce666
Apply 2to3 ws_comma fixer (white space changes)
...
$ 2to3 --no-diffs -n -w -f ws_comma Bio BioSQL Tests Doc Scripts
2013-10-05 13:59:54 +01:00
87a3a3ae92
Remove superfluous commas.
2013-03-29 17:44:19 +00:00
fd82a0a7a7
Add blank lines where needed (PEP8 E302).
2012-12-06 10:43:43 +08:00
9dfec35649
Zap redundant backslashes between brackets (PEP8 E502).
2012-12-05 10:14:03 +00:00
9c76921b91
Remove excessive blank lines (PEP8 E303).
2012-12-05 09:22:22 +00:00
b1c859788e
Trim EOL whitespace (PEP8 W291, W293), batch 3.
2012-12-04 19:22:28 +08:00
5192d13e01
Fix whitespace before and after operators (PEP8 E221 and E222).
...
Whitespace was left intact in places where it helps readability.
2012-12-04 09:02:37 +00:00
145615b416
Avoid chaining commands by ";" and ";" at the end of statements.
...
Fixes PEP8 E702 multiple statements on one line (semicolon)
2012-12-03 19:30:45 +08:00
750e1b602a
C Clustering Library version 1.50. Can be used with Python 3
2010-12-25 10:52:38 +09:00
cb1f54499c
Use ImportError subclass for missing Python dependencies (see Gentoo Bug 313125 with pydoc)
2010-10-18 14:40:43 +01:00
f53f212808
C Clustering Library version 1.49; Don't test eigenvectors for eigenvalues equal to zero
2010-04-05 22:05:39 +09:00
f05f8b5194
C Clustering Library version 1.48; adding better support for principal component analysis.
2010-03-29 12:49:55 +09:00
9252f1c129
No code changes. Removing white space before ':' character to match PEP8. Added a few missing license statements too.
2009-11-11 11:44:41 +00:00
fd3059dca8
C Clustering Library version 1.46.
2009-05-30 07:47:41 +00:00
8c8545b5b0
Simplifying test_Cluster.py.
2009-02-03 12:06:29 +00:00