Skip to content

Commit

Permalink
Switch style check to Black, prep for 0.8 release (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
standage authored Aug 30, 2022
1 parent 358b674 commit 6666132
Show file tree
Hide file tree
Showing 7 changed files with 435 additions and 252 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build/
sandbox/
default.profraw
.DS_Store
.vscode/
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.8] 2022-08-30

## Changed
- Updated doctest for `pytaxonkit.list` to include taxa that are updated in the NCBI taxonomy DB less frequently (#13, #14, #21, #24)
- Other occasional updates to compensate for changes in the NCBI taxonomy DB (#15, #16, #17, #23, #26)
- Updated `pytaxonkit.list_ranks()` to match updated `taxonkit filter --list-order` behavior (#20)
- Now using Black instead of pycodestyle to check and autoformat Python code (#27)

### Fixed
- Bug with how certain functions handle empty inputs (#19)
- Bug causing `pytaxonkit.lineage` to fail when only a single taxid was provided as input (#22)
- Bug causing `pytaxonkit.lca` to fail when all input taxids are deleted or "unfound" (#22)
- Bug causing `pytaxonkit.name` to fail on empty inputs (#26)


## [0.7.2] 2021-01-27

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

### Fixed
- Bug with empty inputs (#19)


## [0.6.1] 2020-10-30

Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ test4:
COLUMNS=150 pytest -n 4 --cov=pytaxonkit --doctest-modules pytaxonkit.py conftest.py


## style: check code style against PEP8
## style: check code style
style:
pycodestyle --max-line-length=99 pytaxonkit.py
black --line-length=99 --check pytaxonkit.py setup.py


## format: autoformat Python code
format:
black --line-length=99 pytaxonkit.py setup.py


## devenv: set up a development environment
devenv:
conda install -y pycodestyle pytest pytest-cov
conda install -y black==22.6.0 pytest pytest-cov
pip install -e .
echo 'make style' >> .git/hooks/pre-commit
chmod 755 .git/hooks/pre-commit
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ Execute `help(pytaxonkit.name2taxid)` (and so on) from the Python interpreter fo

> **NOTES**
> - The `reformat` operation is automatically run by `pytaxonkit.lineage` and cannot be invoked independently.
> - The `taxid-changelog` operation is not supported.
> - The `genautocomplete` operation is specific to the shell and is not supported.
> - Several other operations are not supported, including `cami-filter`, `create-taxdump`, `profile2cami`, and `taxid-changelog`.
> - 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.
### name2taxid

Expand Down Expand Up @@ -95,7 +96,6 @@ BasicTaxon(taxid=9904, rank='species', name='Bos gaurus')
>>> import pytaxonkit
>>> taxids = [131567, 2759, 33154, 33208, 6072, 33213, 33317, 1206794, 88770, 6656, 197563, 197562, 6960, 50557, 85512, 7496, 33340, 33392, 85604, 7088]
>>> result = pytaxonkit.filter(taxids, equal_to='phylum', higher_than='phylum')
>>> pytaxonkit.name(result)
>>> pytaxonkit.name(result)
TaxID Name
0 2759 Eukaryota
Expand Down
2 changes: 1 addition & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ channels:
- conda-forge
- defaults
dependencies:
- black==22.6.0
- pandas>=1.0
- python>=3.6
- pycodestyle>=2.5
- pytest>=5.4
- pytest-cov>=2.8
- pytest-xdist>=1.31
Expand Down
Loading

0 comments on commit 6666132

Please sign in to comment.