diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0f8568e7..7adf053d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,21 +1,5 @@ version: 2 updates: - # Fetch and update latest `npm` packages - - package-ecosystem: npm - directory: '/' - schedule: - interval: daily - time: '00:00' - open-pull-requests-limit: 10 - target-branch: 'develop-2' - reviewers: - - dominikbruechner - assignees: - - dominikbruechner - commit-message: - prefix: fix - prefix-development: chore - include: scope # Fetch and update latest `github-actions` pkgs - package-ecosystem: github-actions directory: '/' diff --git a/components/Widgets/ChartBoxplotVizWrapper.spec.js b/components/Widgets/ChartBoxplotVizWrapper.spec.js new file mode 100755 index 00000000..277e9dc2 --- /dev/null +++ b/components/Widgets/ChartBoxplotVizWrapper.spec.js @@ -0,0 +1,40 @@ +import { shallowMount } from '@vue/test-utils'; +import ChartBoxplotVizWrapper from './ChartBoxplotVizWrapper.vue'; + +const factory = () => { + return shallowMount(ChartBoxplotVizWrapper, { + ...createComponentMocks({}), + propsData, + }); +}; + +const propsData = { id: 'OEBD01000000Q2' }; + +describe('ChartBoxplotVizWrapper', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + it('is instantiated', () => { + const wrapper = factory(); + expect(wrapper).toBeTruthy(); + }); + + /* it('should match snapshot', () => { + const wrapper = factory(); + expect(wrapper.html()).toMatchSnapshot(); + }); */ + + /* it('is calls loadBoxplotVisualization after mount', () => { + const wrapper = factory(); + expect(wrapper).toBeTruthy(); + expect(loadBoxplotVisualization).toHaveBeenCalled(); + }); */ + + /* it('sets the apiUrl according to SCIENTIFIC_SERVICE_URL env var', () => { + const wrapper = factory(); + expect(wrapper.vm.$data.apiUrl).toBe( + 'https://openebench.bsc.es/api/scientific/widget/box-plot/OEBD01000000Q2?log2=true' + ); + }); */ +}); diff --git a/components/Widgets/ChartBoxplotVizWrapper.vue b/components/Widgets/ChartBoxplotVizWrapper.vue new file mode 100755 index 00000000..9836948f --- /dev/null +++ b/components/Widgets/ChartBoxplotVizWrapper.vue @@ -0,0 +1,63 @@ + + + diff --git a/nuxt.config.js b/nuxt.config.js old mode 100644 new mode 100755 index 95797f49..58f8e91e --- a/nuxt.config.js +++ b/nuxt.config.js @@ -38,6 +38,13 @@ export default { { name: 'format-detection', content: 'telephone=no' }, ], link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], + script: [ + { + hid: 'stripe', + src: 'https://cdn.plot.ly/plotly-latest.min.js', + defer: true, + }, + ], }, // Global CSS: https://go.nuxtjs.dev/config-css @@ -146,7 +153,8 @@ export default { process.env.OBSERVATORY_URI || 'https://observatory.openebench.bsc.es', SCIENTIFIC_SERVICE_URL: process.env.SCIENTIFIC_SERVICE_URL || - 'https://dev-openebench.bsc.es/api/scientific', + // 'https://dev-openebench.bsc.es/api/scientific', + 'https://openebench.bsc.es/api/scientific', BENCH_EVENT_API_URL: process.env.BENCH_EVENT_API_URL || 'https://dev-openebench.bsc.es/rest/bench_event_api', diff --git a/pages/benchmarking/_community/_id.spec.js b/pages/benchmarking/_community/_id.spec.js old mode 100644 new mode 100755 diff --git a/pages/benchmarking/_community/_id.vue b/pages/benchmarking/_community/_id.vue old mode 100644 new mode 100755 index c3fb01d5..abafb3c2 --- a/pages/benchmarking/_community/_id.vue +++ b/pages/benchmarking/_community/_id.vue @@ -12,32 +12,69 @@

{{ challenge.name }}

-

- In this 2D plot two metrics from the challenge - {{ challenge.acronym }} are represented in the X and Y axis, showing the - results from the participating tools in this challenge. The gray line - represents the pareto frontier, which runs over the participants tools, - showing the best efficiency, while the arrow in the plot represents the - optimal corner. -

- - The menu button above the diagram can be used to switch between the - different classification methods / visualization modes (Square - Quartiles; Diagonal Quartiles, and k-means Clustering). - +
+

+ In this 2D plot two metrics from the challenge + {{ challenge.acronym }} are represented in the X and Y axis, showing + the results from the participating tools in this challenge. The gray + line represents the pareto frontier, which runs over the participants + tools, showing the best efficiency, while the arrow in the plot + represents the optimal corner. +

+

+ In this box-plot, the single metric of the challange + {{ challenge.acronym }} is represented as a boxplot on the Y axis, + showing the results for each of the participating tools. +

+

+ Warning: Outliers are not shown at the moment. +

+ + The menu button above the diagram can be used to switch between the + different classification methods / visualization modes (Square + Quartiles; Diagonal Quartiles, and k-means Clustering). + {{ datasets[0].datalink.inline_data.visualization.type }} + +
-
-

+
+

Choose the metrics you want to visualize in the diagram:

- + {{ - item.datalink.inline_data.visualization.type == '2D-plot' + item.datalink.inline_data.visualization.type === '2D-plot' ? item.datalink.inline_data.visualization.x_axis + ' + ' + item.datalink.inline_data.visualization.y_axis @@ -72,7 +109,17 @@ :metric-name="item.datalink.inline_data.visualization.metric" class="mt-5" /> + + +
@@ -83,10 +130,15 @@ import { mapGetters } from 'vuex'; import ChartBarplotVisualizerWrapper from '~/components/Widgets/ChartBarplotVisualizerWrapper'; import ChartScatterVisualizerWrapper from '~/components/Widgets/ChartScatterVisualizerWrapper'; +import ChartBoxplotVizWrapper from '~/components/Widgets/ChartBoxplotVizWrapper.vue'; export default { name: 'CommunityParticipantPage', - components: { ChartBarplotVisualizerWrapper, ChartScatterVisualizerWrapper }, + components: { + ChartBarplotVisualizerWrapper, + ChartScatterVisualizerWrapper, + ChartBoxplotVizWrapper, + }, data() { return { hostName: this.$config.OEB_LEGACY_ANGULAR_URI, diff --git a/stories/Widgets/CharBoxplotVizWidget.stories.js b/stories/Widgets/CharBoxplotVizWidget.stories.js new file mode 100755 index 00000000..fa4f30fe --- /dev/null +++ b/stories/Widgets/CharBoxplotVizWidget.stories.js @@ -0,0 +1,20 @@ +import ChartBoxplotVizWrapper from '~/components/Widgets/ChartBoxplotVizWrapper'; + +export default { + title: 'Widgets/ChartBoxplotVizWrapper', +}; + +export const ChartBoxplotViz = (_args, { argTypes }) => ({ + components: { ChartBoxplotVizWrapper }, + props: Object.keys(argTypes), + template: ` +
+

Info: Reload page after changing the ID below.

+ +
+ `, +}); + +ChartBoxplotViz.args = { + id: 'OEBD0100000013?log2=true', +};