Skip to content

Commit b01a025

Browse files
authored
Merge pull request #227 from ARGOeu/devel
Version 3.0.0
2 parents f22d9ea + 677980a commit b01a025

Some content is hidden

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

66 files changed

+10103
-15645
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pipeline {
22
agent {
33
docker {
4-
image 'node:buster'
4+
image 'node:18-buster'
55
}
66
}
77
options {
@@ -82,4 +82,4 @@ pipeline {
8282
}
8383
}
8484
}
85-
}
85+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2022 National Infrastructures for Research and Technology - GRNET S.A.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Recommender Metrics Framework
22
A framework for generating statistics, metrics, KPIs, and graphs for Recommender Systems
3+
<a href="https://eu.badgr.com/public/assertions/YWmU9yPvQxumUgd1vnPPSw">
4+
<img src="https://api.eu.badgr.io/public/assertions/YWmU9yPvQxumUgd1vnPPSw/image" width="4%"/>
5+
</a>
36

47
<p align="center">
58
<a href="https://github.com/ARGOeu/eosc-recommender-metrics/blob/ec222c3090892f33056086b8d30c18f713da519d/website/docs/static/img/flow.png">
@@ -55,8 +58,13 @@ A framework for generating statistics, metrics, KPIs, and graphs for Recommender
5558
./rsmetrics.py -p athena # same procedure as the first one for 'athena' provider
5659
```
5760

61+
10. A typical `rsmetrics.py` command for a monthly report, would be:
62+
```bash
63+
./rsmetrics.py -p provider -s $(date +"%Y-%m-01") -e $(date +"%Y-%m-%d") -t "$(date +"%B %Y")"
64+
```
65+
5866
### Usage of the Streaming System
59-
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:
67+
11. 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:
6068
```bash
6169
./rs-stream.py -a username:password -q host:port -t user_actions -d ""mongodb://localhost:27017/datastore"" -p provider_name
6270
```
@@ -157,4 +165,30 @@ You can override this by editing the `.env` file inside the `/webservice` folder
157165

158166
_Tested with python 3.9_
159167

168+
#### Monitor for entries in the MongoDB collections
169+
A typical example that counts the documents found in `user_actions`, `recommendations`, and `resources` for 1 day ago would be:
170+
```bash
171+
./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')"
172+
```
173+
174+
E-mail send over SMTP for the above example:
175+
```bash
176+
./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --email "smtp://server:port" sender@domain recipient1@domain recipient2@domain
177+
178+
```
179+
180+
#### Export Capacity information for entries in the MongoDB collections
181+
A typical example that counts the documents found in `user_actions`, `recommendations`, and `resources` for 1 year ago would be:
182+
```bash
183+
./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --capacity
184+
```
185+
which will return results in CSV format of `year,month,user_actions,recommendations`
186+
187+
Additionally, capacity can be plotted:
188+
189+
```bash
190+
./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --capacity --plot
191+
```
160192

193+
## Deployment docs
194+
Installation and configuration documents can be found [here](docs).

config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
providers:
55
- name: marketplace_rs
66
db: "mongodb://localhost:27017/recommender_dev"
7-
- name: athena
7+
- name: content-based engine
88
db: "mongodb://localhost:27017/athena_dev"
99
- name: online_engine
1010
db: ""
@@ -17,12 +17,12 @@ service:
1717
# Use the EOSC-Marketplace webpage
1818
# to retrieve resources and associate the page_id and the service_id
1919
store: './page_map' # or null
20-
service_list_url: 'https://localhost/replace/with/remote/example'
20+
service_list_url: 'https://search.marketplace.eosc-portal.eu/api/web/search-results'
2121
# if true it keeps only published, otherwise all
2222
# this has an effect in exporting when from is set to 'source'
2323
# and also in metrics calculations where service is considered
2424
published: true
2525
category:
26-
athena: [service]
26+
content-based engine: [service]
2727
marketplace_rs: [service]
2828
online_engine: [training, data_source]

docs/ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Licence
2+
3+
<! --- SPDX-License-Identifier: CC-BY-4.0 -- >
4+
5+
## Change Log
6+
7+
- Initial version of this documentation.

0 commit comments

Comments
 (0)