MaRDI4NFDI / swMATH4EOSC

0 stars 1 forks source link

Creating an API to enrich the swmath data with software metadata (descriptions, keywords , articles citing the softwares, swMATH id, etc...) to have a suitable data with the cooperation with Softwareheritage #7

Closed Shirazos7 closed 9 months ago

Shirazos7 commented 1 year ago

This issue contatins 3 parts :

1.mapping of our swmath data with codemeta 2.making an xml body for our data 3.swmath and Datacite

Mapping the Swmath Database

first word is from the swmath database and the second one is the referrence for it in code meta swmath_article Table Authors : Author Authors : Given Name Authors : Family Name Source : Coyrightyear source : Datecreated Source : Name Source : Datepublished Remarks : Description

Swmath_Software Table

Name : Name Authors : Author Authors : Given Name Authors : Family Name Homepage : Citation Description : Description Keywords : Keywords Areas_of_applictation : applicationCategory WWW_Link : relatedLink programming_languages : programmingLanguage Operating_systems : oeratingSystem last_modified : dateModifed keyw_csv : Keywords Github : codeRepository

Note Some columns in the swmath database contain too many informations that could be repeatedly used with codemeta Terms.

Shirazos7 commented 1 year ago

Deposit metadata

This is only a sample for dempositing the software Metadata into the SWH Archive
I used the data of the sagemath software just to demonstarte a sample

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="https://www.sagemath.org/" xmlns:codemeta="citation"    xmlns:schema="http://schema.org/"xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit">
<id>hal-123456</id>
<swh:deposit>
 <swh:reference>
  <swh:object swhid="swh:1:dir:aec783545aa45f9d5deb27e48d35db740c859e58;origin=https://github.com/sagemath/sage;visit=swh:1:snp:52c1ff372318aa4a65642158a196d6b1b0387c35;anchor=swh:1:rel:4e07cabf02428b6c7a31d6df923b135ddeed15a6"/>
</swh:reference>
<swh:metadata-provenance>
  <schema:url>https://hal.archives-ouvertes.fr/hal-123456</schema:url>
</swh:metadata-provenance>
</swh:deposit>
<author>
<name>Release Manager</name>
<email>release@sagemath.org</email>
</author>
<codemeta:name>Sagemath</codemeta:name>
<codemeta:description>Creating a viable free open source alternative to Magma, Maple,  Mathematica and Matlab</codemeta:description>
 <codemeta:dateCreated>"10.06.2023"</codemeta:dateCreated>
 <codemeta:datePublished>"11.06.2023"</codemeta:datePublished>  
 <codemeta:license>
 <codemeta:name>GNU Lesser General Public License v3.0 or later</codemeta:name>
 </codemeta:license>
 <schema:identifier>
 <codemeta:type>schema:PropertyValue</codemeta:type>
 <schema:propertyID>HAL-123456</schema:propertyID>
 <schema:value>hal-123456</schema:value>
 </schema:identifier>

  <codemeta:applicationCategory>info.info-cg</codemeta:applicationCategory>
 <codemeta:applicationCategory>info.info-dm</codemeta:applicationCategory>
 <codemeta:applicationCategory>info.info-gr</codemeta:applicationCategory>
 <codemeta:applicationCategory>info.info-ti</codemeta:applicationCategory>
 <codemeta:keywords> Magma, Maple, Mathematica and Matlab</codemeta:keywords>
 <codemeta:codeRepository>https://github.com/sagemath/sage</codemeta:codeRepository>
 <codemeta:relatedLink>https://www.sagemath.org/</codemeta:relatedLink>
 <codemeta:programmingLanguage>c++</codemeta:programmingLanguage>
  <codemeta:programmingLanguage>R</codemeta:programmingLanguage>
  <codemeta:programmingLanguage>Python</codemeta:programmingLanguage>
<codemeta:operatingSystem>Linux, Mac OS, Windows subsystem for linux</codemeta:operatingSystem>
<codemeta:version>10.1.Beta3</codemeta:version>
<codemeta:softwareVersion>10.1.Beta3</codemeta:softwareVersion>
<codemeta:dateModified>2023-06-11</codemeta:dateModified>
<codemeta:developmentStatus>Active</codemeta:developmentStatus>
<codemeta:author>
<codemeta:name>Release-Manager</codemeta:name>
  </entry>

Note This sample is not completely perfect but it is just made to demonstrate how our data are going to be included in the XML Body in order to deposit them into SWH Archive

Shirazos7 commented 1 year ago

