diff --git a/packtools/sps/models/article_and_subarticles.py b/packtools/sps/models/article_and_subarticles.py index 2298005e6..8abfd2015 100644 --- a/packtools/sps/models/article_and_subarticles.py +++ b/packtools/sps/models/article_and_subarticles.py @@ -53,6 +53,7 @@ def data(self): "article_id": None, "line_number": self.main_line_number, "subject": self.main_subject, + "parent_name": "article", }) for sub_article in self.xmltree.xpath(".//sub-article"): @@ -65,6 +66,7 @@ def data(self): "article_type": sub_article.get('article-type'), "article_id": sub_article.get('id'), "line_number": sub_article.sourceline, - "subject": subject.text if subject is not None else None + "subject": subject.text if subject is not None else None, + "parent_name": "sub-article", }) return _data diff --git a/packtools/sps/models/article_titles.py b/packtools/sps/models/article_titles.py index 224fb396a..d474c8322 100644 --- a/packtools/sps/models/article_titles.py +++ b/packtools/sps/models/article_titles.py @@ -29,29 +29,31 @@ def article_title_list(self): @property def article_title_dict(self): - return { - item['lang']: item['text'] - for item in self.article_title_list - } + resp = {} + for item in self.article_title_list: + if item and item.get('lang'): + resp[item['lang']] = item + return resp @property def article_title(self): for node_with_lang in xml_utils.get_nodes_with_lang( self.xmltree, ".", ".//article-meta//article-title"): - return { - "parent_name": "article", - "lang": node_with_lang["lang"], - "text": xml_utils.node_text_without_xref(node_with_lang["node"]), - "plain_text": xml_utils.node_plain_text(node_with_lang["node"]), - "html_text": xml_utils.process_subtags( - node_with_lang["node"], - tags_to_keep=self.tags_to_keep, - tags_to_keep_with_content=self.tags_to_keep_with_content, - tags_to_remove_with_content=self.tags_to_remove_with_content, - tags_to_convert_to_html=self.tags_to_convert_to_html - ) - } + if node_with_lang["node"] is not None: + return { + "parent_name": "article", + "lang": node_with_lang["lang"], + "text": xml_utils.node_text_without_xref(node_with_lang["node"]), + "plain_text": xml_utils.node_plain_text(node_with_lang["node"]), + "html_text": xml_utils.process_subtags( + node_with_lang["node"], + tags_to_keep=self.tags_to_keep, + tags_to_keep_with_content=self.tags_to_keep_with_content, + tags_to_remove_with_content=self.tags_to_remove_with_content, + tags_to_convert_to_html=self.tags_to_convert_to_html + ) + } @property def trans_titles(self): @@ -59,20 +61,21 @@ def trans_titles(self): for node_with_lang in xml_utils.get_nodes_with_lang( self.xmltree, ".//article-meta//trans-title-group", "trans-title"): - _title = { - "parent_name": "article", - "lang": node_with_lang["lang"], - "text": xml_utils.node_text_without_xref(node_with_lang["node"]), - "plain_text": xml_utils.node_plain_text(node_with_lang["node"]), - "html_text": xml_utils.process_subtags( - node_with_lang["node"], - tags_to_keep=self.tags_to_keep, - tags_to_keep_with_content=self.tags_to_keep_with_content, - tags_to_remove_with_content=self.tags_to_remove_with_content, - tags_to_convert_to_html=self.tags_to_convert_to_html - ) - } - _titles.append(_title) + if node_with_lang["node"] is not None: + _title = { + "parent_name": "article", + "lang": node_with_lang["lang"], + "text": xml_utils.node_text_without_xref(node_with_lang["node"]), + "plain_text": xml_utils.node_plain_text(node_with_lang["node"]), + "html_text": xml_utils.process_subtags( + node_with_lang["node"], + tags_to_keep=self.tags_to_keep, + tags_to_keep_with_content=self.tags_to_keep_with_content, + tags_to_remove_with_content=self.tags_to_remove_with_content, + tags_to_convert_to_html=self.tags_to_convert_to_html + ) + } + _titles.append(_title) return _titles @property @@ -82,19 +85,20 @@ def sub_article_titles(self): self.xmltree, ".//sub-article[@article-type='translation']", ".//front-stub//article-title"): - _title = { - "parent_name": "sub-article", - "lang": node_with_lang["lang"], - "text": xml_utils.node_text_without_xref(node_with_lang["node"]), - "plain_text": xml_utils.node_plain_text(node_with_lang["node"]), - "html_text": xml_utils.process_subtags( - node_with_lang["node"], - tags_to_keep=self.tags_to_keep, - tags_to_keep_with_content=self.tags_to_keep_with_content, - tags_to_remove_with_content=self.tags_to_remove_with_content, - tags_to_convert_to_html=self.tags_to_convert_to_html - ), - "id": node_with_lang["id"] - } - _titles.append(_title) + if node_with_lang["node"] is not None: + _title = { + "parent_name": "sub-article", + "lang": node_with_lang["lang"], + "text": xml_utils.node_text_without_xref(node_with_lang["node"]), + "plain_text": xml_utils.node_plain_text(node_with_lang["node"]), + "html_text": xml_utils.process_subtags( + node_with_lang["node"], + tags_to_keep=self.tags_to_keep, + tags_to_keep_with_content=self.tags_to_keep_with_content, + tags_to_remove_with_content=self.tags_to_remove_with_content, + tags_to_convert_to_html=self.tags_to_convert_to_html + ), + "id": node_with_lang["id"] + } + _titles.append(_title) return _titles diff --git a/packtools/sps/validation/article_lang.py b/packtools/sps/validation/article_lang.py index 90b222847..c6c8204ac 100644 --- a/packtools/sps/validation/article_lang.py +++ b/packtools/sps/validation/article_lang.py @@ -1,157 +1,130 @@ -from packtools.sps.models import ( - article_titles, - article_abstract, - kwd_group -) - - -def _elements_exist(title_dict, title_object, abstracts, keywords): - # verifica se existe título no XML - if not title_object.article_title_dict.get(title_dict.get('lang')): - return False, True, 'title', './/article-title/@xml:lang', f'title for the {title_dict.get("parent_name")}' - # verifica se existe palavras-chave sem resumo - if abstracts == [] and keywords != []: - return False, True, 'abstract', './/abstract/@xml:lang', f'abstract for the {title_dict.get("parent_name")}' - # verifica se existe resumo sem palavras-chave - if abstracts != [] and keywords == []: - return False, True, 'kwd-group', './/kwd-group/@xml:lang', f'keywords for the {title_dict.get("parent_name")}' - # verifica se o teste é necessário - if abstracts == [] and keywords == []: - return True, False, None, None, None - return True, True, None, None, None - - -def get_element_langs(elements): - return [ - { - 'parent_name': item.get('parent_name'), - 'lang': item.get('lang'), - **({'id': item['id']} if 'id' in item else {}) - } - for item in elements if item - ] - - -def get_advice(element, title_dict): - advice = f'Provide {element} in the \'{title_dict.get("lang")}\' language for {title_dict.get("parent_name")}' - if title_dict.get("id") is not None: - advice += f' ({title_dict.get("id")})' - return advice - +from packtools.sps.models import article_and_subarticles, article_titles, article_abstract, kwd_group +from packtools.sps.validation.utils import format_response + + +def _elements_exist(title, abstract, keyword): + """ + Verifica a existência dos elementos de título, resumo e palavras-chave no XML. + + Parâmetros + ---------- + title : dict + Dicionário com dados do título do artigo no XML. + abstract : dict + Dicionário com dados do resumo do artigo no XML. + keyword : dict + Dicionário com dados dss palavras-chave do artigo no XML. + + Retorna + ------- + tuple + Um tuple contendo três valores: + - bool: Se todos os elementos necessários estão presentes. + - bool: Se o elemento ausente é obrigatório. + - str: O nome do elemento ausente, se houver. + """ + # Verifica se existe título no XML + if not title: + return False, True, 'title' + # Verifica se existe palavras-chave sem resumo + if not abstract and keyword: + return False, True, 'abstract' + # Verifica se existe resumo sem palavras-chave + if abstract and not keyword: + return False, True, 'kwd-group' + return True, False, None class ArticleLangValidation: + """ + Classe para validação de idiomas de artigos no XML. Verifica se os elementos + de título, resumo e palavras-chave estão presentes no XML e se os respectivos + idiomas correspondem. + + Atributos + --------- + article_and_subarticles : ArticleAndSubArticles + Instância que contém dados de artigos e subartigos do XML. + article_title : ArticleTitles + Instância que contém títulos do artigo por idioma. + article_abstract : ArticleAbstract + Instância que contém resumos do artigo por idioma. + article_kwd : ArticleKeywords + Instância que contém palavras-chave do artigo por idioma. + """ + def __init__(self, xml_tree): + """ + Inicializa a classe com a árvore XML fornecida. + + Parâmetros + ---------- + xml_tree : ElementTree + A árvore XML do artigo a ser validado. + """ + self.article_and_subarticles = article_and_subarticles.ArticleAndSubArticles(xml_tree) self.article_title = article_titles.ArticleTitles(xml_tree) - self.article_abstract = article_abstract.Abstract(xml_tree) - self.article_kwd = kwd_group.KwdGroup(xml_tree).extract_kwd_data_with_lang_text_by_article_type(None) + self.article_abstract = article_abstract.ArticleAbstract(xml_tree) + self.article_kwd = kwd_group.ArticleKeywords(xml_tree) + self.xml_tree = xml_tree - def validate_article_lang(self): + def validate_article_lang(self, error_level="ERROR"): """ - Checks whether the title, abstract and keyword elements are present in the XML and whether the respective languages match. - - XML input - --------- -
- - - - Título em português - - Title in english - - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - -
-
-
- - Returns + Valida os idiomas dos elementos de título, resumo e palavras-chave no XML, + e gera uma resposta de validação para cada verificação. + + Parâmetros + ---------- + error_level : str, opcional + O nível de erro a ser retornado na resposta (padrão é "ERROR"). + + Retorna ------- - list of dict - A list of dictionaries, such as: - [ - { - 'title': 'abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'pt', - 'got_value': 'pt', - 'message': 'Got pt expected pt', - 'advice': None - },... - ] + generator + Gera dicionários que contêm os resultados de validação para cada + idioma de artigo/subartigo, com as informações sobre a validação e + eventuais erros encontrados. """ - # obtem uma lista de dicionários com dados de títulos: [{'parent_name': 'article', 'lang': 'pt'},...] - titles_list = get_element_langs(self.article_title.data) - - # obtem uma lista de dicionários com dados de resumos: [{'parent_name': 'article', 'lang': 'pt'},...] - abstracts_list = get_element_langs(self.article_abstract.get_abstracts(style='inline')) - - # obtem uma lista de dicionários com dados de palavras-chave: [{'parent_name': 'article', 'lang': 'pt'},...] - keywords_list = get_element_langs(self.article_kwd) - - # verifica a existência de title no XML - if not titles_list: - yield { - 'title': f'XML title element lang attribute validation', - 'xpath': f'.//article-title/@xml:lang', - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': f'title for the XML', - 'got_value': None, - 'message': f'Got None expected title for the XML', - 'advice': f'Provide title for the XML' - } - - # verifica a existência dos elementos no XML - for title_dict in titles_list: - exist, is_required, element, xpath, expected = _elements_exist( - title_dict, - self.article_title, - [abstract_dict for abstract_dict in abstracts_list if - abstract_dict.get('parent_name') == title_dict.get('parent_name')], - [keyword_dict for keyword_dict in keywords_list if - keyword_dict.get('parent_name') == title_dict.get('parent_name')] - ) - - if exist and is_required: - # validação de correspondência entre os idiomas, usando como base o título - for element, langs in zip(['abstract', 'kwd-group'], [abstracts_list, keywords_list]): - advice = get_advice(element, title_dict) - is_valid = title_dict in langs - expected = title_dict.get('lang') - obtained = title_dict.get('lang') if is_valid else None - yield { - 'title': f'{title_dict.get("parent_name")} {element} element lang attribute validation', - 'xpath': f'.//article-title/@xml:lang .//{element}/@xml:lang', - 'validation_type': 'match', - 'response': 'OK' if is_valid else 'ERROR', - 'expected_value': expected, - 'got_value': obtained, - 'message': f'Got {obtained} expected {expected}', - 'advice': None if is_valid else advice - } - elif is_required: - # resposta para a verificação de ausência de elementos - advice = get_advice(element, title_dict) - yield { - 'title': f'{title_dict.get("parent_name")} {element} element lang attribute validation', - 'xpath': xpath, - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': expected, - 'got_value': None, - 'message': f'Got None expected {expected}', - 'advice': advice - } + # Títulos indexados por idioma + titles_by_lang = self.article_title.article_title_dict + + # Resumos indexados por idioma + abstracts_by_lang = self.article_abstract.get_abstracts_by_lang() + + # Palavras-chave indexadas por idioma + self.article_kwd.configure() + keywords_by_lang = self.article_kwd.items_by_lang + + # Idiomas do xml + XML_NS = "{http://www.w3.org/XML/1998/namespace}lang" + languages = {self.xml_tree.attrib.get(XML_NS)} if self.xml_tree.attrib.get(XML_NS) else set() + languages.update( + elem.attrib.get(XML_NS) for elem in self.xml_tree.findall(f".//*[@{XML_NS}]") if elem.attrib.get(XML_NS) + ) + + # Verifica a existência dos elementos no XML + for lang in list(languages): + title = titles_by_lang.get(lang) + abstract = abstracts_by_lang.get(lang) + keyword = keywords_by_lang.get(lang) + + exist, is_required, missing_element_name = _elements_exist(title, abstract, keyword) + + if not exist and is_required: + # Resposta para a verificação de ausência de elementos + yield format_response( + title=f'{missing_element_name} element lang attribute', + parent=None, + parent_id=None, + parent_article_type=None, + parent_lang=lang, + item=missing_element_name, + sub_item=None, + validation_type='match', + is_valid=False, + expected=f"{missing_element_name} in {lang}", + obtained=None, + advice=f'Provide {missing_element_name} in the {lang} language', + data=None, + error_level=error_level, + ) diff --git a/tests/sps/models/test_article_and_subarticles.py b/tests/sps/models/test_article_and_subarticles.py index bb3eb5223..97e8b4683 100644 --- a/tests/sps/models/test_article_and_subarticles.py +++ b/tests/sps/models/test_article_and_subarticles.py @@ -53,42 +53,48 @@ def test_elements_order(self): 'article_type': 'research-article', 'lang': 'pt', 'line_number': 2, - 'subject': 'ARTIGOS' + 'subject': 'ARTIGOS', + 'parent_name': 'article', }, { 'article_id': 's2', 'article_type': 'reviewer-report', 'lang': 'pt', 'line_number': 93, - 'subject': 'Pareceres' + 'subject': 'Pareceres', + 'parent_name': 'sub-article', }, { 'article_id': 's3', 'article_type': 'reviewer-report', 'lang': 'pt', 'line_number': 141, - 'subject': 'Pareceres' + 'subject': 'Pareceres', + 'parent_name': 'sub-article', }, { 'article_id': 's1', 'article_type': 'translation', 'lang': 'en', 'line_number': 189, - 'subject': 'ARTICLES' + 'subject': 'ARTICLES', + 'parent_name': 'sub-article', }, { 'article_id': 's5', 'article_type': 'reviewer-report', 'lang': 'en', 'line_number': 233, - 'subject': 'Reviews' + 'subject': 'Reviews', + 'parent_name': 'sub-article', }, { 'article_id': 's6', 'article_type': 'reviewer-report', 'lang': 'en', 'line_number': 271, - 'subject': 'Reviews' + 'subject': 'Reviews', + 'parent_name': 'sub-article', } ] obtained = [d for d in ArticleAndSubArticles(xmltree).data] diff --git a/tests/sps/validation/test_article_lang.py b/tests/sps/validation/test_article_lang.py index 2859c375d..35fb87e23 100644 --- a/tests/sps/validation/test_article_lang.py +++ b/tests/sps/validation/test_article_lang.py @@ -1,566 +1,57 @@ import unittest from packtools.sps.utils.xml_utils import get_xml_tree -from packtools.sps.validation.article_lang import ( - ArticleLangValidation, - get_element_langs, - _elements_exist -) -from packtools.sps.models import article_titles, article_abstract, kwd_group +from packtools.sps.validation.article_lang import ArticleLangValidation -class AuxiliaryFunctionsTest(unittest.TestCase): - def test_get_title_langs(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - -
-
- - - - Title in english - - - Abstract in english - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - article_title = article_titles.ArticleTitles(xml_tree).data - - obtained = get_element_langs(article_title) - - expected = [ - { - 'parent_name': 'article', - 'lang': 'pt' - }, - { - 'parent_name': 'article', - 'lang': 'en' - }, - { - 'parent_name': 'sub-article', - 'lang': 'en', - 'id': 'TRen' - } - ] - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test_get_abstract_langs(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - -
-
- - - - Title in english - - - Abstract in english - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - abstract = article_abstract.Abstract(xml_tree).get_abstracts() - - obtained = get_element_langs(abstract) - - expected = [ - { - 'parent_name': 'article', - 'lang': 'pt' - }, - { - 'parent_name': 'article', - 'lang': 'en' - }, - { - 'parent_name': 'sub-article', - 'lang': 'en', - 'id': 'TRen' - } - ] - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test_get_keyword_langs(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - -
-
- - - - Title in english - - - Abstract in english - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - kwd = kwd_group.KwdGroup(xml_tree).extract_kwd_data_with_lang_text_by_article_type(None) - - obtained = get_element_langs(kwd) - - expected = [ - { - 'parent_name': 'article', - 'lang': 'pt' - }, - { - 'parent_name': 'article', - 'lang': 'en' - }, - { - 'parent_name': 'sub-article', - 'lang': 'en', - 'id': 'TRen' - } - ] - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test__elements_exist(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - -
-
- - - - Title in english - - - Abstract in english - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - title = {'parent_name': 'article', 'lang': 'en'} - title_object = article_titles.ArticleTitles(xml_tree) - abstracts = [ - {'parent_name': 'article', 'lang': 'pt'}, - {'parent_name': 'article', 'lang': 'en'}, - {'parent_name': 'sub-article', 'lang': 'en', 'id': 'TRen'} - ] - - keywords = [ - {'parent_name': 'article', 'lang': 'en'}, - {'parent_name': 'article', 'lang': 'en'}, - {'parent_name': 'sub-article', 'lang': 'en', 'id': 'TRen'} - ] - - obtained = _elements_exist(title, title_object, abstracts, keywords) - - expected = (True, True, None, None, None) - - self.assertEqual(expected, obtained) - - def test__elements_exist_missing_title(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - - -
- """ - xml_tree = get_xml_tree(xml_str) - title = { - 'parent_name': 'article', - 'lang': 'en' - } - title_object = article_titles.ArticleTitles(xml_tree) - abstracts = [] - keywords = [] - - obtained = _elements_exist(title, title_object, abstracts, keywords) - - expected = (False, True, 'title', './/article-title/@xml:lang', 'title for the article') - - self.assertEqual(expected, obtained) - - def test__elements_exist_missing_abstract(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - title = { - 'parent_name': 'article', - 'lang': 'pt' - } - title_object = article_titles.ArticleTitles(xml_tree) - abstracts = [] - keywords = [{'element_name': 'article', 'lang': 'pt'}, {'element_name': 'article', 'lang': 'en'}] - - obtained = _elements_exist(title, title_object, abstracts, keywords) - - expected = (False, True, 'abstract', './/abstract/@xml:lang', 'abstract for the article') - - self.assertEqual(expected, obtained) - - def test__elements_exist_missing_kwd(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - -

Resumo em português

-
-
-
- """ - xml_tree = get_xml_tree(xml_str) - title = { - 'parent_name': 'article', - 'lang': 'pt', - 'id': 'main' - } - title_object = article_titles.ArticleTitles(xml_tree) - abstracts = [{'element_name': 'article', 'lang': 'pt'}] - keywords = [] - - obtained = _elements_exist(title, title_object, abstracts, keywords) - - expected = (False, True, 'kwd-group', './/kwd-group/@xml:lang', 'keywords for the article') - - self.assertEqual(expected, obtained) - - def test__elements_exist_is_required(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - - -
- """ - xml_tree = get_xml_tree(xml_str) - title = { - 'parent_name': 'article', - 'lang': 'pt', - 'id': 'main' - } - title_object = article_titles.ArticleTitles(xml_tree) - abstracts = [] - keywords = [] - - obtained = _elements_exist(title, title_object, abstracts, keywords) - - expected = (True, False, None, None, None) - - self.assertEqual(expected, obtained) - - -class ArticleLangTest(unittest.TestCase): - def test_validate_article_lang_without_title(self): - self.maxDiff = None - xml_str = """ -
- - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - -
-
-
- """ - xml_tree = get_xml_tree(xml_str) - - obtained = ArticleLangValidation(xml_tree).validate_article_lang() - - expected = [ - { - 'title': 'article title element lang attribute validation', - 'xpath': './/article-title/@xml:lang', - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': 'title for the article', - 'got_value': None, - 'message': 'Got None expected title for the article', - 'advice': 'Provide title in the \'pt\' language for article' - } - ] - - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test_validate_sub_article_lang_without_title(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - - - - - - Abstract in english - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - - obtained = ArticleLangValidation(xml_tree).validate_article_lang() - - expected = [ - { - 'title': 'sub-article title element lang attribute validation', - 'xpath': './/article-title/@xml:lang', - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': 'title for the sub-article', - 'got_value': None, - 'message': 'Got None expected title for the sub-article', - 'advice': 'Provide title in the \'en\' language for sub-article (TRen)' - } - ] - - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test_validate_article_lang_success(self): +class ArticleLangTest(unittest.TestCase): + def test_validate_article_lang_without_title(self): self.maxDiff = None xml_str = """ -
+
- - Título em português - - Title in english - -

Resumo em português

- Abstract in english Palavra chave 1 Palavra chave 2 - - Keyword 1 - Keyword 2 -
""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'pt', - 'got_value': 'pt', - 'message': 'Got pt expected pt', - 'advice': None - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'pt', - 'got_value': 'pt', - 'message': 'Got pt expected pt', - 'advice': None - - }, - { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', + 'title': 'title element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'pt', + 'item': 'title', + 'sub_item': None, 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - + 'response': 'ERROR', + 'expected_value': 'title in pt', + 'got_value': None, + 'message': 'Got None, expected title in pt', + 'advice': 'Provide title in the pt language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_sub_article_lang_success(self): + def test_validate_sub_article_lang_without_title(self): self.maxDiff = None xml_str = """ -
+
@@ -570,9 +61,6 @@ def test_validate_sub_article_lang_success(self): - - Title in english - Abstract in english @@ -586,119 +74,80 @@ def test_validate_sub_article_lang_success(self): """ xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'sub-article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - - }, - { - 'title': 'sub-article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', + 'title': 'title element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'en', + 'item': 'title', + 'sub_item': None, 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None + 'response': 'ERROR', + 'expected_value': 'title in en', + 'got_value': None, + 'message': 'Got None, expected title in en', + 'advice': 'Provide title in the en language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_article_lang_fail_abstract_does_not_match(self): + def test_validate_article_lang_without_abstract(self): self.maxDiff = None xml_str = """ -
+
Título em português - - Title in english - -

Resumo em português

- Abstract in english Palavra chave 1 Palavra chave 2 - - Keyword 1 - Keyword 2 -
""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'pt', - 'got_value': 'pt', - 'message': 'Got pt expected pt', - 'advice': None - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'pt', - 'got_value': 'pt', - 'message': 'Got pt expected pt', - 'advice': None - - }, - { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', + 'title': 'abstract element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'pt', + 'item': 'abstract', + 'sub_item': None, 'validation_type': 'match', 'response': 'ERROR', - 'expected_value': 'en', + 'expected_value': 'abstract in pt', 'got_value': None, - 'message': 'Got None expected en', - 'advice': "Provide abstract in the 'en' language for article", - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - + 'message': 'Got None, expected abstract in pt', + 'advice': 'Provide abstract in the pt language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_sub_article_lang_fail_abstract_does_not_match(self): + def test_validate_sub_article_lang_without_abstract(self): self.maxDiff = None xml_str = """ -
+
@@ -711,244 +160,84 @@ def test_validate_sub_article_lang_fail_abstract_does_not_match(self): Title in english - - Abstract in english - - - Keyword 1 - Keyword 2 - - - -
- """ - xml_tree = get_xml_tree(xml_str) - - obtained = ArticleLangValidation(xml_tree).validate_article_lang() - - expected = [ - { - 'title': 'sub-article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'ERROR', - 'expected_value': 'en', - 'got_value': None, - 'message': 'Got None expected en', - 'advice': "Provide abstract in the 'en' language for sub-article (TRen)", - - }, - { - 'title': 'sub-article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - - } - ] - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test_validate_article_lang_fail_kwd_group_does_not_match(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - -

Resumo em português

- Abstract in english - - Palavra chave 1 - Palavra chave 2 - Keyword 1 Keyword 2 -
-
-
- """ - xml_tree = get_xml_tree(xml_str) - - obtained = ArticleLangValidation(xml_tree).validate_article_lang() - - expected = [ - { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'pt', - 'got_value': 'pt', - 'message': 'Got pt expected pt', - 'advice': None - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', - 'validation_type': 'match', - 'response': 'ERROR', - 'expected_value': 'pt', - 'got_value': None, - 'message': 'Got None expected pt', - 'advice': "Provide kwd-group in the 'pt' language for article", - - }, - { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - - } - ] - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) - - def test_validate_sub_article_lang_fail_kwd_group_does_not_match(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - - - - - - Title in english - - - Abstract in english - - - Keyword 1 - Keyword 2 -
""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'sub-article abstract element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//abstract/@xml:lang', - 'validation_type': 'match', - 'response': 'OK', - 'expected_value': 'en', - 'got_value': 'en', - 'message': 'Got en expected en', - 'advice': None - - }, - { - 'title': 'sub-article kwd-group element lang attribute validation', - 'xpath': './/article-title/@xml:lang .//kwd-group/@xml:lang', + 'title': 'abstract element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'en', + 'item': 'abstract', + 'sub_item': None, 'validation_type': 'match', 'response': 'ERROR', - 'expected_value': 'en', + 'expected_value': 'abstract in en', 'got_value': None, - 'message': 'Got None expected en', - 'advice': "Provide kwd-group in the 'en' language for sub-article (TRen)", - + 'message': 'Got None, expected abstract in en', + 'advice': 'Provide abstract in the en language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_article_lang_without_abstract(self): + def test_validate_article_lang_without_kwd_group(self): self.maxDiff = None xml_str = """ -
+
Título em português - - Title in english - - - Palavra chave 1 - Palavra chave 2 - - - Keyword 1 - Keyword 2 - +

Resumo em português

""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/abstract/@xml:lang', - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': 'abstract for the article', - 'got_value': None, - 'message': 'Got None expected abstract for the article', - 'advice': "Provide abstract in the 'pt' language for article", - - }, - { - 'title': 'article abstract element lang attribute validation', - 'xpath': './/abstract/@xml:lang', - 'validation_type': 'exist', + 'title': 'kwd-group element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'pt', + 'item': 'kwd-group', + 'sub_item': None, + 'validation_type': 'match', 'response': 'ERROR', - 'expected_value': 'abstract for the article', + 'expected_value': 'kwd-group in pt', 'got_value': None, - 'message': 'Got None expected abstract for the article', - 'advice': "Provide abstract in the 'en' language for article", + 'message': 'Got None, expected kwd-group in pt', + 'advice': 'Provide kwd-group in the pt language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_sub_article_lang_without_abstract(self): + def test_validate_sub_article_lang_without_kwd_group(self): self.maxDiff = None xml_str = """
@@ -964,38 +253,45 @@ def test_validate_sub_article_lang_without_abstract(self): Title in english - - Keyword 1 - Keyword 2 - + + Abstract in english +
""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'sub-article abstract element lang attribute validation', - 'xpath': './/abstract/@xml:lang', - 'validation_type': 'exist', + 'title': 'kwd-group element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'en', + 'item': 'kwd-group', + 'sub_item': None, + 'validation_type': 'match', 'response': 'ERROR', - 'expected_value': 'abstract for the sub-article', + 'expected_value': 'kwd-group in en', 'got_value': None, - 'message': 'Got None expected abstract for the sub-article', - 'advice': "Provide abstract in the 'en' language for sub-article (TRen)", + 'message': 'Got None, expected kwd-group in en', + 'advice': 'Provide kwd-group in the en language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_article_lang_without_kwd_group(self): + def test_validate_article_lang_with_title_only(self): self.maxDiff = None xml_str = """ -
+
@@ -1004,8 +300,6 @@ def test_validate_article_lang_without_kwd_group(self): Title in english -

Resumo em português

- Abstract in english
@@ -1014,129 +308,139 @@ def test_validate_article_lang_without_kwd_group(self): obtained = ArticleLangValidation(xml_tree).validate_article_lang() - expected = [ - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/kwd-group/@xml:lang', - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': 'keywords for the article', - 'got_value': None, - 'message': 'Got None expected keywords for the article', - 'advice': "Provide kwd-group in the 'pt' language for article" - - }, - { - 'title': 'article kwd-group element lang attribute validation', - 'xpath': './/kwd-group/@xml:lang', - 'validation_type': 'exist', - 'response': 'ERROR', - 'expected_value': 'keywords for the article', - 'got_value': None, - 'message': 'Got None expected keywords for the article', - 'advice': "Provide kwd-group in the 'en' language for article" - - } - ] - for i, item in enumerate(obtained): - with self.subTest(i): - self.assertDictEqual(expected[i], item) + self.assertEqual(list(obtained), []) - def test_validate_sub_article_lang_without_kwd_group(self): + def test_validate_sub_article_lang_with_title_only(self): self.maxDiff = None xml_str = """
- - - Título em português - - + Title in english - - Abstract in english -
""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) expected = [ { - 'title': 'sub-article kwd-group element lang attribute validation', - 'xpath': './/kwd-group/@xml:lang', - 'validation_type': 'exist', + 'title': 'title element lang attribute', + 'parent': None, + 'parent_article_type': None, + 'parent_id': None, + 'parent_lang': 'pt', + 'item': 'title', + 'sub_item': None, + 'validation_type': 'match', 'response': 'ERROR', - 'expected_value': 'keywords for the sub-article', + 'expected_value': 'title in pt', 'got_value': None, - 'message': 'Got None expected keywords for the sub-article', - 'advice': "Provide kwd-group in the 'en' language for sub-article (TRen)", + 'message': 'Got None, expected title in pt', + 'advice': 'Provide title in the pt language', + 'data': None } ] + self.assertEqual(len(obtained), 1) for i, item in enumerate(obtained): with self.subTest(i): self.assertDictEqual(expected[i], item) - def test_validate_article_lang_with_title_only(self): - self.maxDiff = None - xml_str = """ -
- - - - Título em português - - Title in english - - - - -
- """ - xml_tree = get_xml_tree(xml_str) - - obtained = ArticleLangValidation(xml_tree).validate_article_lang() - - expected = [] - self.assertEqual(list(obtained), expected) - - def test_validate_sub_article_lang_with_title_only(self): + def test_issue_712(self): self.maxDiff = None xml_str = """ -
- - - - Título em português - - Title in english - - - - - - - - Title in english - - - +
+ + + cys + + Ciencia y Sociedad + cys + + 0378-7680 + 2613-8751 + + Instituto Tecnológico de Santo Domingo (INTEC) + + + + cys.2023.v48i4.3014 + 10.22206/cys.2023.v48i4.3014 + + + Editorial + + + + SECUELAS, SERVICIOS PÚBLICOS E IMÁGENES. TRES TEMAS PARA UN CIERRE + + + + + Ulloa Hung + Jorge + Dr. + + + Profesor Investigador + + + Profesor Investigador Instituto Tecnológico de Santo Domingo (INTEC) Director de Ciencia y Sociedad + Instituto Tecnológico de Santo Domingo (INTEC) + Profesor Investigador + Director de Ciencia y Sociedad + República Dominicana + jorge.ulloa@intec.edu.do + Página web: https://www.intec.edu.do + + + + 29 + 12 + 2023 + + 48 + 4 + 1 + 4 + + © Ciencia y Sociedad, 2023 + 2023 + + Esta obra está bajo una licencia internacional Creative Commons Atribución-NoComercial-CompartirIgual 4.0. CC BY-NC-SA + + + + + +

En este número de cierre del 2023 Ciencia y Sociedad centra su atención en tres aspectos esenciales, las secuelas de la pandemia del COVID 19, la percepción sobre servicios públicos esenciales como el transporte y los servicios de salud, y finalmente el tema de la imagen. Este último presente a través del análisis iconográfico de una de las especies animales caribeñas vinculada a momentos precolombinos y vigente dentro del universo de representación de lo americano desplegado a partir de 1492.

+

Las secuelas de la pandemia de COVID se enfocan en dos elementos centrales, el consumo de drogas y los riesgos de ruptura o separación sentimental. El primero, es abordado a partir de un estudio con alcance descriptivo-transversal sobre el impacto generado por la pandemia en la salud mental de jovénes estudiantes en diversas universidades de la región del Caribe colombiano. Esta colaboración, que constituye la apertura de la sección Articulo originales, intenta describir y comparar aspectos como la frecuencia, lugares, y circunstancias asociadas al consumo de drogas, antes y durante la pandemia dentro de la población objeto de estudio.

+

Sus resultados esenciales no solo revelan la existencia de drogas legales e ilegales en los entornos universitarios de la región estudiada, sino también su aumento sustancial debido a los cambios en la forma de vida provocados por la situación global de salud vinculada a la dispersión del COVID 19. Por otro lado, evidencian la necesidad de implementar programas de prevención y promoción de salud mental específicamente enfocados en la población juvenil universitaria de la región objeto de estudio, y en general de todo el territorio colombiano. Aspecto que entronca con la propuesta de considerar esta línea de investigación prospectiva como una constante para comprender a fondo situaciones que generen trastornos psicológicos en estudiantes universitarios, y establecer estrategias de atención integral sobre su salud emocional y mental más allá de las circunstancias específicas experimentadas durante la pandemia.

+

La segunda colaboración en este número de Ciencia y Sociedad centrada en las secuelas de la pandemia de COVID 19 tiene como objetivo identificar variables que puedan predecir de manera más eficiente el riesgo de ruptura o separación sentimental en las parejas. El estudio maneja como escenario el contexto social dominicano e intenta probar una hipótesis donde la angustia psicológica, la percepcion de equidad, el apoyo de la pareja y la satisfacción se consideran factores o variables esenciales en el riesgo percibido de separación.

+

Esta investigación desarrollada desde un enfoque cuantitativo muestra entre sus resultados más relevantes la identificación de estas cuatro variables que afectan significativamente el riesgo de separación entre los sujetos estudiados. Además, en comparación con otras investigaciones que han evaluado el riesgo de separación de pareja muestra que a pesar de existir una asociacion entre las variables estudiadas no todas tienen el mismo peso dentro de los predictores significativos de riesgo . En ese caso las dificultades en una relación antes de establecerse la cohabitación forzosa creada por la pandemia constituye un elemento central considerado. En general el modelo desarrollado por esta investigación combina un énfasis en aspectos como la satisfacción conyugal, la percepcion del riesgo de separación, el tipo de convivencia, y la cantidad de tiempo de calidad en las parejas antes de la pandemia, como predictores esenciales para pensar en la disolución de una relación a partir del detonante de las condiciones sociales atípicas impuesta por esa situacion sanitaria. Aspecto que por otro lado tributa a una discusión del rol del género en este fenómeno, sobre todo al considerar que la mayoría de la muestra vinculada al estudio estuvo compuesta por mujeres.

+

La percepción sobre los servicios públicos como tema en esta edición de Ciencia y Sociedad tiene como escenario los espacios sociales de Ecuador y México. A través de un estudio de caso que evalúa los servicios de transporte público en la ciudad de Cuenca -Ecuador, la primera de estas contribuciones realiza una medición que busca aportar a los procesos de movilización de la población, así como contribuir a mejorar las condiciones sociales, económicas y ambientales vinculadas a ese fenómeno. Desde un enfoque de investigación mixto que incluye entrevistas semiestructuradas y cuestionarios aplicados a una muestra no probabilista de diferentes actores dentro del sistema de transporte público, el estudio arroja aspectos esenciales caracterizadores de ese servicio. Un aspecto valioso de sus resultados es que fomentan una perspectiva diagnóstica que puede ser una de las bases fundamentales para un programa que garantice la movilidad eficiente, equitativa y sostenible en esta ciudad. Aspecto que como bien señalan los autores de la colaboración es imprescindible para su desarrollo económico, su cohesión y movilidad social además de la protección de su ambiente. En esencia para la mejor calidad de vida y creación de oportunidades a nivel individual y comunitario.

+

El ausentismo y la satisfacción laboral en un hospital de segundo nivel de atención en México constituye el tema de la segunda colaboración relacionada con los servicios públicos en este número de Ciencia y Sociedad. Su objetivo central es determinar la relación entre ambas variables dentro del personal vinculado a servicios de enfermería en una institución de esa naturaleza localizada en San Luis Potosí. Con alcance descriptivo- correlacional y a partir de un enfoque cuantitativo esta investigación indaga sobre las principales razones que generan ausentismo y sus vínculos con los índices de satisfacción laboral. Un aspecto que resaltar dentro de esta colaboración, al igual que en el caso anterior, es su sentido diagnóstico y predictivo, así como su aliciente o fundamento para implementar estrategias de mejora de los servicios de salud considerando la autopercepción de sus proveedores. Estrategias que a partir de los resultados obtenidos apuntan hacia factores como ambiente físico, políticas salariales y cultura laboral. Aspectos remarcables no solo para el caso estudiado, sino también para otros servicios de salud en espacios de América Latina.

+

Finalmente, dentro de la sección Artículos originales de esta entrega el estudio de las imágenes se materializa a través del análisis estético de las variantes iconográficas y el simbolismo de la llamada zarigüeya común de orejas negras (Didelphis marsupialis Linnaeus 1758). Especie animal presente en adornos cerámicos de origen indígena localizados en las Antillas Menores y Venezuela, así como dentro del corpus de impresos, descripciones e ilustraciones creados por artistas europeos. La manera en que cronistas y artistas usaron un esquema analógico comparativo para crear un nuevo concepto y mostrar algo desconocido es el aspecto central en el análisis de este artículo.

+

A través de un recorrido histórico crítico, que incluye diversos autores y formas de representación de este animal, la colaboración tiene la capacidad de definir y caracterizar diversas tendencias en cuanto a sus interpretaciones y significados. Estas tendencias no solo son propias de diferentes momentos y se vinculan a los avances en el estudio empírico y anatómico de la especie, sino que al mismo tiempo se relacionan con visiones más cercanas y objetivas o más alejadas y remotas sobre el universo americano y caribeño.

+

La acostumbrada sección de Reseñas y revisiones de libros en esta entrega final del 2023 de Ciencia y Sociedad incluye las reseñas de dos obras recientemente publicadas en el espacio editorial y académico dominicano, Miradas Desencadenantes. Construcción de conocimientos para la igualdad y Sociedades indígenas en la isla de Santo Domingo: una mirada desde las colecciones arqueológicas del Centro León.

+

La primera de estas obras fue publicada en marzo del 2023 por el Centro de Estudios de Género de INTEC y constituye el volumen número 6 de la serie “Miradas Desencadenantes” que tradicionalmente agrupa artículos presentados en el marco de las Conferencias Dominicanas de Estudios de Género organizadas por esa institución. Los artículos compilados en ese volumen incluyen una diversidad de temáticas, vivencias y experiencias que como bien anuncia la autora de la reseña tienen especial relevancia al plasmar de manera critica distintas facetas de la estratificación de género que viven las mujeres en la República Dominicana. Aspecto que convierte el volumen en una herramienta pedagógica y de construcción de pensamiento crítico desde la perspectiva de género y a su vez en un desafío para convertir los temas fundamentales abordados a través de este en parte del debate público.

+

Sociedades indígenas en la isla de Santo Domingo: una mirada desde las colecciones arqueológicas del Centro León constituye la segunda obra reseñada en esta edición de Ciencia y Sociedad e ilustra sobre una obra que tiene la capacidad de cruzar las fronteras y romper con los clichés tradicionales en la representación de estas culturas. En ella, la tradicional exotización a través de objetos extraordinarios o únicos y el aislamiento de esta parte del pasado seden lugar a una representación más compleja y al reconocimiento de una persistencia cultural a través del legado que alcanza diversas esferas de la vida social del dominicano.

+

Esta obra cuya conformación es resultado del proyecto Investigación colaborativa y capacitación basada en intercambios en gestión de colecciones, ejecutado por el Centro Cultural Eduardo León y financiado por el Fondo de Embajadores de los Estados Unidos para la Preservación de la Cultura, constituye además un rescate y valorización científica de testimonios y evidencias arqueológicas cuyos orígenes o formas de registro están marcados por el uso de prácticas poco controladas o el mero interés coleccionista. En esencia, se trata de una obra que intenta otorgar vida y reconocimiento no solo a esos artefactos a través de su estudio científico y exposición, sino también a una parte relevante de la historia y la cultura dominicana muchas veces reducida a anécdota de inicio o expresión estética de unas culturas cuya diversidad y trascendencia merece ser mejor estudiada.

+
""" xml_tree = get_xml_tree(xml_str) - obtained = ArticleLangValidation(xml_tree).validate_article_lang() + obtained = list(ArticleLangValidation(xml_tree).validate_article_lang()) - expected = [] - self.assertEqual(list(obtained), expected) + self.assertEqual(len(obtained), 0) if __name__ == '__main__':