diff --git a/iscc_core/__init__.py b/iscc_core/__init__.py index 6163ab9..6c23c7c 100644 --- a/iscc_core/__init__.py +++ b/iscc_core/__init__.py @@ -1,9 +1,7 @@ __version__ = "0.2.4" from iscc_core.options import core_opts, conformant_options -from iscc_core import v0 # Import full api to toplevel - from iscc_core.conformance import * from iscc_core.constants import * diff --git a/iscc_core/conformance.py b/iscc_core/conformance.py index 0de6256..3ab743e 100644 --- a/iscc_core/conformance.py +++ b/iscc_core/conformance.py @@ -58,7 +58,7 @@ def conformance_testdata(): with open(TEST_DATA, "rb") as stream: data = json.load(stream) for func_name, tests in data.items(): - func_obj = getattr(ic.v0, func_name) + func_obj = getattr(ic, func_name) for test_name, test_values in tests.items(): # Convert stream and bytes test values diff --git a/iscc_core/v0.py b/iscc_core/v0.py deleted file mode 100644 index ec73c64..0000000 --- a/iscc_core/v0.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -"""Collects stable v0 top level api into its own module""" -from iscc_core.code_meta import gen_meta_code_v0, soft_hash_meta_v0 -from iscc_core.code_content_text import gen_text_code_v0, soft_hash_text_v0 -from iscc_core.code_content_image import gen_image_code_v0, soft_hash_image_v0 -from iscc_core.code_content_audio import gen_audio_code_v0, soft_hash_audio_v0 -from iscc_core.code_content_video import gen_video_code_v0, soft_hash_video_v0 -from iscc_core.code_content_mixed import gen_mixed_code_v0, soft_hash_codes_v0 -from iscc_core.code_data import gen_data_code_v0, soft_hash_data_v0, DataHasherV0 -from iscc_core.code_instance import gen_instance_code_v0, hash_instance_v0, InstanceHasherV0 -from iscc_core.code_flake import gen_flake_code_v0, uid_flake_v0 -from iscc_core.iscc_code import gen_iscc_code_v0 -from iscc_core.iscc_id import gen_iscc_id_v0 diff --git a/tests/test_code_flake.py b/tests/test_code_flake.py index c2c7fa3..13ad761 100644 --- a/tests/test_code_flake.py +++ b/tests/test_code_flake.py @@ -11,24 +11,24 @@ def test_gen_flake_code(): def test_gen_flake_code_v0(): - flake = ic.v0.gen_flake_code_v0()["iscc"] + flake = ic.gen_flake_code_v0()["iscc"] assert len(flake) == 21 assert flake.startswith("ISCC:OAA") def test_uid_flake_v0(): - assert ic.v0.uid_flake_v0(0).hex().startswith("000000000000") + assert ic.uid_flake_v0(0).hex().startswith("000000000000") ts = 1644789890.9664667 - assert ic.v0.uid_flake_v0(ts).hex().startswith("017ef51dff96") + assert ic.uid_flake_v0(ts).hex().startswith("017ef51dff96") def test_uid_flake_v0_raises(): with pytest.raises(ValueError): - ic.v0.uid_flake_v0(bits=31) + ic.uid_flake_v0(bits=31) with pytest.raises(ValueError): - ic.v0.uid_flake_v0(bits=257) + ic.uid_flake_v0(bits=257) with pytest.raises(ValueError): - ic.v0.uid_flake_v0(bits=65) + ic.uid_flake_v0(bits=65) def test_Flake_init():