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

plots: update templates schemas, new smooth #40

Merged
merged 1 commit into from
May 10, 2022

Conversation

pared
Copy link
Contributor

@pared pared commented Apr 29, 2022

Decided to update schema values for our templates, since we already use vega 5.0 in our HTML scripts.
While I was at it I decided to finish iterative/dvc#6438
New smoothing template borrows interactive choice of focused point from our default template.
Added signal that changes smoothing value.

Used following script to generate image:

#!/bin/bash

set -exu
pushd $TMPDIR

wsp=test_wspace
rep=test_repo

rm -rf $wsp && mkdir $wsp && pushd $wsp
main=$(pwd)

mkdir $rep && pushd $rep

git init
dvc init 

git add -A
git commit -am "init"

echo -e "from random import random
import json

result = []
for i in range(1, 100):
	result.append({'val': 1/i + random()/10})
with open('file.json', 'w') as fobj:
	json.dump(result, fobj)
" > train.py

dvc run -d train.py --plots file.json -n train python train.py

git add -A
git commit -am "first"

dvc repro -f
dvc plots diff --targets file.json --template smooth

Old template

New template

@pared pared requested a review from daavoo April 29, 2022 16:57
@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2022

Codecov Report

Merging #40 (73f8a3a) into main (369396f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   95.68%   95.68%           
=======================================
  Files          14       14           
  Lines         464      464           
  Branches       76       76           
=======================================
  Hits          444      444           
  Misses         15       15           
  Partials        5        5           
Impacted Files Coverage Δ
src/dvc_render/vega_templates.py 97.95% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 369396f...73f8a3a. Read the comment docs.

@daavoo daavoo merged commit 6980368 into iterative:main May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants