Repository navigation
v0.4.0
- python-woc is now fork safe! That means you can do this:
from multiprocessing import Pool
from woc.local import WocMapsLocal
woc = WocMapsLocal()
def worker(idx):
return woc.show_content("tree", idx)
with Pool(8) as pool:
for r in pool.imap(worker, ["706aa4dedb560358bff21c3120a0b09532d3484d",
"3ccf6f8320740a1afec68b38b3b9ba46cedef368",
"e5798457aebae7c84eff7b80b50c3a938cc4cb63",
"836f04d5b374033b1608269e2f3aaabae263a0db",
"f54cb5527226aa2096307c08e15c62248b98f763",
"da65e1401d11a955686b8a49e46b9a457f3febab",
"a28f1558be9867d35cc1fa17477565c08786cf83",
"4db2ad30097924cbe5da9c0f2c49350fdc19c3a4",
"1cf86145b4a9492ebbe0fa640638504946315ca6",
"29a422c19251aeaeb907175e9b3219a9bed6c616",
"51968a7a4e67fd2696ffd5ccc041560a4d804f5d"]):
print(r)- When
on_badis "error", python-woc raises an KeyError when querying bad keys.
>>> from woc.local import WocMapsLocal
>>> woc = WocMapsLocal(on_bad='error')
>>> woc.get_values("c2p","0a36c08880da83a84209efe5aa90ca3f9b1dc453")
KeyError: 'Key 0a36c08880da83a84209efe5aa90ca3f9b1dc453 is marked as bad: tons of fake blobs'Bad keys are stored in wocprofile.json, and you need to regenerate the profile to reflect this change.
{
"bads": {
"p": {
"bitzhoumy_helloworld": "damaged trees",
"thachmai_mobiliPlay": "single repo for torvalds alias"
},
"c": {
"3f631f976149d8702d0b1496df7b98f16a9357ed": "2013166 blobs",
"14bde94da008ac1c65e0c066ee269315e47c0987": "Completed Search Engine with Cosine Similarity and Champion Lists, storing the entire inverted index in terms, with each term having its own pickle file."
}
}
}- Fixes a bug where
RootProject.commitsqueries the wrong map.
Full Changelog (2025-11-05)