Skip to content

Commit 9f839ce

Browse files
jfcalvodamianpumarleiyre
authored
[FEATURE-BRANCH] feat: dataset export to the Hub (#5730)
# Description This is the feature branch with the joining efforts (UI + Backend) for the new feature allowing users to export datasets from Argilla to the HF Hub. --------- Co-authored-by: Damián Pumar <[email protected]> Co-authored-by: Leire Aguirre <[email protected]>
1 parent e3938e8 commit 9f839ce

File tree

60 files changed

+3349
-508
lines changed

Some content is hidden

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

60 files changed

+3349
-508
lines changed

.github/workflows/argilla-frontend.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
- name: Build package 📦
4949
env:
5050
# BASE_URL is used in the server to support parameterizable base root path
51-
# See scripts/build_frontend.sh
5251
BASE_URL: "@@baseUrl@@"
5352
DIST_FOLDER: ./dist
5453
run: |

.github/workflows/argilla-server.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ jobs:
8282
run: pdm install
8383

8484
- name: Run tests 📈
85+
env:
86+
HF_TOKEN_ARGILLA_INTERNAL_TESTING: ${{ secrets.HF_TOKEN_ARGILLA_INTERNAL_TESTING }}
8587
run: |
8688
ARGILLA_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/argilla
8789
ARGILLA_ELASTICSEARCH=http://localhost:9200
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@font-face {
22
font-family: "raptor_v2_premiumbold";
3-
src: url("@/assets/fonts/raptorv2premium-bold-webfont.woff2") format("woff2"),
4-
url("@/assets/fonts/raptorv2premium-bold-webfont.woff") format("woff");
3+
src: url("/fonts/raptorv2premium-bold-webfont.woff2") format("woff2"),
4+
url("/fonts/raptorv2premium-bold-webfont.woff") format("woff");
55
font-weight: normal;
66
font-style: normal;
77
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* coding=utf-8
3+
* Copyright 2021-present, the Recognai S.L. team.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/* eslint-disable */
19+
var icon = require('vue-svgicon')
20+
icon.register({
21+
'export': {
22+
width: 26,
23+
height: 31,
24+
viewBox: '0 0 26 31',
25+
data: '<path pid="0" d="M19.852 7.734L17.92 9.666l-3.463-3.463V22.86h-2.732V6.203L8.262 9.666 6.33 7.734l6.761-6.76 6.76 6.76z" _fill="#000" fill-opacity=".87"/><path pid="1" d="M3.53 28.242V14.583h5.463v-2.732H.798v19.123h24.586V11.85h-8.195v2.732h5.463v13.659H3.53z" _fill="#000" fill-opacity=".87"/>'
26+
}
27+
})

argilla-frontend/assets/icons/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ require('./discard')
1919
require('./draggable')
2020
require('./expand-arrows')
2121
require('./exploration')
22+
require('./export')
2223
require('./external-link')
2324
require('./external')
2425
require('./filter')

argilla-frontend/assets/scss/abstract/placeholders/_tooltip.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ $tooltip-border-radius: $border-radius-s;
115115
height: auto;
116116
opacity: 1;
117117
transition: opacity 0.3s ease 0.2s;
118-
z-index: 2;
118+
z-index: 3;
119119
}
120120
&:before {
121121
opacity: 1;
@@ -177,6 +177,10 @@ $tooltip-border-radius: $border-radius-s;
177177
top: auto;
178178
transform: none;
179179
}
180+
} @else if $position == "none" {
181+
&:after {
182+
display: none;
183+
}
180184
}
181185
&:before {
182186
content: none !important;

argilla-frontend/assets/scss/base/base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ body {
5454

5555
a,
5656
button {
57-
color: var(--fg-secondary);
57+
color: var(--fg-primary);
5858
}
5959

6060
audio,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import "./css/fonts.css";
2+
@import "./css/themes.css";
3+
@import "./scss/base/base.scss";

argilla-frontend/components/base/base-resizable/useResizable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const useResizable = ({ id }: { id: string }) => {
1717

1818
await debounce.wait();
1919

20-
const layout = get("layout");
20+
const layout = get<Record<string, unknown>>("layout");
2121

2222
set("layout", {
2323
...layout,

argilla-frontend/components/base/base-switch/BaseSwitch.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
<template>
1919
<div
2020
:class="{ disabled: !checked, 'disable-action': disableAction }"
21-
class="re-switch"
21+
class="switch"
2222
>
23-
<label v-if="$slots.default" :for="id || name" class="re-switch-label">
23+
<label v-if="$slots.default" :for="id || name" class="switch-label">
2424
<slot />
2525
</label>
26-
<div class="re-switch-container" @click="toggle($event)">
27-
<div class="re-switch-thumb" :style="styles">
26+
<div class="switch-container" @click="toggle($event)">
27+
<div class="switch-thumb" :style="styles">
2828
<input
2929
:id="id"
3030
type="checkbox"
@@ -33,7 +33,7 @@
3333
:value="value"
3434
tabindex="-1"
3535
/>
36-
<button :type="type" class="re-switch-holder">
36+
<button :type="type" class="switch-holder">
3737
<svgicon width="10" height="10" name="check" color="white"></svgicon>
3838
</button>
3939
</div>
@@ -120,41 +120,41 @@ export default {
120120
$switch-width: 28px;
121121
$switch-height: 11px;
122122
$switch-thumb-size: 18px;
123-
.re-switch {
123+
.switch {
124124
display: flex;
125125
align-items: center;
126126
position: relative;
127127
&.disabled {
128128
svg {
129129
display: none;
130130
}
131-
.re-switch-thumb {
131+
.switch-thumb {
132132
background-color: #f0f0f0 !important;
133133
}
134134
}
135135
&.disable-action {
136136
opacity: 0.5;
137137
pointer-events: none;
138138
cursor: default;
139-
.re-switch-thumb {
139+
.switch-thumb {
140140
background-color: var(--color-white) !important;
141141
transform: translate3d(-1px, -50%, 0px) !important;
142142
}
143143
&:active {
144-
.re-switch-thumb {
144+
.switch-thumb {
145145
transform: translate3d(50%, -50%, 0px) !important;
146146
}
147147
}
148148
}
149-
.re-switch-container {
149+
.switch-container {
150150
width: $switch-width;
151151
height: $switch-height;
152152
position: relative;
153153
border-radius: $switch-height;
154154
transition: $swift-ease-out;
155155
background-color: var(--bg-opacity-20);
156156
cursor: pointer;
157-
.re-switch-thumb {
157+
.switch-thumb {
158158
width: $switch-thumb-size;
159159
height: $switch-thumb-size;
160160
position: absolute;
@@ -168,7 +168,7 @@ $switch-thumb-size: 18px;
168168
position: absolute;
169169
left: -999em;
170170
}
171-
.re-switch-holder {
171+
.switch-holder {
172172
@include absoluteCenter;
173173
width: $switch-thumb-size;
174174
height: $switch-thumb-size;
@@ -183,9 +183,9 @@ $switch-thumb-size: 18px;
183183
}
184184
}
185185
}
186-
.re-switch-label {
186+
.switch-label {
187187
margin-right: 1em;
188-
color: var(--fg-secondary);
188+
color: var(--fg-primary);
189189
}
190190
}
191191
</style>

0 commit comments

Comments
 (0)