Skip to content

Commit 6666132

Browse files
authored
Switch style check to Black, prep for 0.8 release (#27)
1 parent 358b674 commit 6666132

7 files changed

Lines changed: 435 additions & 252 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build/
66
sandbox/
77
default.profraw
88
.DS_Store
9+
.vscode/

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.8] 2022-08-30
6+
7+
## Changed
8+
- Updated doctest for `pytaxonkit.list` to include taxa that are updated in the NCBI taxonomy DB less frequently (#13, #14, #21, #24)
9+
- Other occasional updates to compensate for changes in the NCBI taxonomy DB (#15, #16, #17, #23, #26)
10+
- Updated `pytaxonkit.list_ranks()` to match updated `taxonkit filter --list-order` behavior (#20)
11+
- Now using Black instead of pycodestyle to check and autoformat Python code (#27)
12+
13+
### Fixed
14+
- Bug with how certain functions handle empty inputs (#19)
15+
- Bug causing `pytaxonkit.lineage` to fail when only a single taxid was provided as input (#22)
16+
- Bug causing `pytaxonkit.lca` to fail when all input taxids are deleted or "unfound" (#22)
17+
- Bug causing `pytaxonkit.name` to fail on empty inputs (#26)
18+
19+
520
## [0.7.2] 2021-01-27
621

722
### Added
@@ -10,9 +25,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1025
- Support for new `prefix` related flags (#6)
1126
- Use new `--show-lineage-ranks` to create new `FullLineageRanks` column in `lineage()` output (#8)
1227

13-
### Fixed
14-
- Bug with empty inputs (#19)
15-
1628

1729
## [0.6.1] 2020-10-30
1830

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@ test4:
1111
COLUMNS=150 pytest -n 4 --cov=pytaxonkit --doctest-modules pytaxonkit.py conftest.py
1212

1313

14-
## style: check code style against PEP8
14+
## style: check code style
1515
style:
16-
pycodestyle --max-line-length=99 pytaxonkit.py
16+
black --line-length=99 --check pytaxonkit.py setup.py
17+
18+
19+
## format: autoformat Python code
20+
format:
21+
black --line-length=99 pytaxonkit.py setup.py
1722

1823

1924
## devenv: set up a development environment
2025
devenv:
21-
conda install -y pycodestyle pytest pytest-cov
26+
conda install -y black==22.6.0 pytest pytest-cov
2227
pip install -e .
2328
echo 'make style' >> .git/hooks/pre-commit
2429
chmod 755 .git/hooks/pre-commit

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ Execute `help(pytaxonkit.name2taxid)` (and so on) from the Python interpreter fo
2424

2525
> **NOTES**
2626
> - The `reformat` operation is automatically run by `pytaxonkit.lineage` and cannot be invoked independently.
27-
> - The `taxid-changelog` operation is not supported.
2827
> - The `genautocomplete` operation is specific to the shell and is not supported.
28+
> - Several other operations are not supported, including `cami-filter`, `create-taxdump`, `profile2cami`, and `taxid-changelog`.
29+
> - The `pytaxonkit.__version__` variable refers to the version number of the Python bindings, while the `pytaxonkit.__taxonkitversion__` variable corresponds to the version of the installed TaxonKit program. These version numbers are not necessarily equal.
2930
3031
### name2taxid
3132

@@ -95,7 +96,6 @@ BasicTaxon(taxid=9904, rank='species', name='Bos gaurus')
9596
>>> import pytaxonkit
9697
>>> taxids = [131567, 2759, 33154, 33208, 6072, 33213, 33317, 1206794, 88770, 6656, 197563, 197562, 6960, 50557, 85512, 7496, 33340, 33392, 85604, 7088]
9798
>>> result = pytaxonkit.filter(taxids, equal_to='phylum', higher_than='phylum')
98-
>>> pytaxonkit.name(result)
9999
>>> pytaxonkit.name(result)
100100
TaxID Name
101101
0 2759 Eukaryota

environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7+
- black==22.6.0
78
- pandas>=1.0
89
- python>=3.6
9-
- pycodestyle>=2.5
1010
- pytest>=5.4
1111
- pytest-cov>=2.8
1212
- pytest-xdist>=1.31

0 commit comments

Comments
 (0)