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

Adding testing on windows and osx #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,50 @@ jobs:
- name: Run trufflehog3 detector
run: |
trufflehog3 -v -c trufflehog3.yml . && echo "tufflehog3 OK"
test:
needs: linting_test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create LFS file list
run: |
git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: lfs-v1-${{ hashFiles('.lfs-assets-id') }}
restore-keys:
lfs-v1-
- name: Git LFS Pull
run: |
git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Test with pytest
run: |
python -m pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v1
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}

test_package:
needs: linting_test
Expand Down
3 changes: 2 additions & 1 deletion pytools/ng/mrc2ngpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os.path
import sys
import logging
from pathlib import Path


@click.command()
Expand Down Expand Up @@ -74,7 +75,7 @@ def main(input_image, output_precompute, flat, gzip):
if not gzip:
cmd_opts.append("--no-gzip")

cmd = ["volume-to-precomputed-pyramid"] + cmd_opts + [nifti_filename, output_precompute]
cmd = ["volume-to-precomputed-pyramid"] + cmd_opts + [nifti_filename, Path(output_precompute).as_uri()]

logger.info("Executing conversion of NIFTI to Neruoglancer precompute pyramid...")
logger.debug(f"Executing: {cmd}")
Expand Down