Skip to content

Commit ec222c3

Browse files
authored
Merge pull request #142 from ARGOeu/devel
Version 1.0.5
2 parents 291ee05 + 6cffa9c commit ec222c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+32549
-915
lines changed

CITATION.cff

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: EOSC Recommender System Metrics
6+
message: A framework for evaluating EOSC Recommender System. Use of additional diagnostic metrics and visualizations offering deeper and sometimes surprising insights about the models performance.
7+
type: software
8+
authors:
9+
- given-names: Kostas
10+
family-names: Kagkelidis
11+
12+
affiliation: GRNET S.A.
13+
- given-names: Nikolaos
14+
family-names: Triantafyllis
15+
16+
affiliation: GRNET S.A.
17+
- given-names: Themis
18+
family-names: Zamani
19+
20+
affiliation: GRNET S.A.

CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment,
6+
we as contributors and maintainers pledge to making participation
7+
in our project and our community a harassment-free experience for everyone,
8+
regardless of age, body size, disability, ethnicity, gender identity and
9+
expression, level of experience, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behaviour that contributes to creating a positive environment include:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behaviour by participants include:
23+
24+
* The use of sexualised language or imagery and unwelcome sexual attention or
25+
advances
26+
* Trolling, insulting/derogatory comments, and personal or political attacks
27+
* Public or private harassment
28+
* Publishing others' private information, such as a physical or electronic
29+
address, without explicit permission
30+
* Other conduct which could reasonably be considered inappropriate in a
31+
professional setting
32+
33+
## Our Responsibilities
34+
35+
Project maintainers are responsible for clarifying the standards of acceptable
36+
behaviour and are expected to take appropriate and fair corrective action
37+
in response to any instances of unacceptable behaviour.
38+
39+
Project maintainers have the right and responsibility to remove, edit,
40+
or reject comments, commits, code, wiki edits, issues, and other contributions
41+
that are not aligned to this Code of Conduct, or to ban temporarily
42+
or permanently any contributor for other behaviours that they deem
43+
inappropriate, threatening, offensive, or harmful.
44+
45+
## Scope
46+
47+
This Code of Conduct applies both within project spaces and in public spaces
48+
when an individual is representing the project or its community.
49+
Examples of representing a project or community include using an official
50+
e-mail address, posting via an official social media account, or acting
51+
as an appointed representative at an online or offline event.
52+
53+
## Enforcement
54+
55+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
56+
reported by contacting the CESSDA Main Office at support AT cessda DOT eu.
57+
The project team will review and investigate all complaints, and will respond
58+
in a way that it deems appropriate to the circumstances.
59+
The project team is obligated to maintain confidentiality with regard to the
60+
reporter of an incident.
61+
Further details of specific enforcement policies may be posted separately.
62+
63+
Project maintainers who do not follow or enforce the Code of Conduct
64+
in good faith may face temporary or permanent repercussions as determined
65+
by other members of the project's leadership.
66+
67+
## Attribution
68+
69+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
70+
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
71+
72+
[homepage]: http://contributor-covenant.org
73+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to ARGOEU Open Source Software
2+
3+
Thank you for considering contributing to ARGOEU Open Source Software.
4+
5+
Please note that we welcome all forms of user feedback and are generally open
6+
to many forms of collaboration,
7+
but please read this document carefully before proceeding.
8+
9+
## User feedback
10+
11+
### Reporting problems
12+
13+
We welcome all feedback you may have when using any of our tools and services.
14+
15+
If you encounter a problem, please use the "Report a problem" button you find
16+
at the lower right corner of the respective tool or service
17+
and choose "Bug" as the value of the Components field.
18+
19+
### Suggesting Enhancements
20+
21+
To suggest new functionalities and possible future developments,
22+
please use the "Report a problem" button you find at the lower right corner of
23+
the respective tool or service
24+
and choose "New Feature" or "Improvement" as the value of the Components field.
25+
26+
## Contributing to the development
27+
28+
Development of all ARGOEU tools and services is aligned with our roadmap and
29+
any functional requirements we have.
30+
31+
External contributions can be accepted, if they provide functionality ARGOEU
32+
deems appropriate and are of acceptable quality.
33+
Specific requirements and criteria may apply to specific tools.
34+
35+
If you want to contribute to ARGOEU tools and services,
36+
please contact argoeu [AT] grnet.gr before proceeding.
37+
38+
### Practical matters
39+
40+
ARGOEU reserves the right to accept or reject any contribution.

