Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 230822 #816

Merged
merged 24 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
025a29d
[CVAT][Recording Oracle] Add first set of agreement measures (#757)
simulacrum6 Aug 8, 2023
a9e39ba
Job Launcher - Refactor auth (#740)
portuu3 Aug 9, 2023
3e002dd
[Job Launcher] Added payment link logic (#762)
eugenvoronov Aug 11, 2023
f465b7e
patch solved tasks for july (#767)
m00n620 Aug 11, 2023
268f168
[CVAT][Recording Oracle] Github workflow (#774)
flopez7 Aug 14, 2023
e20a55d
[CVAT][Recording Oracle] Integration tests for cron jobs (#773)
flopez7 Aug 14, 2023
0c89a03
[CVAT][Exchange Oracle] Integration tests for cron jobs (#764)
flopez7 Aug 14, 2023
e46a445
[Job Launcher] Add sendgrid mail service (#738)
leric7 Aug 14, 2023
2d26f8f
[Snyk] Security upgrade node from 16.15.0-alpine3.14 to 18.1-alpine3.…
basit511 Aug 15, 2023
fd0d9a0
use area chart for solved tasks in escrow dashboard (#780)
m00n620 Aug 15, 2023
a490016
[Job Launcher] Added testnet and mainnet setup (#763)
eugenvoronov Aug 15, 2023
a8f9e5b
Bump protobufjs from 6.11.3 to 6.11.4 (#785)
dependabot[bot] Aug 16, 2023
7beafd6
[CVAT][Exchange Oracle] Refactor structure (#787)
flopez7 Aug 16, 2023
d5e9c03
[Job launcher] Fixed auth (#793)
eugenvoronov Aug 17, 2023
065f1a9
fix balance calculation and tests (#796)
portuu3 Aug 18, 2023
51ac690
[CVAT][Recording Oracle] Add Inter Rater Agreement Measures to Record…
simulacrum6 Aug 18, 2023
e8db754
[Subgraph] New schema implementation (#728)
leric7 Aug 18, 2023
60ecff3
[Recording Oracle] - Refactored (#732)
eugenvoronov Aug 21, 2023
00d2a69
[CVAT][Recording Oracle] Refactor structure (#798)
flopez7 Aug 21, 2023
9714620
Add upload encrypted files functionality
alidzm Aug 9, 2023
503d071
EscrowConfig can skip manifest URL validation
alidzm Aug 21, 2023
e046eb5
[CVAT][AGREEMENT] Add property tests for agreement measures. (#801)
simulacrum6 Aug 22, 2023
96ca12a
allow manual subgraph deployment (#804)
leric7 Aug 22, 2023
8258f18
Merge pull request #809 from humanprotocol/upload-encrypted-file
alidzm Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 8 additions & 41 deletions .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,84 +8,51 @@ on:
- packages/sdk/typescript/subgraph/**
- .github/workflows/cd-subgraph.yaml
workflow_dispatch:
inputs:
subgraph-name:
description: 'subgraph name'
required: true

jobs:
contracts-check:
runs-on: ubuntu-latest
outputs:
contracts_updated: ${{ steps.filter.outputs.contracts }}
steps:
- uses: actions/checkout@v3
- name: Check changes in files
uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
contracts:
- 'packages/core/contracts/**'
subgraph:
name: Deploy Subgraph
environment: deploy-subgraph
needs: contracts-check
runs-on: ubuntu-latest
strategy:
matrix:
network:
- name: matic
graph: polygon-v1
graph: polygon-v2
- name: goerli
graph: goerli-v1
graph: goerli-v2
- name: moonbeam
graph: moonbeam-v1
graph: moonbeam-v2
- name: bsc
graph: bsc-v1
graph: bsc-v2
- name: chapel
graph: bsctest-v1
graph: bsctest-v2
- name: mumbai
graph: mumbai-v1
graph: mumbai-v2
- name: mbase
graph: moonbase-alpha-v1
graph: moonbase-alpha-v2
- name: mainnet
graph: mainnet-v1
graph: mainnet-v2
fail-fast: true
max-parallel: 3
if: ${{ needs.contracts-check.outputs.contracts_updated != 'true' || github.event.inputs.subgraph-name }}
steps:
- uses: actions/checkout@v3
- name: Continue check
id: continue_check
run: |
if [[ ${{ needs.contracts-check.outputs.contracts_updated}} == 'true' && "${{ github.event.inputs.subgraph-name }}" != "${{ matrix.network.graph }}" ]]; then
echo "stop=true" >> $GITHUB_OUTPUT
fi
- run: yarn --ignore-scripts
if: ${{steps.continue_check.outputs.stop != 'true'}}
name: Install dependencies
- run: yarn build
if: ${{steps.continue_check.outputs.stop != 'true'}}
name: Build core package
working-directory: ./packages/core
- run: yarn global add @graphprotocol/graph-cli
if: ${{steps.continue_check.outputs.stop != 'true'}}
name: Install Graph CLI
- run: graph auth --product hosted-service ${API_KEY}
if: ${{steps.continue_check.outputs.stop != 'true'}}
name: Authenticate Graph CLI
env:
API_KEY: ${{ secrets.HP_GRAPH_API_KEY }}
- run: yarn generate
if: ${{steps.continue_check.outputs.stop != 'true'}}
name: Generate Subgraph
working-directory: ./packages/sdk/typescript/subgraph
env:
NETWORK: ${{ matrix.network.graph }}
- run: graph deploy --product hosted-service humanprotocol/${NETWORK}
if: ${{steps.continue_check.outputs.stop != 'true'}}
name: Deploy Subgraph
working-directory: ./packages/sdk/typescript/subgraph
env:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ci-test-cvat-recording-oracle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CVAT Recording Oracle Tests

on:
push:
paths:
- 'packages/examples/cvat/recording-oracle/**'

jobs:
cvat-exo-test:
name: CVAT Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: CVAT Recording Oracle tests
working-directory: ./packages/examples/cvat/recording-oracle
run: docker compose -f docker-compose.test.yml up --attach test --exit-code-from test
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,4 @@ build
dist

#cache
cache

#Postgres Data
db
cache
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export const NewsView = () => {
fontSize: { xs: '14px', sm: '20px', md: '24px' },
}}
color="primary"
mb={{ xs: 0, md: 6 }}
mb={2}
>
{data?.title}
</Typography>
<Typography
variant="body2"
color="primary"
maxWidth={450}
mb={5}
mb={4}
sx={{ display: { xs: 'none', md: 'block' } }}
>
{data?.description}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Box, Typography, useTheme } from '@mui/material';
import { Box, Grid, Typography } from '@mui/material';
import dayjs from 'dayjs';
import numeral from 'numeral';
import { FC } from 'react';
import { FC, useMemo } from 'react';
import {
BarChart as RechartsBarChart,
Bar,
AreaChart,
Area,
ResponsiveContainer,
Tooltip,
XAxis,
YAxis,
CartesianGrid,
} from 'recharts';

import SOLVED_TASKS from '../../history-data/sovled_tasks.json';
Expand All @@ -19,22 +21,14 @@ const CustomTooltip = ({ active, payload, label }: any) => {
<Box
sx={{
background: '#fff',
border: '1px solid rgba(218, 222, 240, 0.8)',
borderRadius: '16px',
padding: '30px 38px',
border: '1px solid #CBCFE6',
borderRadius: '10px',
padding: '8px 16px',
}}
>
<Typography color="text.primary" variant="body2" fontWeight={600}>
{dayjs(label).format('MMM YYYY')}
<Typography color="text.primary" variant="h6" fontWeight={500}>
{numeral(payload[0].value).format('0a').toUpperCase()}
</Typography>
<Box mt={2}>
<Typography color="text.primary" variant="caption" component="p">
Task Solved
</Typography>
<Typography color="text.primary" variant="h6" fontWeight={500}>
{payload[0].value}
</Typography>
</Box>
</Box>
);
}
Expand All @@ -43,71 +37,119 @@ const CustomTooltip = ({ active, payload, label }: any) => {
};

export const SolvedTasksView: FC = () => {
const theme = useTheme();
const solvedTasksCount = SOLVED_TASKS.reduce((acc, d) => acc + d.value, 0);

const qoqGrowth = useMemo(() => {
const currentTasks = SOLVED_TASKS[SOLVED_TASKS.length - 1].value;
const previousTasks = SOLVED_TASKS[SOLVED_TASKS.length - 4].value;
return numeral((currentTasks - previousTasks) / previousTasks).format('0%');
}, []);

return (
<CardContainer>
<Box
sx={{
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'space-evenly',
}}
>
<Box>
<Typography variant="body2" color="primary" fontWeight={600} mb="8px">
{`Solved Tasks till ${dayjs(
SOLVED_TASKS[SOLVED_TASKS.length - 1].date
).format('MMM D, YYYY')}`}
</Typography>
<Typography
variant="h2"
color="primary"
fontWeight={600}
lineHeight={1.125}
>
{numeral(solvedTasksCount).format('0.000 a').toUpperCase()}
</Typography>
</Box>
<Box sx={{ width: 400, height: 300 }}>
<ResponsiveContainer>
<RechartsBarChart
data={SOLVED_TASKS}
margin={{ top: 30, left: 4, right: 4 }}
<Grid container sx={{ height: '100%' }} spacing={3}>
<Grid item xs={12} lg={4}>
<Box mb={2}>
<Typography
variant="body2"
color="primary"
fontWeight={600}
mb="8px"
>
{`Solved Tasks till ${dayjs(
SOLVED_TASKS[SOLVED_TASKS.length - 1].date
).format('MMM D, YYYY')}`}
</Typography>
<Typography
variant="h2"
color="primary"
fontWeight={800}
lineHeight={1.125}
>
{numeral(solvedTasksCount).format('0.000 a').toUpperCase()}
</Typography>
</Box>
<Box>
<Typography
variant="body2"
color="secondary"
fontWeight={600}
mb="8px"
>
QoQ Growth
</Typography>
<Typography
variant="h2"
color="secondary"
fontWeight={800}
lineHeight={1.125}
>
{qoqGrowth}
</Typography>
</Box>
</Grid>
<Grid item xs={12} lg={8}>
<ResponsiveContainer width="100%" height="100%" minHeight={300}>
<AreaChart data={SOLVED_TASKS} margin={{ right: 30, bottom: 10 }}>
<defs>
<linearGradient
id="paint0_linear_4037_63345"
x1="257"
y1="0"
x2="257"
y2="276.5"
gradientUnits="userSpaceOnUse"
>
<stop
offset="0.290598"
stop-color="#CACFE8"
stop-opacity="0.3"
/>
<stop offset="1" stop-color="#E9ECFF" stop-opacity="0" />
</linearGradient>
</defs>
<CartesianGrid vertical={false} strokeDasharray={3} />
<XAxis
dataKey="date"
type="category"
axisLine={false}
tickLine={false}
interval="preserveStartEnd"
ticks={[
SOLVED_TASKS[0].date,
SOLVED_TASKS[SOLVED_TASKS.length - 1].date,
]}
tick={{
fill: '#320A8D',
fontSize: '12px',
fontSize: '14px',
fontFamily: 'Inter',
fontWeight: 500,
}}
tickFormatter={(value: any) => dayjs(value).format('MMM D')}
tickFormatter={(value: any) => dayjs(value).format('MMM')}
tickMargin={12}
padding={{ left: 10, right: 10 }}
/>
<YAxis
axisLine={false}
tickLine={false}
tick={{
fill: '#320A8D',
fontSize: '14px',
fontFamily: 'Inter',
fontWeight: 500,
}}
tickFormatter={(value: any) =>
numeral(value).format('0a').toUpperCase()
}
/>
<Tooltip
cursor={{ fill: '#dadef0' }}
content={<CustomTooltip />}
/>
<Bar
<Area
type="monotone"
dataKey="value"
fill={theme.palette.primary.main}
barSize={16}
stroke="#320A8D"
fill="url(#paint0_linear_4037_63345)"
/>
</RechartsBarChart>
</AreaChart>
</ResponsiveContainer>
</Box>
</Box>
</Grid>
</Grid>
</CardContainer>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
{ "date": "2023-03-31", "value": 212012559 },
{ "date": "2023-04-30", "value": 182462076 },
{ "date": "2023-05-31", "value": 148126905 },
{ "date": "2023-06-30", "value": 147005424 }
{ "date": "2023-06-30", "value": 147005424 },
{ "date": "2023-07-31", "value": 132977763 }
]
13 changes: 0 additions & 13 deletions packages/apps/fortune/recording-oracle/.env.sample

This file was deleted.

9 changes: 3 additions & 6 deletions packages/apps/fortune/recording-oracle/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"printWidth": 120,
"trailingComma": "all",
"singleQuote": false
}
"singleQuote": true,
"trailingComma": "all"
}
Loading