From c2941ba5d9eac082f59f8eec5dfea88d047a5b0f Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 21 Oct 2026 11:32:21 +0200 Subject: [PATCH 1/2] fix: remove prefix.cc spam and block it from coming back prefix.cc has no curation. Every tagged release since v0.1.1 has shipped 7 to 13 spam or broken prefix.cc rows. The spam removed by hand in Feb 2024 came back with later refreshes. main has 15 such rows in prefixcc and in each merged context: - onlyfans profiles (fugas, leaks, przecieki, veelana) - a cutt.ly short link (onlyfans) - adult sites (faptica; check and dick on pornhub.com) - commercial spam (rankrage and seokoeln on an SEO agency site; fs and qualityze on software product pages, qualityze also reported on prefix.cc) - junk teste.com entries (type, ljkl) - a namespace that prefix.cc serves corrupted (bgcat) List them in prefixcc.excluded.yaml, by host (subdomains included) or by prefix, with a reason for each. Drop matching entries when ingesting prefix.cc, and remove the rows from the bundled data. No other row shares a prefix or namespace with them, so no other row's status changes. A namespace whose host cannot be parsed is not excluded, so a malformed upstream entry cannot break the ingest. The loader rejects unknown keys, so a misspelled section cannot silently disable exclusions. A new test fails if any bundled context contains an excluded host, or an excluded prefix that came from prefix.cc. Refs #61 Signed-off-by: jdsika --- src/prefixmaps/data/merged.csv | 15 ----- src/prefixmaps/data/merged.monarch.csv | 15 ----- src/prefixmaps/data/merged.oak.csv | 15 ----- src/prefixmaps/data/prefixcc.csv | 15 ----- src/prefixmaps/data/prefixcc.excluded.yaml | 22 +++++++ src/prefixmaps/ingest/ingest_jsonld.py | 64 ++++++++++++++++++- tests/test_core/test_prefixcc_exclusions.py | 36 +++++++++++ tests/test_etl/test_prefix_cc.py | 68 ++++++++++++++++++++- 8 files changed, 187 insertions(+), 63 deletions(-) create mode 100644 src/prefixmaps/data/prefixcc.excluded.yaml create mode 100644 tests/test_core/test_prefixcc_exclusions.py diff --git a/src/prefixmaps/data/merged.csv b/src/prefixmaps/data/merged.csv index da3a25d..6c3de9d 100644 --- a/src/prefixmaps/data/merged.csv +++ b/src/prefixmaps/data/merged.csv @@ -936,7 +936,6 @@ merged,BFO,http://www.ebi.ac.uk/ols/ontologies/bfo/terms?iri=http://purl.obolibr merged,BFO,https://bioregistry.io/BFO:,prefix_alias,bioregistry merged,BFO,https://purl.obolibrary.org/obo/BFO_,prefix_alias,bioregistry merged,BFO,https://www.ebi.ac.uk/ols/ontologies/bfo/terms?iri=http://purl.obolibrary.org/obo/BFO_,prefix_alias,bioregistry -merged,bgcat,http://bg.dbpedia.org/resource/?????????:,canonical,prefixcc merged,bgdbp,http://bg.dbpedia.org/property/,canonical,prefixcc merged,bgdbr,http://bg.dbpedia.org/resource/,canonical,prefixcc merged,BGEE.FAMILY,http://identifiers.org/bgee.family/,canonical,bioregistry @@ -1972,7 +1971,6 @@ merged,CHEBI,https://www.ebi.ac.uk/chebi/searchId.do?chebiId=,prefix_alias,biore merged,CHEBI,https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:,prefix_alias,bioregistry merged,CHEBI,https://www.ebi.ac.uk/ols/ontologies/chebi/terms?iri=http://purl.obolibrary.org/obo/CHEBI_,prefix_alias,bioregistry merged,CHEBIID,http://purl.obolibrary.org/obo/CHEBI_,namespace_alias,bioregistry -merged,check,http://pornhub.com/,canonical,prefixcc merged,checks,https://data.digichecks.eu/def/,canonical,prefixcc merged,CHEMBL,http://identifiers.org/chembl/,canonical,bioregistry merged,CHEMBL,http://bio2rdf.org/chembl:,prefix_alias,bioregistry @@ -3547,7 +3545,6 @@ merged,DHBA,https://bioregistry.io/DHBA:,prefix_alias,bioregistry merged,DI,https://www.uniprot.org/diseases/,namespace_alias,bioregistry merged,diag,http://www.loc.gov/zing/srw/diagnostic/,canonical,prefixcc merged,dicera,http://semweb.mmlab.be/ns/dicera#,canonical,prefixcc -merged,dick,http://pornhub.com/,namespace_alias,prefixcc merged,DICOM,http://dicom.nema.org/resources/ontology/DCM/,canonical,bioregistry merged,DICOM,http://bioregistry.io/dicom:,prefix_alias,bioregistry merged,DICOM,https://bioregistry.io/dicom:,prefix_alias,bioregistry @@ -4946,7 +4943,6 @@ merged,FAO.ASFIS,http://www.fao.org/fishery/en/species/,prefix_alias,bioregistry merged,FAO.ASFIS,https://bioregistry.io/asfis:,prefix_alias,bioregistry merged,FAO.ASFIS,https://bioregistry.io/fao.asfis:,prefix_alias,bioregistry merged,faostat,http://reference.eionet.europa.eu/faostat/schema/,canonical,prefixcc -merged,faptica,https://faptica.com/,canonical,prefixcc merged,faq,http://www.openlinksw.com/ontology/faq#,canonical,prefixcc merged,FB,http://identifiers.org/flybase/,canonical,go merged,FBbi,http://purl.obolibrary.org/obo/FBbi_,canonical,obo @@ -5261,7 +5257,6 @@ merged,friends,http://www.openarchives.org/OAI/2.0/friends/,canonical,prefixcc merged,frir,http://purl.org/twc/ontology/frir.owl#,canonical,prefixcc merged,fro,https://foundry.ai.mil/ontology/nas/fro/,canonical,prefixcc merged,frsad,http://iflastandards.info/ns/fr/frsad/,canonical,prefixcc -merged,fs,https://www.compliancequest.com/training-management-software-system-solutions/,canonical,prefixcc merged,FSNP,http://identifiers.org/fsnp/,canonical,bioregistry merged,FSNP,http://bio2rdf.org/fsnp:,prefix_alias,bioregistry merged,FSNP,http://bioregistry.io/fsnp:,prefix_alias,bioregistry @@ -5279,7 +5274,6 @@ merged,fssp,http://linkeddata.fssprus.ru/resource/,canonical,prefixcc merged,ftcontent,http://www.ft.com/ontology/content/,canonical,prefixcc merged,fti,http://franz.com/ns/allegrograph/2.2/textindex/,canonical,prefixcc merged,ftr,https://w3id.org/ftr#,canonical,prefixcc -merged,fugas,https://onlyfans.com/sammuwuu/,canonical,prefixcc merged,fun,http://w3id.org/sparql-generate/fn/,canonical,prefixcc merged,func,http://www.w3.org/2007/rif-builtin-function#,canonical,prefixcc merged,FUNCBASE.FLY,http://identifiers.org/funcbase.fly/,canonical,bioregistry @@ -8049,7 +8043,6 @@ merged,lds,https://solid.ti.rw.fau.de/public/ns/linked-data-structures#,canonica merged,ldt,https://www.w3.org/ns/ldt#,canonical,prefixcc merged,ldvm,http://linked.opendata.cz/ontology/ldvm/,canonical,prefixcc merged,leak,http://maco.com/,canonical,prefixcc -merged,leaks,https://onlyfans.com/chelxie/,canonical,prefixcc merged,led,http://led.kmi.open.ac.uk/term/,canonical,prefixcc merged,legal,http://www.w3.org/ns/legal#,canonical,prefixcc merged,LEI,http://identifiers.org/lei/,canonical,bioregistry @@ -8285,7 +8278,6 @@ merged,lis,http://rds.posccaesar.org/ontology/lis14/rdl/,canonical,prefixcc merged,list,http://www.w3.org/2000/10/swap/list#,canonical,prefixcc merged,literal,http://www.essepuntato.it/2010/06/literalreification/,canonical,prefixcc merged,literature,http://purl.org/net/cnyt-literature#,canonical,prefixcc -merged,ljkl,http://teste.com/,canonical,prefixcc merged,ll,http://lodlaundromat.org/resource/,canonical,prefixcc merged,llalg,http://www.linklion.org/algorithm/,canonical,prefixcc merged,lldr,http://purl.oclc.org/NET/lldr/ns#,canonical,prefixcc @@ -11152,7 +11144,6 @@ merged,ONE,https://purl.obolibrary.org/obo/ONE_,prefix_alias,bioregistry merged,ONE,https://www.ebi.ac.uk/ols/ontologies/one/terms?iri=http://purl.obolibrary.org/obo/ONE_,prefix_alias,bioregistry merged,one,https://bioportal.bioontology.org/ontologies/ONE/,prefix_alias,prefixcc merged,onisep,http://rdf.onisep.fr/resource/,canonical,prefixcc -merged,onlyfans,https://cutt.ly/3ry8LMcK/,canonical,prefixcc merged,ONS,http://purl.obolibrary.org/obo/ONS_,canonical,obo merged,ONS,http://bioregistry.io/ONS:,prefix_alias,bioregistry merged,ONS,http://www.ebi.ac.uk/ols/ontologies/ons/terms?iri=http://purl.obolibrary.org/obo/ONS_,prefix_alias,bioregistry @@ -12774,7 +12765,6 @@ merged,prviv,http://purl.org/net/provenance/integrity#,canonical,prefixcc merged,prvr,http://purl.org/ontology/prv/rules#,canonical,prefixcc merged,prvt,http://purl.org/net/provenance/types#,namespace_alias,prefixcc merged,prvtypes,http://purl.org/net/provenance/types#,canonical,prefixcc -merged,przecieki,http://onlyfans.com/emiliaszymanska/,canonical,prefixcc merged,ps,https://w3id.org/payswarm#,canonical,prefixcc merged,PSCDB,http://identifiers.org/pscdb/,canonical,bioregistry merged,PSCDB,http://bioregistry.io/pscdb:,prefix_alias,bioregistry @@ -13091,7 +13081,6 @@ merged,QTLDB,https://www.animalgenome.org/cgi-bin/QTLdb/OA/qdetails?QTL_ID=,pref merged,QTLDB,https://www.animalgenome.org/cgi-bin/QTLdb/SS/qdetails?QTL_ID=,prefix_alias,bioregistry merged,qu,http://purl.oclc.org/NET/ssnx/qu/qu#,canonical,prefixcc merged,quak,http://dev.w3.org/cvsweb/2000/quacken/vocab#,canonical,prefixcc -merged,qualityze,https://www.qualityze.com/document-management/,canonical,prefixcc merged,quantities,http://eulersharp.sourceforge.net/2003/03swap/quantitiesExtension#,canonical,prefixcc merged,quantity,http://qudt.org/schema/quantity#,canonical,prefixcc merged,qud,http://qudt.org/1.1/schema/qudt#,namespace_alias,prefixcc @@ -13130,7 +13119,6 @@ merged,railml3,http://ontology.railml.org/railml3#,canonical,prefixcc merged,rami,http://iais.fraunhofer.de/vocabs/rami#,canonical,prefixcc merged,ramon,http://rdfdata.eionet.europa.eu/ramon/ontology/,canonical,prefixcc merged,rank,http://www.ontotext.com/owlim/RDFRank#,canonical,prefixcc -merged,rankrage,https://rankrage.de/,canonical,prefixcc merged,RAPDB.LOCUS,http://identifiers.org/rapdb.locus/,canonical,bioregistry merged,RAPDB.LOCUS,http://bioregistry.io/irgsp:,prefix_alias,bioregistry merged,RAPDB.LOCUS,http://bioregistry.io/rapdb.locus:,prefix_alias,bioregistry @@ -14128,7 +14116,6 @@ merged,SEO,http://bioregistry.io/seo:,prefix_alias,bioregistry merged,SEO,http://w3id.org/seo#,prefix_alias,bioregistry merged,SEO,https://bioregistry.io/seo:,prefix_alias,bioregistry merged,seo,http://sda.tech/SEOontology/SEO/,prefix_alias,prefixcc -merged,seokoeln,http://rankrage.de/,canonical,prefixcc merged,SEP,http://purl.obolibrary.org/obo/SEP_,canonical,obo merged,SEP,http://bio2rdf.org/sep:,prefix_alias,bioregistry merged,SEP,http://bioregistry.io/SEP:,prefix_alias,bioregistry @@ -15619,7 +15606,6 @@ merged,TXPO,http://www.ebi.ac.uk/ols/ontologies/txpo/terms?iri=http://purl.oboli merged,TXPO,https://bioregistry.io/TXPO:,prefix_alias,bioregistry merged,TXPO,https://purl.obolibrary.org/obo/TXPO_,prefix_alias,bioregistry merged,TXPO,https://www.ebi.ac.uk/ols/ontologies/txpo/terms?iri=http://purl.obolibrary.org/obo/TXPO_,prefix_alias,bioregistry -merged,type,http://teste.com/teste/,canonical,prefixcc merged,tzont,http://www.w3.org/2006/timezone#,canonical,prefixcc merged,ub,http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#,canonical,prefixcc merged,ubbont,http://data.ub.uib.no/ontology/,canonical,prefixcc @@ -16374,7 +16360,6 @@ merged,VECTORBASE,https://n2t.net/vectorbase:,prefix_alias,bioregistry merged,VECTORBASE,https://vectorbase.org/gene/,prefix_alias,bioregistry merged,VECTORBASE,https://vectorbase.org/vectorbase/app/record/gene/,prefix_alias,bioregistry merged,VECTORBASE,https://www.vectorbase.org/[?species_name]/Gene/Summary?db=core;g=,prefix_alias,bioregistry -merged,veelana,http://onlyfans.com/veelana/,canonical,prefixcc merged,VEGBANK,http://identifiers.org/vegbank/,canonical,bioregistry merged,VEGBANK,http://bioregistry.io/vegbank:,prefix_alias,bioregistry merged,VEGBANK,http://identifiers.org/vegbank:,prefix_alias,bioregistry diff --git a/src/prefixmaps/data/merged.monarch.csv b/src/prefixmaps/data/merged.monarch.csv index f26861f..b87346c 100644 --- a/src/prefixmaps/data/merged.monarch.csv +++ b/src/prefixmaps/data/merged.monarch.csv @@ -936,7 +936,6 @@ merged.monarch,BFO,http://www.ebi.ac.uk/ols/ontologies/bfo/terms?iri=http://purl merged.monarch,BFO,https://bioregistry.io/BFO:,prefix_alias,bioregistry merged.monarch,BFO,https://purl.obolibrary.org/obo/BFO_,prefix_alias,bioregistry merged.monarch,BFO,https://www.ebi.ac.uk/ols/ontologies/bfo/terms?iri=http://purl.obolibrary.org/obo/BFO_,prefix_alias,bioregistry -merged.monarch,bgcat,http://bg.dbpedia.org/resource/?????????:,canonical,prefixcc merged.monarch,bgdbp,http://bg.dbpedia.org/property/,canonical,prefixcc merged.monarch,bgdbr,http://bg.dbpedia.org/resource/,canonical,prefixcc merged.monarch,BGEE.FAMILY,http://identifiers.org/bgee.family/,canonical,bioregistry @@ -1972,7 +1971,6 @@ merged.monarch,CHEBI,https://www.ebi.ac.uk/chebi/searchId.do?chebiId=,prefix_ali merged.monarch,CHEBI,https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:,prefix_alias,bioregistry merged.monarch,CHEBI,https://www.ebi.ac.uk/ols/ontologies/chebi/terms?iri=http://purl.obolibrary.org/obo/CHEBI_,prefix_alias,bioregistry merged.monarch,CHEBIID,http://purl.obolibrary.org/obo/CHEBI_,namespace_alias,bioregistry -merged.monarch,check,http://pornhub.com/,canonical,prefixcc merged.monarch,checks,https://data.digichecks.eu/def/,canonical,prefixcc merged.monarch,CHEMBL,http://identifiers.org/chembl/,canonical,bioregistry merged.monarch,CHEMBL,http://bio2rdf.org/chembl:,prefix_alias,bioregistry @@ -3547,7 +3545,6 @@ merged.monarch,DHBA,https://bioregistry.io/DHBA:,prefix_alias,bioregistry merged.monarch,DI,https://www.uniprot.org/diseases/,namespace_alias,bioregistry merged.monarch,diag,http://www.loc.gov/zing/srw/diagnostic/,canonical,prefixcc merged.monarch,dicera,http://semweb.mmlab.be/ns/dicera#,canonical,prefixcc -merged.monarch,dick,http://pornhub.com/,namespace_alias,prefixcc merged.monarch,DICOM,http://dicom.nema.org/resources/ontology/DCM/,canonical,bioregistry merged.monarch,DICOM,http://bioregistry.io/dicom:,prefix_alias,bioregistry merged.monarch,DICOM,https://bioregistry.io/dicom:,prefix_alias,bioregistry @@ -4946,7 +4943,6 @@ merged.monarch,FAO.ASFIS,http://www.fao.org/fishery/en/species/,prefix_alias,bio merged.monarch,FAO.ASFIS,https://bioregistry.io/asfis:,prefix_alias,bioregistry merged.monarch,FAO.ASFIS,https://bioregistry.io/fao.asfis:,prefix_alias,bioregistry merged.monarch,faostat,http://reference.eionet.europa.eu/faostat/schema/,canonical,prefixcc -merged.monarch,faptica,https://faptica.com/,canonical,prefixcc merged.monarch,faq,http://www.openlinksw.com/ontology/faq#,canonical,prefixcc merged.monarch,FB,http://identifiers.org/flybase/,canonical,go merged.monarch,FBbi,http://purl.obolibrary.org/obo/FBbi_,canonical,obo @@ -5261,7 +5257,6 @@ merged.monarch,friends,http://www.openarchives.org/OAI/2.0/friends/,canonical,pr merged.monarch,frir,http://purl.org/twc/ontology/frir.owl#,canonical,prefixcc merged.monarch,fro,https://foundry.ai.mil/ontology/nas/fro/,canonical,prefixcc merged.monarch,frsad,http://iflastandards.info/ns/fr/frsad/,canonical,prefixcc -merged.monarch,fs,https://www.compliancequest.com/training-management-software-system-solutions/,canonical,prefixcc merged.monarch,FSNP,http://identifiers.org/fsnp/,canonical,bioregistry merged.monarch,FSNP,http://bio2rdf.org/fsnp:,prefix_alias,bioregistry merged.monarch,FSNP,http://bioregistry.io/fsnp:,prefix_alias,bioregistry @@ -5279,7 +5274,6 @@ merged.monarch,fssp,http://linkeddata.fssprus.ru/resource/,canonical,prefixcc merged.monarch,ftcontent,http://www.ft.com/ontology/content/,canonical,prefixcc merged.monarch,fti,http://franz.com/ns/allegrograph/2.2/textindex/,canonical,prefixcc merged.monarch,ftr,https://w3id.org/ftr#,canonical,prefixcc -merged.monarch,fugas,https://onlyfans.com/sammuwuu/,canonical,prefixcc merged.monarch,fun,http://w3id.org/sparql-generate/fn/,canonical,prefixcc merged.monarch,func,http://www.w3.org/2007/rif-builtin-function#,canonical,prefixcc merged.monarch,FUNCBASE.FLY,http://identifiers.org/funcbase.fly/,canonical,bioregistry @@ -8049,7 +8043,6 @@ merged.monarch,lds,https://solid.ti.rw.fau.de/public/ns/linked-data-structures#, merged.monarch,ldt,https://www.w3.org/ns/ldt#,canonical,prefixcc merged.monarch,ldvm,http://linked.opendata.cz/ontology/ldvm/,canonical,prefixcc merged.monarch,leak,http://maco.com/,canonical,prefixcc -merged.monarch,leaks,https://onlyfans.com/chelxie/,canonical,prefixcc merged.monarch,led,http://led.kmi.open.ac.uk/term/,canonical,prefixcc merged.monarch,legal,http://www.w3.org/ns/legal#,canonical,prefixcc merged.monarch,LEI,http://identifiers.org/lei/,canonical,bioregistry @@ -8285,7 +8278,6 @@ merged.monarch,lis,http://rds.posccaesar.org/ontology/lis14/rdl/,canonical,prefi merged.monarch,list,http://www.w3.org/2000/10/swap/list#,canonical,prefixcc merged.monarch,literal,http://www.essepuntato.it/2010/06/literalreification/,canonical,prefixcc merged.monarch,literature,http://purl.org/net/cnyt-literature#,canonical,prefixcc -merged.monarch,ljkl,http://teste.com/,canonical,prefixcc merged.monarch,ll,http://lodlaundromat.org/resource/,canonical,prefixcc merged.monarch,llalg,http://www.linklion.org/algorithm/,canonical,prefixcc merged.monarch,lldr,http://purl.oclc.org/NET/lldr/ns#,canonical,prefixcc @@ -11152,7 +11144,6 @@ merged.monarch,ONE,https://purl.obolibrary.org/obo/ONE_,prefix_alias,bioregistry merged.monarch,ONE,https://www.ebi.ac.uk/ols/ontologies/one/terms?iri=http://purl.obolibrary.org/obo/ONE_,prefix_alias,bioregistry merged.monarch,one,https://bioportal.bioontology.org/ontologies/ONE/,prefix_alias,prefixcc merged.monarch,onisep,http://rdf.onisep.fr/resource/,canonical,prefixcc -merged.monarch,onlyfans,https://cutt.ly/3ry8LMcK/,canonical,prefixcc merged.monarch,ONS,http://purl.obolibrary.org/obo/ONS_,canonical,obo merged.monarch,ONS,http://bioregistry.io/ONS:,prefix_alias,bioregistry merged.monarch,ONS,http://www.ebi.ac.uk/ols/ontologies/ons/terms?iri=http://purl.obolibrary.org/obo/ONS_,prefix_alias,bioregistry @@ -12774,7 +12765,6 @@ merged.monarch,prviv,http://purl.org/net/provenance/integrity#,canonical,prefixc merged.monarch,prvr,http://purl.org/ontology/prv/rules#,canonical,prefixcc merged.monarch,prvt,http://purl.org/net/provenance/types#,namespace_alias,prefixcc merged.monarch,prvtypes,http://purl.org/net/provenance/types#,canonical,prefixcc -merged.monarch,przecieki,http://onlyfans.com/emiliaszymanska/,canonical,prefixcc merged.monarch,ps,https://w3id.org/payswarm#,canonical,prefixcc merged.monarch,PSCDB,http://identifiers.org/pscdb/,canonical,bioregistry merged.monarch,PSCDB,http://bioregistry.io/pscdb:,prefix_alias,bioregistry @@ -13091,7 +13081,6 @@ merged.monarch,QTLDB,https://www.animalgenome.org/cgi-bin/QTLdb/OA/qdetails?QTL_ merged.monarch,QTLDB,https://www.animalgenome.org/cgi-bin/QTLdb/SS/qdetails?QTL_ID=,prefix_alias,bioregistry merged.monarch,qu,http://purl.oclc.org/NET/ssnx/qu/qu#,canonical,prefixcc merged.monarch,quak,http://dev.w3.org/cvsweb/2000/quacken/vocab#,canonical,prefixcc -merged.monarch,qualityze,https://www.qualityze.com/document-management/,canonical,prefixcc merged.monarch,quantities,http://eulersharp.sourceforge.net/2003/03swap/quantitiesExtension#,canonical,prefixcc merged.monarch,quantity,http://qudt.org/schema/quantity#,canonical,prefixcc merged.monarch,qud,http://qudt.org/1.1/schema/qudt#,namespace_alias,prefixcc @@ -13130,7 +13119,6 @@ merged.monarch,railml3,http://ontology.railml.org/railml3#,canonical,prefixcc merged.monarch,rami,http://iais.fraunhofer.de/vocabs/rami#,canonical,prefixcc merged.monarch,ramon,http://rdfdata.eionet.europa.eu/ramon/ontology/,canonical,prefixcc merged.monarch,rank,http://www.ontotext.com/owlim/RDFRank#,canonical,prefixcc -merged.monarch,rankrage,https://rankrage.de/,canonical,prefixcc merged.monarch,RAPDB.LOCUS,http://identifiers.org/rapdb.locus/,canonical,bioregistry merged.monarch,RAPDB.LOCUS,http://bioregistry.io/irgsp:,prefix_alias,bioregistry merged.monarch,RAPDB.LOCUS,http://bioregistry.io/rapdb.locus:,prefix_alias,bioregistry @@ -14128,7 +14116,6 @@ merged.monarch,SEO,http://bioregistry.io/seo:,prefix_alias,bioregistry merged.monarch,SEO,http://w3id.org/seo#,prefix_alias,bioregistry merged.monarch,SEO,https://bioregistry.io/seo:,prefix_alias,bioregistry merged.monarch,seo,http://sda.tech/SEOontology/SEO/,prefix_alias,prefixcc -merged.monarch,seokoeln,http://rankrage.de/,canonical,prefixcc merged.monarch,SEP,http://purl.obolibrary.org/obo/SEP_,canonical,obo merged.monarch,SEP,http://bio2rdf.org/sep:,prefix_alias,bioregistry merged.monarch,SEP,http://bioregistry.io/SEP:,prefix_alias,bioregistry @@ -15619,7 +15606,6 @@ merged.monarch,TXPO,http://www.ebi.ac.uk/ols/ontologies/txpo/terms?iri=http://pu merged.monarch,TXPO,https://bioregistry.io/TXPO:,prefix_alias,bioregistry merged.monarch,TXPO,https://purl.obolibrary.org/obo/TXPO_,prefix_alias,bioregistry merged.monarch,TXPO,https://www.ebi.ac.uk/ols/ontologies/txpo/terms?iri=http://purl.obolibrary.org/obo/TXPO_,prefix_alias,bioregistry -merged.monarch,type,http://teste.com/teste/,canonical,prefixcc merged.monarch,tzont,http://www.w3.org/2006/timezone#,canonical,prefixcc merged.monarch,ub,http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#,canonical,prefixcc merged.monarch,ubbont,http://data.ub.uib.no/ontology/,canonical,prefixcc @@ -16374,7 +16360,6 @@ merged.monarch,VECTORBASE,https://n2t.net/vectorbase:,prefix_alias,bioregistry merged.monarch,VECTORBASE,https://vectorbase.org/gene/,prefix_alias,bioregistry merged.monarch,VECTORBASE,https://vectorbase.org/vectorbase/app/record/gene/,prefix_alias,bioregistry merged.monarch,VECTORBASE,https://www.vectorbase.org/[?species_name]/Gene/Summary?db=core;g=,prefix_alias,bioregistry -merged.monarch,veelana,http://onlyfans.com/veelana/,canonical,prefixcc merged.monarch,VEGBANK,http://identifiers.org/vegbank/,canonical,bioregistry merged.monarch,VEGBANK,http://bioregistry.io/vegbank:,prefix_alias,bioregistry merged.monarch,VEGBANK,http://identifiers.org/vegbank:,prefix_alias,bioregistry diff --git a/src/prefixmaps/data/merged.oak.csv b/src/prefixmaps/data/merged.oak.csv index 74037ed..6a45ae8 100644 --- a/src/prefixmaps/data/merged.oak.csv +++ b/src/prefixmaps/data/merged.oak.csv @@ -936,7 +936,6 @@ merged.oak,BFO,http://www.ebi.ac.uk/ols/ontologies/bfo/terms?iri=http://purl.obo merged.oak,BFO,https://bioregistry.io/BFO:,prefix_alias,bioregistry merged.oak,BFO,https://purl.obolibrary.org/obo/BFO_,prefix_alias,bioregistry merged.oak,BFO,https://www.ebi.ac.uk/ols/ontologies/bfo/terms?iri=http://purl.obolibrary.org/obo/BFO_,prefix_alias,bioregistry -merged.oak,bgcat,http://bg.dbpedia.org/resource/?????????:,canonical,prefixcc merged.oak,bgdbp,http://bg.dbpedia.org/property/,canonical,prefixcc merged.oak,bgdbr,http://bg.dbpedia.org/resource/,canonical,prefixcc merged.oak,BGEE.FAMILY,http://identifiers.org/bgee.family/,canonical,bioregistry @@ -1972,7 +1971,6 @@ merged.oak,CHEBI,https://www.ebi.ac.uk/chebi/searchId.do?chebiId=,prefix_alias,b merged.oak,CHEBI,https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:,prefix_alias,bioregistry merged.oak,CHEBI,https://www.ebi.ac.uk/ols/ontologies/chebi/terms?iri=http://purl.obolibrary.org/obo/CHEBI_,prefix_alias,bioregistry merged.oak,CHEBIID,http://purl.obolibrary.org/obo/CHEBI_,namespace_alias,bioregistry -merged.oak,check,http://pornhub.com/,canonical,prefixcc merged.oak,checks,https://data.digichecks.eu/def/,canonical,prefixcc merged.oak,CHEMBL,http://identifiers.org/chembl/,canonical,bioregistry merged.oak,CHEMBL,http://bio2rdf.org/chembl:,prefix_alias,bioregistry @@ -3547,7 +3545,6 @@ merged.oak,DHBA,https://bioregistry.io/DHBA:,prefix_alias,bioregistry merged.oak,DI,https://www.uniprot.org/diseases/,namespace_alias,bioregistry merged.oak,diag,http://www.loc.gov/zing/srw/diagnostic/,canonical,prefixcc merged.oak,dicera,http://semweb.mmlab.be/ns/dicera#,canonical,prefixcc -merged.oak,dick,http://pornhub.com/,namespace_alias,prefixcc merged.oak,DICOM,http://dicom.nema.org/resources/ontology/DCM/,canonical,bioregistry merged.oak,DICOM,http://bioregistry.io/dicom:,prefix_alias,bioregistry merged.oak,DICOM,https://bioregistry.io/dicom:,prefix_alias,bioregistry @@ -4946,7 +4943,6 @@ merged.oak,FAO.ASFIS,http://www.fao.org/fishery/en/species/,prefix_alias,bioregi merged.oak,FAO.ASFIS,https://bioregistry.io/asfis:,prefix_alias,bioregistry merged.oak,FAO.ASFIS,https://bioregistry.io/fao.asfis:,prefix_alias,bioregistry merged.oak,faostat,http://reference.eionet.europa.eu/faostat/schema/,canonical,prefixcc -merged.oak,faptica,https://faptica.com/,canonical,prefixcc merged.oak,faq,http://www.openlinksw.com/ontology/faq#,canonical,prefixcc merged.oak,FB,http://identifiers.org/flybase/,canonical,go merged.oak,FBbi,http://purl.obolibrary.org/obo/FBbi_,canonical,obo @@ -5261,7 +5257,6 @@ merged.oak,friends,http://www.openarchives.org/OAI/2.0/friends/,canonical,prefix merged.oak,frir,http://purl.org/twc/ontology/frir.owl#,canonical,prefixcc merged.oak,fro,https://foundry.ai.mil/ontology/nas/fro/,canonical,prefixcc merged.oak,frsad,http://iflastandards.info/ns/fr/frsad/,canonical,prefixcc -merged.oak,fs,https://www.compliancequest.com/training-management-software-system-solutions/,canonical,prefixcc merged.oak,FSNP,http://identifiers.org/fsnp/,canonical,bioregistry merged.oak,FSNP,http://bio2rdf.org/fsnp:,prefix_alias,bioregistry merged.oak,FSNP,http://bioregistry.io/fsnp:,prefix_alias,bioregistry @@ -5279,7 +5274,6 @@ merged.oak,fssp,http://linkeddata.fssprus.ru/resource/,canonical,prefixcc merged.oak,ftcontent,http://www.ft.com/ontology/content/,canonical,prefixcc merged.oak,fti,http://franz.com/ns/allegrograph/2.2/textindex/,canonical,prefixcc merged.oak,ftr,https://w3id.org/ftr#,canonical,prefixcc -merged.oak,fugas,https://onlyfans.com/sammuwuu/,canonical,prefixcc merged.oak,fun,http://w3id.org/sparql-generate/fn/,canonical,prefixcc merged.oak,func,http://www.w3.org/2007/rif-builtin-function#,canonical,prefixcc merged.oak,FUNCBASE.FLY,http://identifiers.org/funcbase.fly/,canonical,bioregistry @@ -8049,7 +8043,6 @@ merged.oak,lds,https://solid.ti.rw.fau.de/public/ns/linked-data-structures#,cano merged.oak,ldt,https://www.w3.org/ns/ldt#,canonical,prefixcc merged.oak,ldvm,http://linked.opendata.cz/ontology/ldvm/,canonical,prefixcc merged.oak,leak,http://maco.com/,canonical,prefixcc -merged.oak,leaks,https://onlyfans.com/chelxie/,canonical,prefixcc merged.oak,led,http://led.kmi.open.ac.uk/term/,canonical,prefixcc merged.oak,legal,http://www.w3.org/ns/legal#,canonical,prefixcc merged.oak,LEI,http://identifiers.org/lei/,canonical,bioregistry @@ -8285,7 +8278,6 @@ merged.oak,lis,http://rds.posccaesar.org/ontology/lis14/rdl/,canonical,prefixcc merged.oak,list,http://www.w3.org/2000/10/swap/list#,canonical,prefixcc merged.oak,literal,http://www.essepuntato.it/2010/06/literalreification/,canonical,prefixcc merged.oak,literature,http://purl.org/net/cnyt-literature#,canonical,prefixcc -merged.oak,ljkl,http://teste.com/,canonical,prefixcc merged.oak,ll,http://lodlaundromat.org/resource/,canonical,prefixcc merged.oak,llalg,http://www.linklion.org/algorithm/,canonical,prefixcc merged.oak,lldr,http://purl.oclc.org/NET/lldr/ns#,canonical,prefixcc @@ -11152,7 +11144,6 @@ merged.oak,ONE,https://purl.obolibrary.org/obo/ONE_,prefix_alias,bioregistry merged.oak,ONE,https://www.ebi.ac.uk/ols/ontologies/one/terms?iri=http://purl.obolibrary.org/obo/ONE_,prefix_alias,bioregistry merged.oak,one,https://bioportal.bioontology.org/ontologies/ONE/,prefix_alias,prefixcc merged.oak,onisep,http://rdf.onisep.fr/resource/,canonical,prefixcc -merged.oak,onlyfans,https://cutt.ly/3ry8LMcK/,canonical,prefixcc merged.oak,ONS,http://purl.obolibrary.org/obo/ONS_,canonical,obo merged.oak,ONS,http://bioregistry.io/ONS:,prefix_alias,bioregistry merged.oak,ONS,http://www.ebi.ac.uk/ols/ontologies/ons/terms?iri=http://purl.obolibrary.org/obo/ONS_,prefix_alias,bioregistry @@ -12774,7 +12765,6 @@ merged.oak,prviv,http://purl.org/net/provenance/integrity#,canonical,prefixcc merged.oak,prvr,http://purl.org/ontology/prv/rules#,canonical,prefixcc merged.oak,prvt,http://purl.org/net/provenance/types#,namespace_alias,prefixcc merged.oak,prvtypes,http://purl.org/net/provenance/types#,canonical,prefixcc -merged.oak,przecieki,http://onlyfans.com/emiliaszymanska/,canonical,prefixcc merged.oak,ps,https://w3id.org/payswarm#,canonical,prefixcc merged.oak,PSCDB,http://identifiers.org/pscdb/,canonical,bioregistry merged.oak,PSCDB,http://bioregistry.io/pscdb:,prefix_alias,bioregistry @@ -13091,7 +13081,6 @@ merged.oak,QTLDB,https://www.animalgenome.org/cgi-bin/QTLdb/OA/qdetails?QTL_ID=, merged.oak,QTLDB,https://www.animalgenome.org/cgi-bin/QTLdb/SS/qdetails?QTL_ID=,prefix_alias,bioregistry merged.oak,qu,http://purl.oclc.org/NET/ssnx/qu/qu#,canonical,prefixcc merged.oak,quak,http://dev.w3.org/cvsweb/2000/quacken/vocab#,canonical,prefixcc -merged.oak,qualityze,https://www.qualityze.com/document-management/,canonical,prefixcc merged.oak,quantities,http://eulersharp.sourceforge.net/2003/03swap/quantitiesExtension#,canonical,prefixcc merged.oak,quantity,http://qudt.org/schema/quantity#,canonical,prefixcc merged.oak,qud,http://qudt.org/1.1/schema/qudt#,namespace_alias,prefixcc @@ -13130,7 +13119,6 @@ merged.oak,railml3,http://ontology.railml.org/railml3#,canonical,prefixcc merged.oak,rami,http://iais.fraunhofer.de/vocabs/rami#,canonical,prefixcc merged.oak,ramon,http://rdfdata.eionet.europa.eu/ramon/ontology/,canonical,prefixcc merged.oak,rank,http://www.ontotext.com/owlim/RDFRank#,canonical,prefixcc -merged.oak,rankrage,https://rankrage.de/,canonical,prefixcc merged.oak,RAPDB.LOCUS,http://identifiers.org/rapdb.locus/,canonical,bioregistry merged.oak,RAPDB.LOCUS,http://bioregistry.io/irgsp:,prefix_alias,bioregistry merged.oak,RAPDB.LOCUS,http://bioregistry.io/rapdb.locus:,prefix_alias,bioregistry @@ -14128,7 +14116,6 @@ merged.oak,SEO,http://bioregistry.io/seo:,prefix_alias,bioregistry merged.oak,SEO,http://w3id.org/seo#,prefix_alias,bioregistry merged.oak,SEO,https://bioregistry.io/seo:,prefix_alias,bioregistry merged.oak,seo,http://sda.tech/SEOontology/SEO/,prefix_alias,prefixcc -merged.oak,seokoeln,http://rankrage.de/,canonical,prefixcc merged.oak,SEP,http://purl.obolibrary.org/obo/SEP_,canonical,obo merged.oak,SEP,http://bio2rdf.org/sep:,prefix_alias,bioregistry merged.oak,SEP,http://bioregistry.io/SEP:,prefix_alias,bioregistry @@ -15619,7 +15606,6 @@ merged.oak,TXPO,http://www.ebi.ac.uk/ols/ontologies/txpo/terms?iri=http://purl.o merged.oak,TXPO,https://bioregistry.io/TXPO:,prefix_alias,bioregistry merged.oak,TXPO,https://purl.obolibrary.org/obo/TXPO_,prefix_alias,bioregistry merged.oak,TXPO,https://www.ebi.ac.uk/ols/ontologies/txpo/terms?iri=http://purl.obolibrary.org/obo/TXPO_,prefix_alias,bioregistry -merged.oak,type,http://teste.com/teste/,canonical,prefixcc merged.oak,tzont,http://www.w3.org/2006/timezone#,canonical,prefixcc merged.oak,ub,http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#,canonical,prefixcc merged.oak,ubbont,http://data.ub.uib.no/ontology/,canonical,prefixcc @@ -16374,7 +16360,6 @@ merged.oak,VECTORBASE,https://n2t.net/vectorbase:,prefix_alias,bioregistry merged.oak,VECTORBASE,https://vectorbase.org/gene/,prefix_alias,bioregistry merged.oak,VECTORBASE,https://vectorbase.org/vectorbase/app/record/gene/,prefix_alias,bioregistry merged.oak,VECTORBASE,https://www.vectorbase.org/[?species_name]/Gene/Summary?db=core;g=,prefix_alias,bioregistry -merged.oak,veelana,http://onlyfans.com/veelana/,canonical,prefixcc merged.oak,VEGBANK,http://identifiers.org/vegbank/,canonical,bioregistry merged.oak,VEGBANK,http://bioregistry.io/vegbank:,prefix_alias,bioregistry merged.oak,VEGBANK,http://identifiers.org/vegbank:,prefix_alias,bioregistry diff --git a/src/prefixmaps/data/prefixcc.csv b/src/prefixmaps/data/prefixcc.csv index b7bb501..a1ce605 100644 --- a/src/prefixmaps/data/prefixcc.csv +++ b/src/prefixmaps/data/prefixcc.csv @@ -207,7 +207,6 @@ prefixcc,bevon,http://rdfs.co/bevon/,canonical prefixcc,bf,http://id.loc.gov/ontologies/bibframe/,canonical prefixcc,bflc,http://id.loc.gov/ontologies/bflc/,canonical prefixcc,bfo,http://purl.obolibrary.org/obo/,namespace_alias -prefixcc,bgcat,http://bg.dbpedia.org/resource/?????????:,canonical prefixcc,bgdbp,http://bg.dbpedia.org/property/,canonical prefixcc,bgdbr,http://bg.dbpedia.org/resource/,canonical prefixcc,bgn,http://bibliograph.net/schemas/,canonical @@ -364,7 +363,6 @@ prefixcc,ch,https://schema.ld.admin.ch/,canonical prefixcc,chameo,https://w3id.org/emmo/domain/characterisation-methodology/chameo#,canonical prefixcc,changeset,http://purl.org/vocab/changeset/schema#,namespace_alias prefixcc,chear,http://hadatac.org/ont/chear#,canonical -prefixcc,check,http://pornhub.com/,canonical prefixcc,checks,https://data.digichecks.eu/def/,canonical prefixcc,chembl,http://rdf.ebi.ac.uk/terms/chembl#,canonical prefixcc,cheminf,http://www.semanticweb.org/ontologies/cheminf.owl#,canonical @@ -667,7 +665,6 @@ prefixcc,dgfr,http://colin.maudry.com/ontologies/dgfr#,canonical prefixcc,dgtwc,http://data-gov.tw.rpi.edu/2009/data-gov-twc.rdf#,canonical prefixcc,diag,http://www.loc.gov/zing/srw/diagnostic/,canonical prefixcc,dicera,http://semweb.mmlab.be/ns/dicera#,canonical -prefixcc,dick,http://pornhub.com/,namespace_alias prefixcc,dicom,http://purl.org/healthcarevocab/v1#,canonical prefixcc,dictionary,https://standards.buildingsmart.org/DataDictionary/,canonical prefixcc,did,https://w3id.org/dob/id/,canonical @@ -945,7 +942,6 @@ prefixcc,faldo,http://biohackathon.org/resource/faldo#,canonical prefixcc,fam,http://vocab.fusepool.info/fam#,canonical prefixcc,fao,http://fao.270a.info/dataset/,canonical prefixcc,faostat,http://reference.eionet.europa.eu/faostat/schema/,canonical -prefixcc,faptica,https://faptica.com/,canonical prefixcc,faq,http://www.openlinksw.com/ontology/faq#,canonical prefixcc,fbbi,http://purl.obolibrary.org/obo/FBbi_,canonical prefixcc,fbbt,http://purl.obolibrary.org/obo/FBbt_,canonical @@ -1037,13 +1033,11 @@ prefixcc,friends,http://www.openarchives.org/OAI/2.0/friends/,canonical prefixcc,frir,http://purl.org/twc/ontology/frir.owl#,canonical prefixcc,fro,https://foundry.ai.mil/ontology/nas/fro/,canonical prefixcc,frsad,http://iflastandards.info/ns/fr/frsad/,canonical -prefixcc,fs,https://www.compliancequest.com/training-management-software-system-solutions/,canonical prefixcc,fso,https://w3id.org/fso#,canonical prefixcc,fssp,http://linkeddata.fssprus.ru/resource/,canonical prefixcc,ftcontent,http://www.ft.com/ontology/content/,canonical prefixcc,fti,http://franz.com/ns/allegrograph/2.2/textindex/,canonical prefixcc,ftr,https://w3id.org/ftr#,canonical -prefixcc,fugas,https://onlyfans.com/sammuwuu/,canonical prefixcc,fun,http://w3id.org/sparql-generate/fn/,canonical prefixcc,func,http://www.w3.org/2007/rif-builtin-function#,canonical prefixcc,fuseki,http://jena.apache.org/fuseki#,canonical @@ -1466,7 +1460,6 @@ prefixcc,lds,https://solid.ti.rw.fau.de/public/ns/linked-data-structures#,canoni prefixcc,ldt,https://www.w3.org/ns/ldt#,canonical prefixcc,ldvm,http://linked.opendata.cz/ontology/ldvm/,canonical prefixcc,leak,http://maco.com/,canonical -prefixcc,leaks,https://onlyfans.com/chelxie/,canonical prefixcc,led,http://led.kmi.open.ac.uk/term/,canonical prefixcc,legal,http://www.w3.org/ns/legal#,canonical prefixcc,lemon,http://lemon-model.net/lemon#,canonical @@ -1522,7 +1515,6 @@ prefixcc,lis,http://rds.posccaesar.org/ontology/lis14/rdl/,canonical prefixcc,list,http://www.w3.org/2000/10/swap/list#,canonical prefixcc,literal,http://www.essepuntato.it/2010/06/literalreification/,canonical prefixcc,literature,http://purl.org/net/cnyt-literature#,canonical -prefixcc,ljkl,http://teste.com/,canonical prefixcc,ll,http://lodlaundromat.org/resource/,canonical prefixcc,llalg,http://www.linklion.org/algorithm/,canonical prefixcc,lldr,http://purl.oclc.org/NET/lldr/ns#,canonical @@ -1994,7 +1986,6 @@ prefixcc,onc,http://www.ics.forth.gr/isl/oncm/core#,canonical prefixcc,ondc,http://www.semanticweb.org/ontologies/2012/1/Ontology1329913965202.owl#,canonical prefixcc,one,https://bioportal.bioontology.org/ontologies/ONE/,canonical prefixcc,onisep,http://rdf.onisep.fr/resource/,canonical -prefixcc,onlyfans,https://cutt.ly/3ry8LMcK/,canonical prefixcc,ons,http://purl.obolibrary.org/obo/ONS_,canonical prefixcc,onssprel,http://www.ordnancesurvey.co.uk/ontology/SpatialRelations/v0.2/SpatialRelations.owl#,canonical prefixcc,onto,http://www.ontotext.com/,canonical @@ -2309,7 +2300,6 @@ prefixcc,prviv,http://purl.org/net/provenance/integrity#,canonical prefixcc,prvr,http://purl.org/ontology/prv/rules#,canonical prefixcc,prvt,http://purl.org/net/provenance/types#,namespace_alias prefixcc,prvtypes,http://purl.org/net/provenance/types#,canonical -prefixcc,przecieki,http://onlyfans.com/emiliaszymanska/,canonical prefixcc,ps,https://w3id.org/payswarm#,canonical prefixcc,psdo,http://purl.obolibrary.org/obo/PSDO_,canonical prefixcc,psh,http://ns.inria.fr/probabilistic-shacl/,canonical @@ -2349,7 +2339,6 @@ prefixcc,qms,http://data.europa.eu/esco/qms#,canonical prefixcc,qrl,http://www.aifb.kit.edu/project/ld-retriever/qrl#,canonical prefixcc,qu,http://purl.oclc.org/NET/ssnx/qu/qu#,canonical prefixcc,quak,http://dev.w3.org/cvsweb/2000/quacken/vocab#,canonical -prefixcc,qualityze,https://www.qualityze.com/document-management/,canonical prefixcc,quantities,http://eulersharp.sourceforge.net/2003/03swap/quantitiesExtension#,canonical prefixcc,quantity,http://qudt.org/schema/quantity#,canonical prefixcc,qud,http://qudt.org/1.1/schema/qudt#,canonical @@ -2374,7 +2363,6 @@ prefixcc,railml3,http://ontology.railml.org/railml3#,canonical prefixcc,rami,http://iais.fraunhofer.de/vocabs/rami#,canonical prefixcc,ramon,http://rdfdata.eionet.europa.eu/ramon/ontology/,canonical prefixcc,rank,http://www.ontotext.com/owlim/RDFRank#,canonical -prefixcc,rankrage,https://rankrage.de/,canonical prefixcc,rating,http://www.tvblob.com/ratings/#,canonical prefixcc,raul,http://vocab.deri.ie/raul#,canonical prefixcc,raum,https://terminology.fraunhofer.de/voc/raum#,canonical @@ -2692,7 +2680,6 @@ prefixcc,semts,https://w3id.org/semts/ontology#,canonical prefixcc,semtweet,http://semantictweet.com/,canonical prefixcc,sense,https://w3id.org/sense#,canonical prefixcc,seo,http://sda.tech/SEOontology/SEO/,canonical -prefixcc,seokoeln,http://rankrage.de/,canonical prefixcc,sep,http://purl.obolibrary.org/obo/ZP_,namespace_alias prefixcc,sepio,http://purl.obolibrary.org/obo/SEPIO_,canonical prefixcc,seq,http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#,canonical @@ -3221,7 +3208,6 @@ prefixcc,twitter,http://stocktwits.com/,canonical prefixcc,tx,http://swtmp.gitlab.io/vocabulary/templates.owl#,canonical prefixcc,txn,http://lod.taxonconcept.org/ontology/txn.owl#,canonical prefixcc,txpo,http://purl.obolibrary.org/obo/ZP_,namespace_alias -prefixcc,type,http://teste.com/teste/,canonical prefixcc,tzont,http://www.w3.org/2006/timezone#,canonical prefixcc,ub,http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#,canonical prefixcc,ubbont,http://data.ub.uib.no/ontology/,canonical @@ -3284,7 +3270,6 @@ prefixcc,vcard2006,http://www.w3.org/2006/vcard/ns#,namespace_alias prefixcc,vcardx,http://buzzword.org.uk/rdf/vcardx#,canonical prefixcc,vcs,https://data.vlaanderen.be/ns/chemische_stof#,canonical prefixcc,vdpp,http://data.lirmm.fr/ontologies/vdpp#,canonical -prefixcc,veelana,http://onlyfans.com/veelana/,canonical prefixcc,vehma,http://deductions.github.io/vehicule-management.owl.ttl#,canonical prefixcc,vehman,http://deductions.github.io/vehicule-management.owl.ttl#,namespace_alias prefixcc,veo,http://linkeddata.finki.ukim.mk/lod/ontology/veo#,canonical diff --git a/src/prefixmaps/data/prefixcc.excluded.yaml b/src/prefixmaps/data/prefixcc.excluded.yaml new file mode 100644 index 0000000..8d4dcf0 --- /dev/null +++ b/src/prefixmaps/data/prefixcc.excluded.yaml @@ -0,0 +1,22 @@ +# prefix.cc entries that are never imported, because they are spam or broken. +# +# prefix.cc has no curation and spam keeps reappearing there, see +# https://github.com/linkml/prefixmaps/issues/61 and https://github.com/cygri/prefix.cc/issues/42 +# tests/test_core/test_prefixcc_exclusions.py checks that no bundled context contains them. + +# Namespaces on these hosts, or on their subdomains, are dropped. +hosts: + compliancequest.com: software product page, not a vocabulary + cuzin.com: spam + cutt.ly: URL shortener used for spam + faptica.com: spam + onlyfans.com: spam + pornhub.com: spam + qualityze.com: spam, see https://github.com/cygri/prefix.cc/issues/42 + rankrage.de: SEO agency spam + teste.com: placeholder test entries + +# These prefixes are dropped, whatever their namespace. +prefixes: + bgcat: namespace corrupted upstream (its Cyrillic characters are replaced by "?") + leaks: only ever used for spam, see https://github.com/cygri/prefix.cc/issues/42 diff --git a/src/prefixmaps/ingest/ingest_jsonld.py b/src/prefixmaps/ingest/ingest_jsonld.py index bb424b6..48dbf18 100644 --- a/src/prefixmaps/ingest/ingest_jsonld.py +++ b/src/prefixmaps/ingest/ingest_jsonld.py @@ -1,14 +1,20 @@ """Generic JSON-LD ingests.""" import json -from typing import Any, Dict, List, Optional, TextIO, Union +from pathlib import Path +from typing import Any, Dict, List, Mapping, Optional, TextIO, Union +from urllib.parse import urlparse import requests +import yaml +from prefixmaps.data import data_path from prefixmaps.datamodel.context import Context AT_CONTEXT = "@context" +PREFIXCC_URL = "http://prefix.cc/context.jsonld" + PREFIXCC_EXCLUDE = [ "bp", "terms", @@ -109,6 +115,60 @@ def from_prefixcc() -> Context: Longer term we should focus on the curated linked_data.yaml file, and moving this to bioregistry. + Spam and broken entries listed in prefixcc.excluded.yaml are dropped. + :return: """ - return from_jsonld_context_url("http://prefix.cc/context.jsonld", "prefixcc", PREFIXCC_EXCLUDE) + exclusions = load_prefixcc_exclusions() + jsonld_context = requests.get(url=PREFIXCC_URL).json() + if AT_CONTEXT in jsonld_context: + jsonld_context[AT_CONTEXT] = { + prefix: namespace + for prefix, namespace in jsonld_context[AT_CONTEXT].items() + if not ( + isinstance(namespace, str) + and is_excluded_from_prefixcc(prefix, namespace, exclusions) + ) + } + return from_jsonld_context(jsonld_context, "prefixcc", PREFIXCC_EXCLUDE) + + +def load_prefixcc_exclusions( + path: Path = data_path / "prefixcc.excluded.yaml", +) -> Mapping[str, Mapping[str, str]]: + """ + Loads the prefix.cc entries that are never imported. + + :param path: the exclusions file + :return: the excluded ``hosts`` and ``prefixes``, each mapped to the reason + """ + with open(path, encoding="utf-8") as file: + exclusions = yaml.safe_load(file) or {} + unknown = set(exclusions) - {"hosts", "prefixes"} + if unknown: + # a misspelled key would otherwise silently disable those exclusions + raise ValueError(f"unknown keys in {path.name}: {sorted(unknown)}") + return {key: exclusions.get(key) or {} for key in ("hosts", "prefixes")} + + +def is_excluded_from_prefixcc( + prefix: str, namespace: str, exclusions: Mapping[str, Mapping[str, str]] +) -> bool: + """ + Checks whether a prefix.cc entry is excluded by its prefix or by its namespace's host. + + :param prefix: + :param namespace: + :param exclusions: as returned by :func:`load_prefixcc_exclusions` + :return: True if the entry must not be imported + """ + if prefix in exclusions["prefixes"]: + return True + try: + host = (urlparse(namespace).hostname or "").rstrip(".") + except ValueError: + # not a URL with a parsable host, such as "http://[abc/" + return False + return any( + host == excluded or host.endswith(f".{excluded}") for excluded in exclusions["hosts"] + ) diff --git a/tests/test_core/test_prefixcc_exclusions.py b/tests/test_core/test_prefixcc_exclusions.py new file mode 100644 index 0000000..67df56f --- /dev/null +++ b/tests/test_core/test_prefixcc_exclusions.py @@ -0,0 +1,36 @@ +"""Test that no bundled context contains prefix.cc entries that must never be imported.""" + +import unittest + +from prefixmaps import load_context +from prefixmaps.data import context_paths +from prefixmaps.ingest.ingest_jsonld import ( + is_excluded_from_prefixcc, + load_prefixcc_exclusions, +) + + +class TestPrefixCCExclusions(unittest.TestCase): + """Test that no bundled context contains prefix.cc entries that must never be imported.""" + + def test_no_excluded_entries(self): + """Test bundled contexts against prefixcc.excluded.yaml, see issue #61.""" + exclusions = load_prefixcc_exclusions() + hosts_only = {"hosts": exclusions["hosts"], "prefixes": {}} + for key in context_paths: + with self.subTest(key=key): + excluded = [ + (expansion.prefix, expansion.namespace) + for expansion in load_context(key).prefix_expansions + # excluded hosts are spam in any source, excluded prefixes only in prefix.cc + if is_excluded_from_prefixcc( + expansion.prefix, + expansion.namespace, + ( + exclusions + if "prefixcc" in (key, expansion.expansion_source) + else hosts_only + ), + ) + ] + self.assertEqual([], excluded) diff --git a/tests/test_etl/test_prefix_cc.py b/tests/test_etl/test_prefix_cc.py index 8472870..b6d7f76 100644 --- a/tests/test_etl/test_prefix_cc.py +++ b/tests/test_etl/test_prefix_cc.py @@ -1,6 +1,15 @@ +import json +import tempfile import unittest +from pathlib import Path +from unittest import mock -from prefixmaps.ingest.ingest_jsonld import from_prefixcc +from prefixmaps.ingest.ingest_jsonld import ( + from_prefixcc, + is_excluded_from_prefixcc, + load_prefixcc_exclusions, +) +from tests import INPUT_DIR EXPECTED = [ ("owl", "http://www.w3.org/2002/07/owl#"), @@ -18,3 +27,60 @@ def test_prefix_cc(self): for pfx, ns in EXPECTED: self.assertEqual(pm[pfx], ns) self.assertEqual(pmi[ns], pfx) + + def test_prefix_cc_exclusions(self): + """Test that excluded entries are dropped when ingesting prefix.cc.""" + with open(INPUT_DIR / "prefix-cc.context.jsonld", encoding="utf-8") as file: + response = mock.Mock(json=mock.Mock(return_value=json.load(file))) + with mock.patch("requests.get", return_value=response): + pm = from_prefixcc().as_dict() + for pfx, ns in EXPECTED: + self.assertEqual(pm[pfx], ns) + # the input has veelana and ljkl on excluded hosts, and the excluded prefixes leaks and bgcat + for pfx in ["veelana", "ljkl", "leaks", "bgcat"]: + self.assertNotIn(pfx, pm) + + def test_excluded_hosts(self): + """Test that hosts are excluded with their subdomains, but not lookalike domains.""" + exclusions = {"hosts": {"onlyfans.com": "spam"}, "prefixes": {}} + for namespace, expected in [ + ("https://onlyfans.com/x/", True), + ("http://www.onlyfans.com/x/", True), + ("https://OnlyFans.com/x/", True), + ("https://notonlyfans.com/x/", False), + ("https://example.org/onlyfans.com/", False), + ("https://onlyfans.com./x/", True), + ("http://[abc/", False), + ]: + with self.subTest(namespace=namespace): + self.assertEqual(expected, is_excluded_from_prefixcc("x", namespace, exclusions)) + + def test_prefix_cc_without_context(self): + """Test that a prefix.cc response without a JSON-LD context is still rejected.""" + response = mock.Mock(json=mock.Mock(return_value={})) + with mock.patch("requests.get", return_value=response): + with self.assertRaises(ValueError): + from_prefixcc() + + def test_exclusions_loader(self): + """Test that empty sections are allowed, but misspelled sections are rejected.""" + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) / "prefixcc.excluded.yaml" + for text, expected in [ + ("", {"hosts": {}, "prefixes": {}}), + ("hosts:\nprefixes:\n a: spam\n", {"hosts": {}, "prefixes": {"a": "spam"}}), + ]: + with self.subTest(text=text): + path.write_text(text, encoding="utf-8") + self.assertEqual(expected, load_prefixcc_exclusions(path)) + path.write_text("prefixess:\n a: spam\n", encoding="utf-8") + with self.assertRaises(ValueError): + load_prefixcc_exclusions(path) + + def test_exclusions_file(self): + """Test that the exclusions file has reasons for all entries.""" + exclusions = load_prefixcc_exclusions() + for kind, entries in exclusions.items(): + for entry, reason in entries.items(): + with self.subTest(kind=kind, entry=entry): + self.assertTrue(reason) From 3bd0f240169222818f689c7fcdd593f2d60f0ae1 Mon Sep 17 00:00:00 2001 From: jdsika Date: Wed, 21 Oct 2026 11:32:22 +0200 Subject: [PATCH 2/2] feat: stop refreshing prefix.cc by default prefix.cc has no curation, so every refresh can bring in new spam unreviewed, as the June 2026 refresh did. #61 asks to freeze it. The ETL now uses the bundled prefixcc.csv snapshot. Entries listed in prefixcc.excluded.yaml are still dropped from it, so a new exclusion takes effect on the next run. Canonical rows are loaded first, because merging depends on the order in which rows arrive. In sorted CSV order, 73 prefix.cc rows in merged would change: 70 would lose their canonical status (for example awol and commerce) and 3 prefix aliases would disappear. With canonical rows first, the snapshot and the merged contexts rebuild byte for byte. This relies on prefix.cc having no prefix aliases, which a test checks. slurp-prefixmaps --refresh-prefixcc still downloads prefix.cc, and prints every added or removed prefix.cc row so the change can be reviewed before committing. load_context(..., refresh=True) also uses the snapshot for prefix.cc. Semweb prefix fixes now belong in linked_data.curated.yaml, which already takes precedence over prefix.cc in the merged contexts. Before this change, fixes like the recent gx one came in through a prefix.cc refresh. README and docs explain this. Closes #61 Signed-off-by: jdsika --- README.md | 7 +++ docs/intro.md | 7 +++ src/prefixmaps/ingest/etl_runner.py | 47 +++++++++++++++---- src/prefixmaps/ingest/ingest_jsonld.py | 29 ++++++++++++ src/prefixmaps/io/parser.py | 3 +- tests/test_etl/test_prefix_cc.py | 65 ++++++++++++++++++++++++++ 6 files changed, 149 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index abbf7af..7978030 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,8 @@ converter = load_converter("obo", refresh=True) This will perform a fetch from http://obofoundry.org/registry/obo_prefixes.ttl +prefix.cc is the exception: `refresh=True` still uses the bundled prefix.cc data, because prefix.cc is not curated (see [Refreshing the Data](#refreshing-the-data)). + ## Context Metadata See [contexts.curated.yaml](src/prefixmaps/data/contexts.curated.yaml) @@ -172,6 +174,11 @@ The data can be refreshed in several ways: make etl ``` +prefix.cc is not refreshed by default, because it has no curation and spam keeps reappearing there (see [#61](https://github.com/linkml/prefixmaps/issues/61)). +To fix a semantic web prefix, add it to [linked_data.curated.yaml](https://github.com/linkml/prefixmaps/blob/main/src/prefixmaps/data/linked_data.curated.yaml), which takes precedence over prefix.cc in the merged contexts. +To download prefix.cc anyway, run `slurp-prefixmaps --refresh-prefixcc`, and review the rows it prints and the resulting CSV diff before committing. +prefix.cc entries that must never be imported are listed in [prefixcc.excluded.yaml](https://github.com/linkml/prefixmaps/blob/main/src/prefixmaps/data/prefixcc.excluded.yaml). + TODO: make a github action that auto-releases new versions Note that PRs should *not* be made against the individual CSV files. These are generated from upstream sources. diff --git a/docs/intro.md b/docs/intro.md index 8161ec8..487d30f 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -135,6 +135,8 @@ ctxt = load_context("obo", refresh=True) This will perform a fetch from http://obofoundry.org/registry/obo_prefixes.ttl +prefix.cc is the exception: `refresh=True` still uses the bundled prefix.cc data, because prefix.cc is not curated. + ## Context Metadata See [contexts.curated.yaml](src/prefixmaps/data/contexts.curated.yaml) @@ -155,6 +157,11 @@ These can be regenerated using: make etl ``` +prefix.cc is not refreshed by default, because it has no curation and spam keeps reappearing there. +To fix a semantic web prefix, add it to `linked_data.curated.yaml`, which takes precedence over prefix.cc in the merged contexts. +To download prefix.cc anyway, run `slurp-prefixmaps --refresh-prefixcc`, and review the rows it prints and the resulting CSV diff before committing. +prefix.cc entries that must never be imported are listed in `prefixcc.excluded.yaml`. + TODO: make a github action that auto-released new versions ## Requesting new prefixes diff --git a/src/prefixmaps/ingest/etl_runner.py b/src/prefixmaps/ingest/etl_runner.py index b8311d9..16444cc 100644 --- a/src/prefixmaps/ingest/etl_runner.py +++ b/src/prefixmaps/ingest/etl_runner.py @@ -13,7 +13,7 @@ from_bioregistry_upper, ) from prefixmaps.ingest.ingest_go import parse_go_xrefs_from_remote -from prefixmaps.ingest.ingest_jsonld import from_prefixcc +from prefixmaps.ingest.ingest_jsonld import from_prefixcc, from_prefixcc_snapshot from prefixmaps.ingest.ingest_linkml import from_semweb_curated from prefixmaps.ingest.ingest_shacl import from_obo from prefixmaps.ingest.ingest_w3id import from_w3id @@ -27,10 +27,13 @@ "bioportal": from_bioportal_file, "bioregistry.upper": from_bioregistry_upper, "bioregistry": from_bioregistry, - "prefixcc": from_prefixcc, + "prefixcc": from_prefixcc_snapshot, "w3id": from_w3id, } -"""Maps the name of a context to the python function that can generate it""" +"""Maps the name of a context to the python function that can generate it. + +prefix.cc is frozen, see https://github.com/linkml/prefixmaps/issues/61. Pass +``refresh_prefixcc=True`` to :func:`run_etl` to download it again.""" COMBINED = { "merged": ["obo", "go", "linked_data", "bioregistry.upper", "prefixcc"], @@ -49,6 +52,8 @@ def load_context_from_source(context: CONTEXT) -> Context: - An atomic context (e.g. obo, linked_data) - A conbined context (which remixes existing contexts) + prefix.cc is the exception: it comes from the bundled snapshot, see :data:`CONTEXTS`. + :param context: unique handle of the context :return: """ @@ -63,14 +68,16 @@ def load_context_from_source(context: CONTEXT) -> Context: raise ValueError(f"No such context: {context}") -def run_etl(output_directory: Union[str, Path]) -> None: +def run_etl(output_directory: Union[str, Path], refresh_prefixcc: bool = False) -> None: """ Runs the complete ETL pipeline. - All contexts are refreshed from upstream sources, and written to the output directory, - as CSV. + All contexts except prefix.cc are refreshed from upstream sources, and written to the + output directory, as CSV. :param output_directory: + :param refresh_prefixcc: if True, also download prefix.cc and print what changed. + prefix.cc has no curation, so review those changes before committing them. :return: """ # contexts = load_contexts_meta() @@ -81,6 +88,10 @@ def run_etl(output_directory: Union[str, Path]) -> None: contexts: Dict[str, Context] = { name: context_getter() for name, context_getter in CONTEXTS.items() } + if refresh_prefixcc: + snapshot = contexts["prefixcc"] + contexts["prefixcc"] = from_prefixcc() + echo_changes(snapshot, contexts["prefixcc"]) # Create merged contexts for merged_name, names in COMBINED.items(): @@ -95,6 +106,21 @@ def run_etl(output_directory: Union[str, Path]) -> None: context_to_file(context, file, include_expansion_source=context.name in COMBINED) +def echo_changes(old: Context, new: Context) -> None: + """ + Prints the prefix expansions that were added (+) or removed (-) between two versions of a + context. Changes that this causes in merged contexts only show up in their CSV diffs. + + :param old: + :param new: + :return: + """ + old_rows = {(pe.prefix, pe.namespace, pe.status.value) for pe in old.prefix_expansions} + new_rows = {(pe.prefix, pe.namespace, pe.status.value) for pe in new.prefix_expansions} + for row in sorted(old_rows ^ new_rows, key=lambda row: (row[0].casefold(), row)): + click.echo(f"{'+' if row in new_rows else '-'} {new.name} {' '.join(row)}") + + @click.command @click.option( "-d", @@ -103,8 +129,13 @@ def run_etl(output_directory: Union[str, Path]) -> None: type=Path, help="Path to directory where CSVs are stored", ) -def cli(output_directory): - run_etl(output_directory) +@click.option( + "--refresh-prefixcc", + is_flag=True, + help="Also download prefix.cc, which is uncurated, and print what changed for review", +) +def cli(output_directory, refresh_prefixcc): + run_etl(output_directory, refresh_prefixcc=refresh_prefixcc) if __name__ == "__main__": diff --git a/src/prefixmaps/ingest/ingest_jsonld.py b/src/prefixmaps/ingest/ingest_jsonld.py index 48dbf18..a479250 100644 --- a/src/prefixmaps/ingest/ingest_jsonld.py +++ b/src/prefixmaps/ingest/ingest_jsonld.py @@ -10,6 +10,7 @@ from prefixmaps.data import data_path from prefixmaps.datamodel.context import Context +from prefixmaps.io.parser import load_context AT_CONTEXT = "@context" @@ -133,6 +134,34 @@ def from_prefixcc() -> Context: return from_jsonld_context(jsonld_context, "prefixcc", PREFIXCC_EXCLUDE) +def from_prefixcc_snapshot() -> Context: + """ + Loads the prefix.cc snapshot bundled with this package. + + prefix.cc has no curation, so it is not refreshed by default, see + https://github.com/linkml/prefixmaps/issues/61. To fix a semweb prefix, add it to + linked_data.curated.yaml, which takes precedence over prefix.cc in merged contexts. + + Entries listed in prefixcc.excluded.yaml are still dropped, so a new exclusion takes + effect on the next ETL run. Canonical expansions come first, so that merging the + snapshot gives the same statuses as merging a fresh download. That relies on prefix.cc + having no prefix aliases, which holds because its prefixes are unique and lowercase. + + :return: + """ + exclusions = load_prefixcc_exclusions() + context = load_context("prefixcc") + context.prefix_expansions = sorted( + ( + pe + for pe in context.prefix_expansions + if not is_excluded_from_prefixcc(pe.prefix, pe.namespace, exclusions) + ), + key=lambda pe: not pe.canonical(), + ) + return context + + def load_prefixcc_exclusions( path: Path = data_path / "prefixcc.excluded.yaml", ) -> Mapping[str, Mapping[str, str]]: diff --git a/src/prefixmaps/io/parser.py b/src/prefixmaps/io/parser.py index 347d4bc..e0226ce 100644 --- a/src/prefixmaps/io/parser.py +++ b/src/prefixmaps/io/parser.py @@ -54,7 +54,8 @@ def load_context(name: CONTEXT, refresh=False) -> Context: Loads a context by name from standard location :param name: - :param refresh: if True, fetch from upstream + :param refresh: if True, fetch from upstream. prefix.cc is not curated, so it always + comes from the bundled snapshot, see https://github.com/linkml/prefixmaps/issues/61 :return: """ if refresh: diff --git a/tests/test_etl/test_prefix_cc.py b/tests/test_etl/test_prefix_cc.py index b6d7f76..a5c5c23 100644 --- a/tests/test_etl/test_prefix_cc.py +++ b/tests/test_etl/test_prefix_cc.py @@ -4,11 +4,15 @@ from pathlib import Path from unittest import mock +from prefixmaps.datamodel.context import Context, StatusType +from prefixmaps.ingest.etl_runner import CONTEXTS, echo_changes, run_etl from prefixmaps.ingest.ingest_jsonld import ( from_prefixcc, + from_prefixcc_snapshot, is_excluded_from_prefixcc, load_prefixcc_exclusions, ) +from prefixmaps.io.parser import context_from_file, load_context from tests import INPUT_DIR EXPECTED = [ @@ -55,6 +59,27 @@ def test_excluded_hosts(self): with self.subTest(namespace=namespace): self.assertEqual(expected, is_excluded_from_prefixcc("x", namespace, exclusions)) + def test_snapshot(self): + """Test that the ETL uses the bundled prefix.cc snapshot without network access.""" + with mock.patch("requests.get", side_effect=AssertionError("prefix.cc was downloaded")): + context = CONTEXTS["prefixcc"]() + self.assertEqual(load_context("prefixcc").as_dict(), context.as_dict()) + self.assertEqual(from_prefixcc_snapshot().as_dict(), context.as_dict()) + statuses = [pe.canonical() for pe in context.prefix_expansions] + self.assertEqual( + sorted(statuses, reverse=True), statuses, msg="canonical rows must come first" + ) + # canonical-first ordering only reproduces the merge if prefix.cc has no prefix aliases + self.assertNotIn(StatusType.prefix_alias, {pe.status for pe in context.prefix_expansions}) + + def test_snapshot_exclusions(self): + """Test that a new exclusion is applied to the bundled prefix.cc snapshot.""" + self.assertIn("foaf", load_context("prefixcc").as_dict()) + exclusions = {"hosts": {"xmlns.com": "test"}, "prefixes": {}} + target = "prefixmaps.ingest.ingest_jsonld.load_prefixcc_exclusions" + with mock.patch(target, return_value=exclusions): + self.assertNotIn("foaf", from_prefixcc_snapshot().as_dict()) + def test_prefix_cc_without_context(self): """Test that a prefix.cc response without a JSON-LD context is still rejected.""" response = mock.Mock(json=mock.Mock(return_value={})) @@ -84,3 +109,43 @@ def test_exclusions_file(self): for entry, reason in entries.items(): with self.subTest(kind=kind, entry=entry): self.assertTrue(reason) + + def test_echo_changes(self): + """Test that refreshing prefix.cc reports added and removed expansions.""" + old, new = Context("prefixcc"), Context("prefixcc") + old.add_prefix("a", "https://example.org/a/") + old.add_prefix("b", "https://example.org/b/") + new.add_prefix("a", "https://example.org/a2/") + new.add_prefix("b", "https://example.org/b/") + new.add_prefix("c", "https://example.org/c/") + new.add_prefix("d", "https://example.org/c/") + with mock.patch("click.echo") as echo: + echo_changes(old, new) + self.assertEqual( + [ + mock.call("- prefixcc a https://example.org/a/ canonical"), + mock.call("+ prefixcc a https://example.org/a2/ canonical"), + mock.call("+ prefixcc c https://example.org/c/ canonical"), + mock.call("+ prefixcc d https://example.org/c/ namespace_alias"), + ], + echo.call_args_list, + ) + + def test_refresh_prefixcc(self): + """Test that the ETL only downloads prefix.cc when asked, and then reports the changes.""" + for refresh, expected in [(False, "a"), (True, "b")]: + snapshot, download = Context("prefixcc"), Context("prefixcc") + snapshot.add_prefix("a", "https://example.org/a/") + download.add_prefix("b", "https://example.org/b/") + sources = {name: (lambda name=name: Context(name)) for name in CONTEXTS} + sources["prefixcc"] = lambda snapshot=snapshot: snapshot + target = "prefixmaps.ingest.etl_runner.from_prefixcc" + with self.subTest(refresh=refresh), tempfile.TemporaryDirectory() as directory: + with mock.patch.dict(CONTEXTS, sources), mock.patch("click.echo") as echo: + with mock.patch(target, return_value=download) as from_prefixcc_mock: + run_etl(directory, refresh_prefixcc=refresh) + self.assertEqual(refresh, from_prefixcc_mock.called) + self.assertEqual(refresh, echo.called) + for name in ["prefixcc", "merged"]: + with open(Path(directory) / f"{name}.csv", encoding="utf-8") as file: + self.assertEqual([expected], list(context_from_file(name, file).as_dict()))