oeg-upm / ya2ro

Python package designed to create Research Objects out of simple YAML files. Given the dataset dois, source code links and author DOIs, ya2ro will generate an HTML representation of the aggregated contents, as well as an RO-Crate with the machine-readable representation of the Research Object
Apache License 2.0
4 stars 1 forks source link

Error when running with somef #56

Closed dgarijo closed 1 year ago

dgarijo commented 1 year ago

The model card does not work anymore in Python 3.9. I am getting this error:

Traceback (most recent call last):
  File "/home/dgarijo/miniconda3/envs/env_ya2ro/bin/ya2ro", line 8, in <module>
    sys.exit(main())
  File "/home/dgarijo/Documents/GitHub/ya2ro/src/ya2ro/ya2ro.py", line 71, in main
    process_yaml(args.input)
  File "/home/dgarijo/Documents/GitHub/ya2ro/src/ya2ro/ya2ro.py", line 112, in process_yaml
    rhtml.load_data(data)
  File "/home/dgarijo/Documents/GitHub/ya2ro/src/ya2ro/ro_html.py", line 62, in load_data
    self.func_attr_init[attr_name](attr_val)
  File "/home/dgarijo/Documents/GitHub/ya2ro/src/ya2ro/ro_html.py", line 378, in init_software
    software_cards_soca += card_html_view(self.data.output_directory_datafolder ,s.metadata,embedded=True)
  File "/home/dgarijo/miniconda3/envs/env_ya2ro/lib/python3.9/site-packages/soca/commands/portal/card.py", line 72, in html_view
    <div class="description">{md.html_description()}{md.modal(title = md.title(), body = md.html_description())}</div>
  File "/home/dgarijo/miniconda3/envs/env_ya2ro/lib/python3.9/site-packages/soca/commands/portal/metadata.py", line 57, in html_description
    return f'<span>{mistune.html(self.description())}</span>'
AttributeError: module 'mistune' has no attribute 'html'
dgarijo commented 1 year ago

YAML used as input:

# Mandatory field
type: "paper"

doi_paper: https://doi.org/10.1007/978-3-031-17105-5_2

title: "Extending Ontology Engineering Practices to Facilitate Application Development"

summary: "Ontologies define data organization and meaning in Knowledge Graphs (KGs). However, ontologies have generally not been taken into account when designing and generating Application Programming Interfaces (APIs) to allow developers to consume KG data in a developer-friendly way. To fill this gap, this work proposes a method for API generation based on the artefacts generated during the ontology development process. This method is described as part of a new phase, called ontology exploitation, that may be included in the last stages of the traditional ontology development methodologies. Moreover, to support some of the tasks of the proposed method, we developed OATAPI, a tool that generates APIs from two ontology artefacts: the competency questions and the ontology serialization. The conclusions of this work reflect that the limitations found in the state-of-the-art have been addressed both at the methodological and tooling levels for the generation of APIs based on ontology artefacts. Finally, the lines of future work present several challenges that need to be addressed so that the potential of KGs and ontologies can be more easily exploited by application developers."

datasets:
  -
    doi: https://doi.org/10.5281/zenodo.6637675

software:
  -
    link: https://github.com/oeg-upm/oatapi

authors:
  -
    name: "Paola Espinoza-Arias"
    position: "Postdoctoral Researcher"
    description: "Universidad Politécnica de Madrid."

  -
    name: "Daniel Garijo"
    position:: "Distinguished Researcher"
    description: "Universidad Politécnica de Madrid."
  -
    name: "Oscar Corcho"
    position: "Full professor"
    description: "Universidad Politécnica de Madrid."
dgarijo commented 1 year ago

It's supposed to be fixed now

dgarijo commented 1 year ago

Fixed, tested