Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Remove deprecated minhash functions #1149

Merged
merged 5 commits into from
Aug 6, 2020

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Aug 6, 2020

Per #1128 remove all of the MinHash functions deprecated in 3.5 / to be removed in 4.0.

Fixes #1148.

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

ctb and others added 4 commits August 5, 2020 15:47
* move sourmash._minhash to sourmash.minhash

* deprecate max_hash throughout

* change MinHash.add(...) to MinHash.add_kmer(...)

* remove update and is_molecule_type from MinHash

* remove subtract_mins

* rename downsample_n to downsample_num

* switch to hashes property instead of using get_mins()

* replace get_mins(...) with hashes thruout

* change deprecated 'compare' usage to 'similarity' in test_jaccard

* elminate most of the deprecation warnings in test__minhash by switching compare to similarity

* fix remaining tests in test__minhash

* fix compat message

* restore removed functions, sigh :)

* minor upd

* add deprecations

* use a wrapper object for .hashes and make it read-only

* refactor to use downsample(num/scaled=

* refactor to use downsample(scaled=...)

* return two deleted tests

* fixed test that was masked by another test

* add explicit check for length of kmer in add_kmer

* fix ordering in hash retrieval

* fix more tests for py2 <khaaaaaaaaaan>

* add 'flatten' method to MinHash

* add test for MinHash.flatten

* add tests for add and add_kmer

* remove nonsense test

* test the (now deprecated) get_mins function

* test (deprecated) get_hashes

* add tests for downsample and is_molecule_type

* test moltype properties more explicitly

* fix py27

* move translate_codon to module level

* put a stub in place of _minhash with a FutureWarning

* adjust import req

* remove __future__ imports

* remove sys.version checks for py 2

* remove requirement for enum34

* remove __reduce__ from MinHash class (#1144)

* avoid the DeprecationWarning

* update docs: only python 3.7 and 3.8

* remove 2.7 from travis

* remove _compat from signature.py

* remove _compat from exceptions.py

* remove _compat from index and sbt_storage

* remove _compat from nodegraph

* remove _compat completely

* make signature -> sig in CLI using py3 'aliases'

* put back assert that didn't work in py2

* Update sourmash/minhash.py

Co-authored-by: Luiz Irber <luizirber@users.noreply.github.com>

Co-authored-by: Luiz Irber <luizirber@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Aug 6, 2020

Codecov Report

❗ No coverage uploaded for pull request base (latest@77bf563). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             latest    #1149   +/-   ##
=========================================
  Coverage          ?   92.62%           
=========================================
  Files             ?       71           
  Lines             ?     5698           
  Branches          ?        0           
=========================================
  Hits              ?     5278           
  Misses            ?      420           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77bf563...d4f0cea. Read the comment docs.

@ctb ctb changed the title [WIP] Remove deprecated minhash functions [MRG] Remove deprecated minhash functions Aug 6, 2020
@ctb ctb requested a review from luizirber August 6, 2020 16:25
@luizirber luizirber merged commit f4fac4b into latest Aug 6, 2020
@luizirber luizirber deleted the remove_deprecated_minhash branch August 6, 2020 16:56
@ctb ctb mentioned this pull request Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove MinHash functions deprecated in 3.x from latest
2 participants