Skip to content

Commit

Permalink
Merge pull request cogent3#1841 from GavinHuttley/develop
Browse files Browse the repository at this point in the history
MAINT: remove some plugins from toml file, relates to cogent3#1636
  • Loading branch information
GavinHuttley committed Apr 30, 2024
2 parents c0e2643 + 0c06aba commit 5a95c67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
8 changes: 0 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,8 @@ new_fragment_template="file: changelog.d/templates/new.md.j2"
entry_title_template="file: changelog.d/templates/title.md.j2"

[project.entry-points."cogent3.app"]
compress = "cogent3.app.io:compress"
concat = "cogent3.app.sample:concat"
decompress = "cogent3.app.io:decompress"
fixed_length = "cogent3.app.sample:fixed_length"
from_json = "cogent3.app.io:from_json"
from_primitive = "cogent3.app.io:from_primitive"
load_aligned = "cogent3.app.io:load_aligned"
load_db = "cogent3.app.io:load_db"
load_json = "cogent3.app.io:load_json"
Expand All @@ -192,16 +188,12 @@ omit_bad_seqs = "cogent3.app.sample:omit_bad_seqs"
omit_degenerates = "cogent3.app.sample:omit_degenerates"
omit_duplicated = "cogent3.app.sample:omit_duplicated"
omit_gap_pos = "cogent3.app.sample:omit_gap_pos"
pickle_it = "cogent3.app.io:pickle_it"
select_translatable = "cogent3.app.translate:select_translatable"
take_codon_positions = "cogent3.app.sample:take_codon_positions"
take_n_seqs = "cogent3.app.sample:take_n_seqs"
take_named_seqs = "cogent3.app.sample:take_named_seqs"
to_json = "cogent3.app.io:to_json"
to_primitive = "cogent3.app.io:to_primitive"
translate_seqs = "cogent3.app.translate:translate_seqs"
trim_stop_codons = "cogent3.app.sample:trim_stop_codons"
unpickle_it = "cogent3.app.io:unpickle_it"
write_db = "cogent3.app.io:write_db"
write_json = "cogent3.app.io:write_json"
write_seqs = "cogent3.app.io:write_seqs"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_app/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ def test_get_app_kwargs():


def test_app_help(capsys):
app_help("compress")
app_help("concat")
got = capsys.readouterr().out
assert "Options" in got
assert got.count("bytes") >= 2 # both input and output types are bytes
assert got.count("SerialisableType") == 1 # output type


@pytest.mark.parametrize(
Expand Down
10 changes: 5 additions & 5 deletions tests/test_app/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,27 +608,27 @@ def test_default_serialiser_deserialiser(data):


def test_to_json():
to_j = get_app("to_json")
to_j = io_app.to_json()
data = {"a": [0, 1]}
assert to_j(data) == json.dumps(data)


def test_from_json():
from_j = get_app("from_json")
from_j = io_app.from_json()
assert from_j('{"a": [0, 1]}') == {"a": [0, 1]}


def test_to_from_json():
to_j = get_app("to_json")
from_j = get_app("from_json")
to_j = io_app.to_json()
from_j = io_app.from_json()
app = to_j + from_j
data = {"a": [0, 1]}
assert app(data) == data
assert app(data) is not data


def test_to_json_combines():
app = get_app("to_primitive") + get_app("to_json")
app = io_app.to_primitive() + io_app.to_json()
assert app(DNA) == DNA.to_json()


Expand Down

0 comments on commit 5a95c67

Please sign in to comment.