Unplug lattice detector from package, expand research docs

This commit is contained in:
Victor Kuznetsov
2026-08-23 11:13:56 -07:00
parent 2445086fa4
commit d22872f84d
34 changed files with 2210 additions and 1709 deletions
+7 -3
View File
@@ -18,12 +18,10 @@ CHATGPT = SAMPLES / "chatgpt-1.png"
class TestTopLevelExports:
def test_lazy_reexports_resolve(self):
from remove_ai_watermarks import openai_provenance, synthid_detector
from remove_ai_watermarks import openai_provenance
assert raiw.remove_visible is api.remove_visible
assert raiw.visible_provenance is api.visible_provenance
assert raiw.detect_synthid is synthid_detector.detect_synthid
assert raiw.SynthIDDetection is synthid_detector.SynthIDDetection
assert raiw.verify_openai_synthid is openai_provenance.verify_openai_synthid
assert raiw.OpenAIProvenanceError is openai_provenance.OpenAIProvenanceError
assert raiw.OpenAISynthIDDetection is openai_provenance.OpenAISynthIDDetection
@@ -32,6 +30,12 @@ class TestTopLevelExports:
with pytest.raises(AttributeError):
_ = raiw.does_not_exist
def test_local_synthid_detector_is_not_a_package_export(self):
with pytest.raises(AttributeError):
_ = raiw.detect_synthid
with pytest.raises(AttributeError):
_ = raiw.SynthIDDetection
def test_bare_import_is_light(self):
# importing the package must not pull the heavy cv2/torch stack (PEP 562 lazy).
# Checked in a FRESH interpreter -- another test in this process may already