Skip to content

Add pixi setup to replace environment.yml #1240

Add pixi setup to replace environment.yml

Add pixi setup to replace environment.yml #1240

Workflow file for this run

name: Test
on:
push: { branches: [ "master" ] }
pull_request: { branches: [ "master" ] }
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
environment: ["python-39", "python-310", "python-311", "python-312"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- name: checkout
uses: actions/checkout@v3
with: { submodules: recursive }
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.28.2
- name: doctest
run: pixi run -e {{ matrix.enviroment }} doctest
- name: cli-digitize-xy
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer digitize test/data/xy.svg
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/xy.csv"), pandas.read_csv("test/data/xy.csv.expected"))'
- name: cli-digitize-scaling-factor
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer digitize test/data/scaling_factor.svg
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/scaling_factor.csv"), pandas.read_csv("test/data/scaling_factor.csv.expected"))'
- name: cli-digitize-x_and_y_scale_bar
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer digitize test/data/x_and_y_scale_bar.svg
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/x_and_y_scale_bar.csv"), pandas.read_csv("test/data/x_and_y_scale_bar.csv.expected"))'
- name: cli-digitize-sampling-interval
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer digitize test/data/sampling.svg --sampling-interval .00101
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/sampling.csv"), pandas.read_csv("test/data/sampling.csv.expected"))'
- name: cli-digitize-sampling-many-points
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer digitize test/data/sampling_many_points.svg --sampling-interval .001508
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/sampling_many_points.csv"), pandas.read_csv("test/data/sampling_many_points.csv.expected"))'
- name: cli-digitize-svg-without-layer
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer digitize test/data/svg_without_layer.svg
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/svg_without_layer.csv"), pandas.read_csv("test/data/svg_without_layer.csv.expected"))'
- name: cli-cv-xy-rate
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/xy_rate.svg --metadata test/data/xy_rate.yaml --si-units
git diff --no-index --word-diff -- test/data/xy_rate.json test/data/xy_rate.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/xy_rate.csv"), pandas.read_csv("test/data/xy_rate.csv.expected"))'
- name: cli-cv-xy-rate-without-metadata
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/xy_rate_without_metadata.svg --si-units
git diff --no-index --word-diff -- test/data/xy_rate_without_metadata.json test/data/xy_rate_without_metadata.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/xy_rate_without_metadata.csv"), pandas.read_csv("test/data/xy_rate_without_metadata.csv.expected"))'
- name: cli-cv-xy-rate-reference
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/xy_rate_reference.svg --metadata test/data/xy_rate_reference.yaml --si-units
git diff --no-index --word-diff -- test/data/xy_rate_reference.json test/data/xy_rate_reference.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/xy_rate_reference.csv"), pandas.read_csv("test/data/xy_rate_reference.csv.expected"))'
- name: cli-cv-cv-comment
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/cv_comment.svg --metadata test/data/cv_comment.yaml --si-units
git diff --no-index --word-diff -- test/data/cv_comment.json test/data/cv_comment.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/cv_comment.csv"), pandas.read_csv("test/data/cv_comment.csv.expected"))'
- name: cli-cv-xy-rate-without-metadata-skewed
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/axes_orientation.svg --si-units
git diff --no-index --word-diff -- test/data/axes_orientation.json test/data/axes_orientation.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/axes_orientation.csv"), pandas.read_csv("test/data/axes_orientation.csv.expected"))'
- name: cli-cv-bibliography
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/cv_bibliography.svg --metadata test/data/cv_bibliography.yaml --si-units --bibliography
git diff --no-index --word-diff -- test/data/cv_bibliography.json test/data/cv_bibliography.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/cv_bibliography.csv"), pandas.read_csv("test/data/cv_bibliography.csv.expected"))'
- name: cli-cv-package-no-bibliography
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/package_no_bibliography.svg --metadata test/data/package_no_bibliography.yaml --si-units --bibliography
git diff --no-index --word-diff -- test/data/package_no_bibliography.json test/data/package_no_bibliography.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/package_no_bibliography.csv"), pandas.read_csv("test/data/package_no_bibliography.csv.expected"))'
- name: cli-figure-bibliography
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer figure test/data/figure_bibliography.svg --metadata test/data/figure_bibliography.yaml --si-units --bibliography
git diff --no-index --word-diff -- test/data/figure_bibliography.json test/data/figure_bibliography.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/figure_bibliography.csv"), pandas.read_csv("test/data/figure_bibliography.csv.expected"))'
- name: cli-cv-package-no-bibliography
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/package_no_bibliography.svg --metadata test/data/package_no_bibliography.yaml --si-units --bibliography
git diff --no-index --word-diff -- test/data/package_no_bibliography.json test/data/package_no_bibliography.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/package_no_bibliography.csv"), pandas.read_csv("test/data/package_no_bibliography.csv.expected"))'
- name: cli-cv-xy-rate-reference-no-si
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer cv test/data/xy_rate_reference_no_si.svg --metadata test/data/xy_rate_reference_no_si.yaml
git diff --no-index --word-diff -- test/data/xy_rate_reference_no_si.json test/data/xy_rate_reference_no_si.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/xy_rate_reference_no_si.csv"), pandas.read_csv("test/data/xy_rate_reference_no_si.csv.expected"))'
- name: cli-figure-figure-comment
shell: pixi shell -e {{ matrix.enviroment }}
run: |
svgdigitizer figure test/data/figure_comment.svg --metadata test/data/figure_comment.yaml
git diff --no-index --word-diff -- test/data/figure_comment.json test/data/figure_comment.json.expected
python -c 'import pandas; pandas.testing.assert_frame_equal(pandas.read_csv("test/data/figure_comment.csv"), pandas.read_csv("test/data/figure_comment.csv.expected"))'