npcpy 1.3.14__tar.gz → 1.3.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {npcpy-1.3.14/npcpy.egg-info → npcpy-1.3.15}/PKG-INFO +1 -1
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/rl.py +1 -1
- {npcpy-1.3.14 → npcpy-1.3.15/npcpy.egg-info}/PKG-INFO +1 -1
- {npcpy-1.3.14 → npcpy-1.3.15}/setup.py +1 -1
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_load.py +3 -13
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_serve.py +3 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_text.py +3 -4
- {npcpy-1.3.14 → npcpy-1.3.15}/LICENSE +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/MANIFEST.in +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/README.md +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/build_funcs.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/audio.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/data_models.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/image.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/load.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/text.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/video.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/web.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/diff.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/ge.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/memory_trainer.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/model_ensembler.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/sft.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/usft.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/audio_gen.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/embeddings.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/image_gen.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/ocr.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/response.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/video_gen.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/world_gen.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/llm_funcs.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/main.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/command_history.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/kg_vis.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/knowledge_graph.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/memory_processor.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/search.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/mix/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/mix/debate.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ml_funcs.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npc_array.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npc_compiler.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npc_sysenv.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npcs.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/serve.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/ai_function_tools.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/database_ai_adapters.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/database_ai_functions.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/model_runner.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/npcsql.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/sql_model_compiler.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/tools.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/__init__.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/browser.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/desktop.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/plan.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/trigger.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/SOURCES.txt +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/dependency_links.txt +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/requires.txt +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/top_level.txt +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/setup.cfg +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_audio.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_command_history.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_documentation_examples.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_image.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_llm_funcs.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_npc_array.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_npc_compiler.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_npcsql.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_response.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_tools.py +0 -0
- {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_web.py +0 -0
|
@@ -199,15 +199,12 @@ class TestExtensionMap:
|
|
|
199
199
|
assert extension_map["MP3"] == "audio"
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
@pytest.mark.skipif(
|
|
203
|
-
not pytest.importorskip("openpyxl", reason="openpyxl not installed"),
|
|
204
|
-
reason="openpyxl not installed"
|
|
205
|
-
)
|
|
206
202
|
class TestLoadExcel:
|
|
207
203
|
"""Test Excel file loading - requires openpyxl."""
|
|
208
204
|
|
|
209
205
|
def test_load_excel(self):
|
|
210
206
|
"""Test Excel file loading"""
|
|
207
|
+
pytest.importorskip("openpyxl")
|
|
211
208
|
from npcpy.data.load import load_excel
|
|
212
209
|
|
|
213
210
|
temp_dir = tempfile.mkdtemp()
|
|
@@ -232,16 +229,12 @@ class TestLoadExcel:
|
|
|
232
229
|
shutil.rmtree(temp_dir)
|
|
233
230
|
|
|
234
231
|
|
|
235
|
-
@pytest.mark.skipif(
|
|
236
|
-
not pytest.importorskip("fitz", reason="PyMuPDF not installed"),
|
|
237
|
-
reason="PyMuPDF (fitz) not installed"
|
|
238
|
-
)
|
|
239
232
|
class TestLoadPDF:
|
|
240
233
|
"""Test PDF file loading - requires PyMuPDF."""
|
|
241
234
|
|
|
242
235
|
def test_load_pdf(self):
|
|
243
236
|
"""Test PDF file loading"""
|
|
244
|
-
|
|
237
|
+
fitz = pytest.importorskip("fitz")
|
|
245
238
|
from npcpy.data.load import load_pdf
|
|
246
239
|
|
|
247
240
|
temp_dir = tempfile.mkdtemp()
|
|
@@ -261,15 +254,12 @@ class TestLoadPDF:
|
|
|
261
254
|
|
|
262
255
|
|
|
263
256
|
@pytest.mark.slow
|
|
264
|
-
@pytest.mark.skipif(
|
|
265
|
-
not pytest.importorskip("faster_whisper", reason="faster_whisper not installed"),
|
|
266
|
-
reason="faster_whisper not installed - audio transcription unavailable"
|
|
267
|
-
)
|
|
268
257
|
class TestLoadAudio:
|
|
269
258
|
"""Test audio file loading - requires faster_whisper (slow, loads model)."""
|
|
270
259
|
|
|
271
260
|
def test_load_audio_wav(self, tmp_path):
|
|
272
261
|
"""Ensure audio loader returns text (transcript or fallback) for wav files."""
|
|
262
|
+
pytest.importorskip("faster_whisper")
|
|
273
263
|
import wave
|
|
274
264
|
import struct
|
|
275
265
|
from npcpy.data.load import load_audio
|
|
@@ -153,15 +153,12 @@ class TestLoadAllFiles:
|
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
@pytest.mark.slow
|
|
156
|
-
@pytest.mark.skipif(
|
|
157
|
-
not pytest.importorskip("sentence_transformers", reason="sentence_transformers not installed"),
|
|
158
|
-
reason="sentence_transformers not installed - RAG search unavailable"
|
|
159
|
-
)
|
|
160
156
|
class TestRAGSearch:
|
|
161
157
|
"""Test RAG search functionality - requires sentence_transformers (slow, loads model)."""
|
|
162
158
|
|
|
163
159
|
def test_rag_search_with_string(self):
|
|
164
160
|
"""Test RAG search with string input"""
|
|
161
|
+
pytest.importorskip("sentence_transformers")
|
|
165
162
|
from npcpy.data.text import rag_search
|
|
166
163
|
|
|
167
164
|
text_data = """
|
|
@@ -180,6 +177,7 @@ class TestRAGSearch:
|
|
|
180
177
|
|
|
181
178
|
def test_rag_search_with_dict(self):
|
|
182
179
|
"""Test RAG search with dictionary input"""
|
|
180
|
+
pytest.importorskip("sentence_transformers")
|
|
183
181
|
from npcpy.data.text import rag_search
|
|
184
182
|
|
|
185
183
|
text_data = {
|
|
@@ -198,6 +196,7 @@ class TestRAGSearch:
|
|
|
198
196
|
|
|
199
197
|
def test_rag_search_high_threshold(self):
|
|
200
198
|
"""Test RAG search with high similarity threshold"""
|
|
199
|
+
pytest.importorskip("sentence_transformers")
|
|
201
200
|
from npcpy.data.text import rag_search
|
|
202
201
|
|
|
203
202
|
text_data = "The quick brown fox jumps over the lazy dog. Python is great for programming."
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|