Skip to content

Commit

Permalink
allow all concepts in tag.category
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Apr 22, 2024
1 parent 64a3637 commit 3aa09bf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [24.01.2] 2024-03-22
### changed
- allow all concepts to be used in category field (align category and concepts)

## [24.01.1] 2024-01-09
### changed
- switched to calver
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash
PROJECT := tagpack-tool
VENV := .venv
RELEASE := 'v24.01.1'
RELEASE := 'v24.01.2'
# RELEASESEM := 'v1.9.0'

all: format lint test build
Expand Down
2 changes: 1 addition & 1 deletion src/tagpack/conf/tagpack_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tag:
category:
type: text
mandatory: false
taxonomy: entity
taxonomy: concept
abuse:
type: text
mandatory: false
Expand Down
9 changes: 9 additions & 0 deletions src/tagpack/db/concepts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ terrorism:
seeAlso: https://gifct.org/wp-content/uploads/2021/07/GIFCT-TaxonomyReport-2021.pdf
broader: extremism

terrorism_financing:
id: terrorism_financing
type: concept
prefLabel: Terrorism Financing
description: >
Financial support to terrorism related entities
seeAlso: https://gifct.org/wp-content/uploads/2021/07/GIFCT-TaxonomyReport-2021.pdf
broader: extremism

dark_web:
id: dark_web
type: concept
Expand Down
6 changes: 3 additions & 3 deletions tests/test_tagpack_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ def schema(monkeypatch):

@pytest.fixture
def taxonomies():
tax_entity = Taxonomy("entity", "http://example.com/entity")
tax_entity = Taxonomy("concept", "http://example.com/entity")
tax_entity.add_concept("exchange", "Exchange", None, "Some description")

tax_abuse = Taxonomy("abuse", "http://example.com/abuse")
tax_abuse.add_concept("bad_coding", "Bad coding", None, "Really bad")

taxonomies = {"entity": tax_entity, "abuse": tax_abuse}
taxonomies = {"concept": tax_entity, "abuse": tax_abuse}
return taxonomies


Expand Down Expand Up @@ -101,7 +101,7 @@ def test_field_type(schema):


def test_field_taxonomy(schema):
assert schema.field_taxonomy("category") == "entity"
assert schema.field_taxonomy("category") == "concept"


def test_field_no_taxonomy(schema):
Expand Down

0 comments on commit 3aa09bf

Please sign in to comment.