This example is for sage math and could be edited and modified i am making it just to demonstrate , in order to make a discussion with you : how could we engage our efforts to make it possible swmath -> codemeta and swmath -> datacite knowing that all of this mentioned parties are also related and connected to our cooperation with SWH

10.5072/sagemath-software-10.1 **there are many types to identify the softwares based on there functionality , Maths , Physics , geology , astronomy , biology etc.... i was hesitating to choose between DOI or arXiv** **and we should add the names once per each creator regarding to the property** **here we can add as much as its needed , May be a corporate/institutional** Laurent */ **or personal name. Note: DataCite** **infrastructure supports up to** **10,000 names. For name lists** **above that size, consider** **attribution via linking to the** **related metadata , nameType could be for personal or organizational by default its personal** */ 0000-0002-2997-2175 // just as example /* (with optional given name, family name, name identifier and affiliation sub-properties */ William ,Stein David ,Joyner David ,Kohel John ,Cremona Eröcal, Burçin Code supporting "free open-source mathematics software system creates a viable free open source alternative to Magma, Maple, Mathematica and Matlab." // title of the software : it has a sub property Title (with optional type sub-properties) titleType : AlternativeTitle Subtitle TranslatedTitle ( title is mandatory and the sub property is optionial ) Philadelphia, PA: Society for Industrial and Applied Mathematics (SIAM) Repository /* note : For software, use Publisher for the code repository. If there is an entity other than a code repository, that "holds, archives, publishes, prints, distributes, releases, issues, or produces" the code, use the property Contributor/contributorType/ hostingInstitution for the code repository */ 2019 UHRMS ESI APPI Environmental samples direct infusion Orbitrap /* we are using here the property contributor hostingInstitution for the code repository */ Philadelphia, PA: Society for Industrial and Applied Mathematics (SIAM) Repository /* we have 7 types in Datacite for the date of Data issued means : The date that the resource is published or distributed, e.g., to a data center and available means : The date the resource is made publicly available. May be a range */ 2023-06-21 2023-06-21 // this is the date of the newest version of sagemath on SWH which I added en Software arXiv:10.5072/Sagemath-software-10.1.beta4 arXiv:10.5072/Sagemath-software-10.1.beta4 application/ld+json /* Technical format of the resource : Use file extension or MIME type where possible, e.g., PDF, XML, MPG or application/pdf, text/xml, video/mpeg. */ 10.1.beta4 /* **Use the complete title of a** **license and include version** **information if applicable.** **May be used for software** **licenses** */ /* **in this link we can see the different kinds of license or identifires : A short, standardized version of** **the license name** */ /* **GNU Public license , SPDX : The name of the scheme** */ /* **The URI of the license** */ /* If Description is used, descriptionType is mandatory */ Sage (SageMath) is free, open-source math software that supports research and teaching in algebra, geometry, number theory, cryptography, numerical computation, and related areas /* **Abstract is : The type of the Description , there are many kinds of descriptions in Datacite , Abstract means A brief description of the** **resource and the context in** **which the resource was** created. */ **/* Technicalinfo is another type also : For software description, this may include the contents of** **a “readme.txt” and necessary environmental information** **(hardware, operational software, applications/programs** **with version information, a human-readable synopsis of */** Both the Sage development model and the technology in Sage itself are distinguished by an extremely strong emphasis on openness, community, cooperation, and collaboration: we are building the car, not reinventing the wheel. The overall goal of Sage is to create a viable, free, open-source alternative to Maple, Mathematica, Magma, and MATLAB. Computer algebra system (CAS). Your Advices and opinions would be highly appreciated .
physikerwelt commented 1 year ago

@Shirazos7 can you post this sample to the SWH API? What is the reply?

Shirazos7 commented 1 year ago

I tried to deposit this xml but i got this reply : WARNING:swh.deposit.cli.client:A '' should be provided for a metadata-only deposit

ERROR:swh.deposit.cli.client:Problem during parsing options: Service document retrieval: invalid_grant: Invalid user credentials

it seems like i need to contact the team of SWH again to make sure if i can actually deposit the meta data

Here is the xml body that i tried to deposit

 <?xml version="1.0" encoding="utf-8"?>
 <atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0"
  xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit">
 <swh:deposit>
 <swh:reference>
 <swh:object swhid="swh:1:dir:500b119245ce3306135474e07f01fa0119297f40;
     origin=https://github.com/sagemath/sage;
     visit=swh:1:snp:bfd30969bf890628eeb6d8016d883882bb0c36cb;
     anchor=swh:1:rev:853d07099ce6b4dce3aab2d690111a07034adee9"/>
 </swh:reference>
 </swh:deposit>
 <codemeta:id>825</codemeta:id>
