Skip to content

Commit

Permalink
Preparing release
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarijo committed Apr 5, 2023
1 parent 715b8ef commit dc65a14
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 10 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Publish ya2ro package to PyPi

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ __pycache__/
env_3.9/*
/.htaccess
dist/*
output/*
requirements.txt.old
Yaml Examples/*

### Python ###
# Byte-compiled / optimized / DLL files
Expand Down Expand Up @@ -151,4 +154,4 @@ dmypy.json
# Cython debug symbols
cython_debug/

.vscode
.vscode
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.9
FROM python:3.10

RUN git clone https://github.com/oeg-upm/ya2ro

RUN cd ya2ro && pip install .
RUN cd ya2ro && pip install .

RUN somef configure -a
RUN somef configure -a
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

[![DOI](https://zenodo.org/badge/407588137.svg)](https://zenodo.org/badge/latestdoi/407588137) [![Project Status: Active: The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

## Demo
## Example

Ya2ro generates Research Objects (ROs) like the following: [https://w3id.org/dgarijo/ro/sepln2022](https://w3id.org/dgarijo/ro/sepln2022). Given a few ROs, `ya2ro` can also create a landing page:
<https://oeg-upm.github.io/ya2ro/output/landing_page.html>

## Requirements
The latest version of ya2ro works in Python 3.10.

## Installation

To run ya2ro, please follow the next steps:
Expand Down Expand Up @@ -50,8 +54,9 @@ If you move any files produced by ya2ro into `/out`, then you will be able to se

### Configure

Before running ya2ro, you must configure it appropriately. Please add your personal token in ya2ro properties file.
--> ~/ya2ro/src/ya2ro/resources/properties.yaml <--
Before running ya2ro, you must configure it appropriately. Please add your GitHub personal token in ya2ro properties file. This needed if you want `ya2ro` to extract your software metadata automatically. The file can be found at:

`--> ~/ya2ro/src/ya2ro/resources/properties.yaml <--`

Add a line like the following:

Expand All @@ -60,7 +65,7 @@ Add a line like the following:
GITHUB_PERSONAL_ACCESS_TOKEN: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
ya2ro will continue working if not configured, but is highly recommended to apply this setting.
ya2ro will work if this is not configured, but is highly recommended to apply this setting, as the GitHub API has restricted access.
### Test ya2ro installation
Expand Down Expand Up @@ -145,3 +150,6 @@ WARNING: Software cards will no longer work on github links. Therefore you will
ya2ro offers the option to create a landing page where all the resources produced are easily accessible. Just indicate the folder where this resources are, for example:

`ya2ro -l output`

## Documentation
Please have a look at our [documentation](Documentation.md) to know which metadata fields are supported by `ya2ro`.
15 changes: 15 additions & 0 deletions properties.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
#-----------------------------
# file_descriptor: "file_name"
#-----------------------------
input_to_vocab_yaml: "resources/input_to_vocab.yaml"
template_html: "resources/template.html"
template_help: "resources/help.html"
template_landing: "resources/landing_page.html"
output_html: "ro-crate-preview.html"
output_html_help: "help.html"
output_html_landing: "landing_page.html"
output_jsonld: "ro-crate-metadata.json"
htaccess: "resources/.htaccess"
default_author_img: default_author.jpg
GITHUB_PERSONAL_ACCESS_TOKEN: # ADD here your GitHub persnoal access token
4 changes: 2 additions & 2 deletions src/ya2ro/resources/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
template_html: "resources/template.html"
template_help: "resources/help.html"
template_landing: "resources/landing_page.html"
output_html: "index-en.html"
output_html: "ro-crate-preview.html"
output_html_help: "help.html"
output_html_landing: "landing_page.html"
output_jsonld: "ro-crate-metadata.json"
htaccess: "resources/.htaccess"
default_author_img: default_author.jpg
style: "dark"
GITHUB_PERSONAL_ACCESS_TOKEN: # ADD here your GitHub persnoal access token
GITHUB_PERSONAL_ACCESS_TOKEN: # ADD here your GitHub persnoal access token
20 changes: 20 additions & 0 deletions templates/sample_links_DG.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Mandatory field
type: "paper"

title: "Work done in SOSEN"

datasets:
- doi: https://doi.org/10.6084/m9.figshare.14916684.v1
- doi: https://doi.org/10.5281/zenodo.5139550

software:
- link: https://github.com/KnowledgeCaptureAndDiscovery/somef

bibliography:
- https://dx.doi.org/10.1109/BigData47090.2019.9006447

authors:
# Alternative way if participant has an ORCID
-
orcid: http://orcid.org/0000-0003-0454-7145
role: "Supervisor"

0 comments on commit dc65a14

Please sign in to comment.