-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
gh-actions: Build and upload all artifacts #222
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Daniel Schaefer <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #222 +/- ##
=======================================
Coverage 98.47% 98.47%
=======================================
Files 43 43
Lines 1839 1839
Branches 114 114
=======================================
Hits 1811 1811
Misses 25 25
Partials 3 3 |
Signed-off-by: Daniel Schaefer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a quick look over the files for now. Don't worry about force-pushing as I will squash.
$ python bin/ci.py src/data_morph/shapes/bases/line_collection.py | ||
high_lines h_lines slant_down slant_up v_lines wide_lines x diamond rectangle star | ||
python bin/ci.py src/data_morph/data/starter_shapes/superdatascience.csv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python bin/ci.py src/data_morph/data/starter_shapes/superdatascience.csv | |
$ python bin/ci.py src/data_morph/data/starter_shapes/superdatascience.csv |
from data_morph.shapes.factory import ShapeFactory | ||
from data_morph.data.loader import DataLoader | ||
import sys | ||
from os.path import basename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out why the linting action didn't run on this file. This PR should also add the bin
directory to the check-pr.yml
workflow:
data-morph/.github/workflows/check-pr.yml
Lines 7 to 12 in ac4d124
on: | |
pull_request: | |
paths: | |
- 'docs/**' | |
- 'src/**' | |
- 'tests/**' |
Once you add that, there will be things to fix.
|
||
jobs: | ||
build: | ||
name: Build with Python ${{ matrix.python-version }} on ${{ matrix.os }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: Build with Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
name: Run Data Morph on new/altered datasets/shapes |
python -m pip install setuptools --upgrade | ||
python -m pip install . | ||
- name: Get all dataset files that have changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Get all dataset files that have changed | |
- name: Get all dataset and shape files that have changed |
- name: Get all dataset files that have changed | ||
id: changed-files-yaml | ||
uses: tj-actions/changed-files@v45 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment with the documentation link for this.
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'src/tests/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 'src/tests/**' | |
- 'tests/**' |
paths-ignore: | ||
- 'docs/**' | ||
- 'src/tests/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about running only if we have changes in src/**
?
data-morph \ | ||
--start-shape music \ | ||
--target-shape $SHAPE_ARGS \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use parallel
here like the other two?
# For core code changes, we want to do a couple morphs to see if they still look ok | ||
# Only need to run if neither of the previous two morphs ran | ||
- name: Morph shapes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Morph shapes | |
- name: Morph shapes with core code changes |
Pass in the filenames that changed and it'll tell you the arguments of datasets and shapes. | ||
See examples below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass in the filenames that changed and it'll tell you the arguments of datasets and shapes. | |
See examples below | |
Call this script with the names of files that have changed to get the | |
datasets and shapes to test with the CLI. | |
Examples | |
-------- |
Fixes #217
Describe your changes
bullseye heart rectangle star slant_up
music
music
tobullseye heart rectangle star slant_up
The result is uploaded to the github actions run.
I tried to make it run in parallel but it doesn't seem to really work on github actions.
But if you run the following on your local system, it'll morph all 6 in roughly the same time as a single one.
Checklist