<codemeta:url>https://www.sagemath.org/</codemeta:url>
<codemeta:identifier>arXiv</codemeta:identifier>
<codemeta:applicationCategory>software</codemeta:applicationCategory>
<codemeta:description>Sage (SageMath) is free, open-source math software that supports research and teaching in algebra, geometry, number theory, c><codemeta:keywords>orms</codemeta:keywords>
<codemeta:keywords>Python</codemeta:keywords>
<codemeta:keywords>Cython</codemeta:keywords>
<codemeta:keywords>Sage</codemeta:keywords>
<codemeta:keywords>Open Source</codemeta:keywords>
<codemeta:keywords>Interfaces</codemeta:keywords>
<codemeta:dateCreated>2023-07-01</codemeta:dateCreated>
<codemeta:datePublished>2023-07-10</codemeta:datePublished>
<codemeta:releaseNotes>the most recent version of sagemath software </codemeta:releaseNotes>
<codemeta:operatingSystem>Macos , Linux , windows use subsystem for linux  </codemeta:operatingSystem>
<codemeta:softwareRequirements>GNU Compiler , Python3 , GCC , PARI/GP , MPFR </codemeta:softwareRequirements>
<codemeta:softwareVersion>10.1.beta5</codemeta:softwareVersion>
<codemeta:developmentStatus>active</codemeta:developmentStatus>
<codemeta:license>
<codemeta:name>GNU Lesser General Public License v3.0 or later</codemeta:name>
<codemeta:url>url spdx</codemeta:url>
</codemeta:license>
<codemeta:author>
<codemeta:name>
<codemeta:givenName>William</codemeta:givenName>
<codemeta:familyName>Stein</codemeta:familyName>
<codemeta:givenName>David </codemeta:givenName>
<codemeta:familyName>Joyner</codemeta:familyName>
<codemeta:givenName> David</codemeta:givenName>
<codemeta:familyName>Kohel</codemeta:familyName>
<codemeta:givenName> John</codemeta:givenName>
<codemeta:familyName>Cameron</codemeta:familyName>
<codemeta:givenName> Eröcal</codemeta:givenName>
<codemeta:familyName>Burçin</codemeta:familyName>
</codemeta:name>
</codemeta:author>
<codemeta:codeRepository>https://github.com/sagemath/sage</codemeta:codeRepository>
<codemeta:programmingLanguage> C </codemeta:programmingLanguage>
<codemeta:programmingLanguage> C++ </codemeta:programmingLanguage>
<codemeta:programmingLanguage> Python </codemeta:programmingLanguage>
</atom:entry>
physikerwelt commented 1 year ago

It seems your credentials are wrong. You can check the email conversation and try to understand if either your password is incorrect, you have insufficient rights or the content is incorrect. I suggest you try upload the file that worked for me first.

Shirazos7 commented 1 year ago

i tried to deposit the xml file that you deposited <entry xmlns="http://www.w3.org/2005/Atom" xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit" xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0"

Verifiable online voting system Belenios Test User

i still receive the same error , perhaps i should contact the SWH team to check my credentials. or my rights

Mazztok45 commented 1 year ago
https://hal.archives-ouvertes.fr/hal-04083347 It seems your xml file does not contain an element like this one See : https://hedgedoc.softwareheritage.org/FAIRCORE4EOSC-metadata-template#
physikerwelt commented 1 year ago

@Shirazos7 maybe ask if they did also apply all the steps they did for physikerwelt for the swmath user

@Mazztok45 the following XML file

<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit"
xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0"
        >
              <title>Verifiable online voting system</title>
       <codemeta:author>
     <codemeta:name>Belenios Test User</codemeta:name>
   </codemeta:author>
   <swh:deposit>
     <swh:reference>
       <swh:object
swhid="swh:1:dir:36c9d218b7b0d6048fc953598127b58988d30732" />
     </swh:reference>
   </swh:deposit>
</entry>

worked for me, why should it not work for @Shirazos7

Mazztok45 commented 1 year ago

@physikerwelt you are right. Regarding the documentation, it seems strange it could work for you. @Shirazos7 please contact the SWH team to ask for help on your deposit trial.

Mazztok45 commented 9 months ago

Shiraz could properly deposit the codemeta.json file on the SWH deposit-only stagging server.