Jenkinsfile

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
pipeline {
22
agent {
3-
docker {
4-
image 'node:buster'
3+
docker {
4+
image 'node:buster'
5+
}
56
}
6-
}
77
options {
88
checkoutToSubdirectory('eosc-recommender-metrics')
99
newContainerPerStage()
@@ -14,8 +14,30 @@ pipeline {
1414
GH_EMAIL = '<[email protected]>'
1515
}
1616
stages {
17-
17+
stage('Python syntax style checks') {
18+
agent {
19+
docker {
20+
image 'argo.registry:5000/python3'
21+
args '-u jenkins:jenkins'
22+
}
23+
}
24+
steps {
25+
echo 'Checking Python syntax style with flake8'
26+
sh """
27+
pipenv --python 3
28+
pipenv run pip install flake8
29+
pipenv run python -m flake8 ./
30+
pipenv --rm
31+
"""
32+
}
33+
post {
34+
always {
35+
cleanWs()
36+
}
37+
}
38+
}
1839
stage ('Deploy Docs') {
40+
1941
when {
2042
anyOf {
2143
branch 'master'

README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
# eosc-recommender-metrics
2+
23
A framework for counting the recommender metrics
34

4-
# Preprocessor v.0.2
5+
## Preprocessor v.0.2
6+
57
<p align="center">
68
<a href="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/Preprocessor.png">
79
<img src="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/Preprocessor.png" width="70%"/>
810
</a>
911
</p>
1012

11-
# RS metrics v.0.2
13+
## RS metrics v.0.2
14+
1215
<p align="center">
1316
<a href="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/RSmetrics.png">
1417
<img src="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/RSmetrics.png" width="70%"/>
1518
</a>
1619
</p>
1720

21+
## Dependencies
1822

19-
20-
21-
# Dependencies
22-
1. Install Conda from here: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html. Tested on conda v 4.10.3.
23+
1. Install Conda from [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html). Tested on conda v 4.10.3.
2324
2. Run from terminal: `conda env create -f environment.yml`
2425
3. Run from terminal: `conda activate rsmetrics`
2526
4. Run from terminal: `chmod +x ./preprocessor.py ./preprocessor_common.py ./rsmetrics.py`
2627

27-
# Usage
28+
## Usage
29+
30+
### Usage of the Batch System
2831
5. Configure `./preprocessor_common.py`, `./preprocessor.py` and `./rsmetrics.py` by editting the `config.yaml` or providing another with `-c`.
2932
6. Run from terminal: `./preprocessor_common.py` in order to gather `users` and `resources` and store them in the `Datastore`:
3033
```bash
@@ -46,10 +49,16 @@ A framework for counting the recommender metrics
4649
./rsmetrics.py -p athena # same procedure as the first one for 'athena' provider
4750
```
4851

49-
## Reporting
52+
### Usage of the Streaming System
53+
10. Run from terminal `./rs-stream.py` in order to listen to the stream for new data, process them, and store them in the `Datastore`, concerning that particular provider:
54+
```bash
55+
./rs-stream.py -a username:password -q host:port -t user_actions -d ""mongodb://localhost:27017/datastore"" -p provider_name
56+
```
5057

51-
The reporting script generates an evalutation report in html format automatically served from a spawed localserver (default: http://localhost:8080)
52-
and automatically opens the default browser to present the report.
58+
### Reporting
59+
60+
The reporting script generates an evalutation report in html format automatically served from a spawed localserver [default: localhost:8080](htpp://localhost:8080)
61+
and automatically opens the default browser to present the report.
5362

5463
To execute the script issue:
5564
```
@@ -62,7 +71,7 @@ The script will automatically look for evaulation result files in the default fo
6271

6372
The `report.py` script can be used with the `--input` parameter: a path to a folder that the results from the evaluation process have been generated (default folder:`./data`). The report script can also take an `--output` parameter: a path to an output folder where the generated report will be served automatically.
6473

65-
_Note:_ the script copies to the output folder all the necessary files such as `pre_metrics.json`, `metrics.json` as well as `report.html.prototype` renamed to `index.html`
74+
_Note:_ the script copies to the output folder all the necessary files such as `pre_metrics.json`, `metrics.json` as well as `report.html.prototype` renamed to `index.html`
6675

6776
```
6877
usage: report.py [-h] [-i STRING] [-o STRING] [-a STRING] [-p STRING]
@@ -81,9 +90,9 @@ optional arguments:
8190
Port to bind and serve the report
8291
```
8392

84-
## Utilities
93+
### Utilities
8594

86-
### Get service catalog script (./get_service_catalog.py)
95+
#### Get service catalog script (./get_service_catalog.py)
8796

8897
This script contacts EOSC Marketplace catalog and generates a csv with a list of all available services, their name, id and url
8998

@@ -93,12 +102,12 @@ chmod u+x ./get_service_catalog.py
93102
./get_service_catalog.py
94103
```
95104

96-
#### Serve Evaluation Reports as a Service
105+
##### Serve Evaluation Reports as a Service
97106

98107
The `webservice` folder hosts a simple webservice implemented in Flask framework which can be used to host the report results.
99108

100109
__Note__: Please make sure you work in a virtual environment and you have already downloaded the required dependencies by issuing
101-
`pip install -r requirements.txt`
110+
`pip install -r requirements.txt`
102111

103112
The webservice application serves two endpoints
104113
- `/` : This is the frontend webpage that displays the Report Results in a UI
@@ -122,3 +131,4 @@ You can override this by editing the `.env` file inside the `/webservice` folder
122131

123132
_Tested with python 3.9_
124133

134+

config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,4 @@ service:
2121
# and also in metrics calculations where service is considered
2222
published: true
2323

24-
# which origin to use to retrieve Resources
25-
# two options available:
26-
# - 'source': use the Connector
27-
# - 'page_map': use the EOSC Marketplace
28-
from: 'page_map' # or 'source'
29-
3024

environment.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ dependencies:
2727
- certifi==2022.12.7
2828
- charset-normalizer==2.0.12
2929
- click==8.1.3
30+
- docopt==0.6.2
3031
- flask==2.1.2
3132
- flask-pymongo==2.3.0
3233
- idna==3.3
@@ -40,7 +41,7 @@ dependencies:
4041
- pandas==1.4.2
4142
- pyarrow==10.0.1
4243
- pymongo==4.1.0
43-
- pymongoarrow==0.6.2
44+
- pymongoarrow==0.7.0
4445
- python-dateutil==2.8.2
4546
- python-dotenv==0.20.0
4647
- pytz==2022.1
@@ -49,6 +50,9 @@ dependencies:
4950
- scipy==1.8.0
5051
- six==1.16.0
5152
- soupsieve==2.3.2
53+
- stomp-py==8.1.0
5254
- urllib3==1.26.9
53-
- werkzeug==2.1.2
55+
- websocket-client==1.4.2
56+
- werkzeug==2.2.3
5457
- zipp==3.8.0
58+
- flake8==6.0.0

0 commit comments

Comments
 (0)