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

Issue-348: Interop is not compatible with Numpy 2.0.0 #349

Merged
merged 37 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cb724be
Issue-348: Interop is not compatible with Numpy 2.0.0
ezralanglois Jul 12, 2024
edbaa8d
Fix unit test
ezralanglois Jul 12, 2024
1721cac
Try to fix mac builds
ezralanglois Jul 12, 2024
0a8f02d
Remove python 3.6
ezralanglois Jul 12, 2024
2a8df9e
Remove python 3.7
ezralanglois Jul 12, 2024
3c93a70
Fix missing setuptools for arm
ezralanglois Jul 12, 2024
5a2f07b
Fix pr
ezralanglois Jul 12, 2024
41ecf0c
Try again
ezralanglois Jul 13, 2024
0d366f5
Add support for swig
ezralanglois Jul 13, 2024
b1d09c8
Add support for swig
ezralanglois Jul 13, 2024
50de206
Remove action for swig
ezralanglois Jul 13, 2024
f8e5719
Try again
ezralanglois Jul 13, 2024
df71727
Fix usr
ezralanglois Jul 13, 2024
3984c87
Add swig dir
ezralanglois Jul 13, 2024
9ff7751
Add swig dir
ezralanglois Jul 13, 2024
a3d5e86
Try once more
ezralanglois Jul 13, 2024
0c4d365
Fix missing swig
ezralanglois Jul 13, 2024
ca937d1
Try to fix swig again
ezralanglois Jul 13, 2024
0bca820
Try another fix
ezralanglois Jul 14, 2024
e052843
Try to remove yum
ezralanglois Jul 14, 2024
ca15b2e
Add back wget
ezralanglois Jul 14, 2024
facd0cc
Add numpy versions
ezralanglois Jul 14, 2024
2188682
Add icu
ezralanglois Jul 14, 2024
ce05c85
Try a new image
ezralanglois Jul 14, 2024
85689d8
Fix new numpy errors
ezralanglois Jul 15, 2024
a738553
Fix test again
ezralanglois Jul 15, 2024
90b84c4
Fix print options
ezralanglois Jul 15, 2024
a5699e2
Fix tests
ezralanglois Jul 15, 2024
b7a24b7
Fix more tests
ezralanglois Jul 15, 2024
7019512
Fix more tests again
ezralanglois Jul 15, 2024
b344955
Fix mac tests
ezralanglois Jul 15, 2024
28b4fca
Debug swig
ezralanglois Jul 15, 2024
e3dcbfa
Fix mac C#
ezralanglois Jul 15, 2024
5a19cfe
Another fix for missing swig
ezralanglois Jul 15, 2024
6949bd9
Try again with mac
ezralanglois Jul 15, 2024
b3aef29
Try again with mac 2
ezralanglois Jul 15, 2024
b9066cd
Upgrade to netcoreapp7
ezralanglois Jul 15, 2024
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
10 changes: 7 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-13]
buildtype: ["Debug", "Release"]

steps:
Expand All @@ -31,9 +31,13 @@ jobs:
if: matrix.os == 'windows-latest'
run: cmake ${{github.workspace}} -Ax64 -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp6

- name: Install Swig
if: matrix.os == 'macOS-13'
run: pip install swig==4.0.2 --prefix="$(pwd)/usr"

- name: Configure OSX
if: matrix.os == 'macOS-latest'
run: cmake ${{github.workspace}} -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp6
if: matrix.os == 'macOS-13'
run: cmake ${{github.workspace}} -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.buildtype}} -DPACKAGE_OUTPUT_FILE_PREFIX=${{github.workspace}}/dist -DENABLE_SWIG=ON -DENABLE_PORTABLE=ON -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=ON -DENABLE_PYTHON=OFF -DCSHARP_TEST_FRAMEWORK=netcoreapp7 -DSWIG_EXECUTABLE=$(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/bin/swig) -DSWIG_DIR=$(dirname $(ls $(pwd)/usr/lib/python3.*/site-packages/swig/data/share/swig/4.0.2/swig.swg))

- name: Build OSX and Windows
if: matrix.os != 'ubuntu-latest'
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Python Wheels

env:
MACOSX_DEPLOYMENT_TARGET: 10.9
DOCKER_IMAGE: quay.io/pypa/manylinux2014_x86_64

on:
push:
Expand All @@ -15,8 +16,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macOS-latest]
pyver: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-2019, macOS-13]
pyver: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
Expand All @@ -36,20 +37,24 @@ jobs:
git --version

- name: Package Python 3.8 and earlier
if: matrix.os == 'ubuntu-latest' && matrix.pyver != '3.9' && matrix.pyver != '3.10' && matrix.pyver != '3.11'
if: matrix.os == 'ubuntu-latest' && matrix.pyver != '3.9' && matrix.pyver != '3.10' && matrix.pyver != '3.11' && matrix.pyver != '3.12'
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop sh /io/tools/package.sh /io /io/dist travis OFF

- name: Package Python 3.9
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.9'
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop_centos7 sh /io/tools/package.sh /io /io/dist travis OFF Release cp39-cp39
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp39-cp39

- name: Package Python 3.10
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.10'
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop_centos7 sh /io/tools/package.sh /io /io/dist travis OFF Release cp310-cp310
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp310-cp310

- name: Package Python 3.11
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.11'
run: docker run --rm -v ${{github.workspace}}/:/io ezralanglois/interop_centos7 sh /io/tools/package.sh /io /io/dist travis OFF Release cp311-cp311
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp311-cp311

- name: Package Python 3.11
if: matrix.os == 'ubuntu-latest' && matrix.pyver == '3.12'
run: docker run --rm -v ${{github.workspace}}/:/io $DOCKER_IMAGE sh /io/tools/package.sh /io /io/dist travis OFF Release cp312-cp312

- name: Windows Package Python
if: matrix.os == 'windows-2019'
Expand All @@ -59,7 +64,7 @@ jobs:
tools\package.bat Release "Visual Studio 16 2019" package_wheel "-DENABLE_APPS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_CSHARP=OFF -DPython_EXECUTABLE=${{ steps.cpver.outputs.python-path }}" -DENABLE_PORTABLE=ON -A x64

- name: Mac OSX Package Python
if: matrix.os == 'macOS-latest'
if: matrix.os == 'macOS-latest' || matrix.os == 'macOS-13'
run: bash ./tools/package.sh ${{github.workspace}} ${{github.workspace}}/dist travis OFF Release ${{matrix.pyver}}

- uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Illumina sequencers including **NextSeq 1k/2k** and NovaSeqX. These libraries ar
with one exception: GA systems have been excluded.

***
> We now support an interface to 3.6-3.11
> Note that 3.10 and 3.11 are CentOS 7 or later while earlier versions support Centos 5 or later
> We now support an interface to 3.8-3.12
> Note that 3.10-3.12 are CentOS 7 or later while earlier versions support Centos 5 or later
> Note: dumptext has been deprecated in favor of imaging_table and will be removed in the next version
***

Expand Down
10 changes: 10 additions & 0 deletions docs/src/changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changes {#changes}

## v1.3.2

| Date | Description |
|------------|-------------------------------------------------------|
| 2024-07-12 | Issue-348: Interop is not compatible with Numpy 2.0.0 |
| 2024-07-12 | Add support for Python 3.12 |
| 2024-07-12 | Issue-340: Update simplified interface documentation |
| 2024-07-12 | Issue-339: Add link to document metrics on summary |
| 2024-07-12 | Issue-338: Improve imaging_table documentation |

## v1.3.1

| Date | Description |
Expand Down
4 changes: 2 additions & 2 deletions docs/src/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In addition to the binary archive below, there are language specific packages in

Note, we only distribute from GitHub currently, and not PyPi or NuGet.org. These should
be compatible with most Linux Versions, Mac OSX and Windows. We support
Python 3.6 to 3.11.
Python 3.8 to 3.12.

### Binary Archive (C++, C#, Python, Java)

Expand All @@ -35,7 +35,7 @@ For Pythons users, a Wheel package is available on Github Releases or PyPI:
$ pip install interop
~~~~~~~~~~~~~

Supported versions for binary distribution: 3.6 to 3.11.
Supported versions for binary distribution: 3.8 to 3.12.

Test the installation

Expand Down
23 changes: 21 additions & 2 deletions docs/src/python_binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Older versions (prior to 1.1.3) can be installed using:
$ pip install -f https://github.com/Illumina/interop/releases/tag/v1.1.2 interop
$ pip install -f https://github.com/Illumina/interop/releases/latest interop

Note, only Python versions 3.6 to 3.11 are currently
Note, only Python versions 3.8 to 3.12 are currently
supported as binary builds. Other Python versions must be built
from source.

Expand All @@ -32,9 +32,28 @@ Then upgrade numpy and try again.

## New simplified interface

from interop import *
The following will return a structured numpy array

from interop.core import *
ar = imaging("path/to/run_folder")

This can be converted to pandas as follows

import interop.core as ic

df = pd.DataFrame(ic.imaging(run_folder))
change_data_type = {
'Lane' : int,
'Tile' : int,
'Tile Number' : int,
'Read' : int,
'Cycle' : int,
'Cycle Within Read': int,
'Swath' : int,
'Surface' : int
}
df = df.astype(change_data_type)

See new [interop.core](namespacecore.html) wrapper for the simplified interface


Expand Down
7 changes: 6 additions & 1 deletion src/apps/imaging_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ int main(int argc, char** argv)
if (argc == 0)
{
std::cerr << "No arguments specified!" << std::endl;
std::cout << "Expected: $ imaging_table <run-folder1> <run-folder2> ... <run-folderN>" << std::endl;
return INVALID_ARGUMENTS;
}
const size_t thread_count = 1;
Expand All @@ -51,7 +52,11 @@ int main(int argc, char** argv)
run_metrics run;
std::cout << "# Run Folder: " << io::basename(argv[i]) << std::endl;
int ret = read_run_metrics(argv[i], run, valid_to_load, thread_count);
if (ret != SUCCESS) return ret;
if (ret != SUCCESS)
{
std::cout << "Expected: $ imaging_table <run-folder1> <run-folder2> ... <run-folderN>" << std::endl;
return ret;
}

#ifdef INTEROP_TEST_CSHARP_BINDING
std::vector<model::table::imaging_column> columns;
Expand Down
3 changes: 3 additions & 0 deletions src/apps/summary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
*
* In this sample, 140131_1287_0851_A01n401drr is a run folder and the summary is written to the standard output.
*
* Note that an exhausive list of metrics can be found here:
* https://support-docs.illumina.com/SW/SAV/Content/SW/SAV/Metrics.htm
*
* The InterOp sub folder may contain any of the following files:
*
* - ErrorMetricsOut.bin
Expand Down
43 changes: 21 additions & 22 deletions src/ext/python/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@

>>> from interop import index_summary
>>> index_summary(run_metrics_with_indexing)
array([(1, 0.4556, 1015.5555, 520.6667, 1536.2222, 1800., 2000.)],
array([(1, 0.46, 1015.56, 520.67, 1536.22, 1800., 2000.)],
dtype=[('Lane', '<u2'), ('Mapped Reads Cv', '<f4'), ('Max Mapped Reads', '<f4'), ('Min Mapped Reads', '<f4'), ('Total Fraction Mapped Reads', '<f4'), ('Total Pf Reads', '<f4'), ('Total Reads', '<f4')])

>>> from interop import summary
>>> summary(run_metrics_example)
array([(0.36666667, 6.6666665, 0., 0., 0.)],
array([(0.37, 6.67, 0., 0., 0.)],
dtype=[('Error Rate', '<f4'), ('First Cycle Intensity', '<f4'), ('Projected Yield G', '<f4'), ('Reads', '<f4'), ('Reads Pf', '<f4')])

>>> from interop import indexing
>>> indexing(run_metrics_with_indexing)
array([(1., 1101., 'ATCACGAC-AAGGTTCA', '1', 4570., 900., 507.77777),
(1., 1101., 'ATCACGAC-GGGGGGGG', '2', 2343., 900., 260.33334),
(1., 1102., 'ATCACGAC-AAGGTTCA', '1', 4570., 0., 0. ),
(1., 1102., 'ATCACGAC-GGGGGGGG', '2', 2343., 0., 0. )],
array([(1., 1101., 'ATCACGAC-AAGGTTCA', '1', 4570., 900., 507.78),
(1., 1101., 'ATCACGAC-GGGGGGGG', '2', 2343., 900., 260.33),
(1., 1102., 'ATCACGAC-AAGGTTCA', '1', 4570., 0., 0. ),
(1., 1102., 'ATCACGAC-GGGGGGGG', '2', 2343., 0., 0. )],
dtype=[('Lane', '<f4'), ('Tile', '<f4'), ('Barcode', 'O'), ('SampleID', 'O'), ('Cluster Count', '<f4'), ('Cluster Count PF', '<f4'), ('% Demux', '<f4')])

>>> from interop import imaging
Expand Down Expand Up @@ -71,16 +71,16 @@ def index_summary(run_metrics, level='Lane', columns=None, dtype='f4', **extra):
>>> ar = index_summary("some/path/run_folder_name") # doctest: +SKIP

>>> index_summary(run_metrics_with_indexing)
array([(1, 0.4556, 1015.5555, 520.6667, 1536.2222, 1800., 2000.)],
array([(1, 0.46, 1015.56, 520.67, 1536.22, 1800., 2000.)],
dtype=[('Lane', '<u2'), ('Mapped Reads Cv', '<f4'), ('Max Mapped Reads', '<f4'), ('Min Mapped Reads', '<f4'), ('Total Fraction Mapped Reads', '<f4'), ('Total Pf Reads', '<f4'), ('Total Reads', '<f4')])

>>> index_summary(run_metrics_with_indexing, level='Barcode')
array([(1, 18280., 1015.5555, 1., 'ATCACGAC', 'AAGGTTCA', 'TSCAIndexes', '1'),
(1, 9372., 520.6667, 2., 'ATCACGAC', 'GGGGGGGG', 'TSCAIndexes', '2')],
array([(1, 18280., 1015.56, 1., 'ATCACGAC', 'AAGGTTCA', 'TSCAIndexes', '1'),
(1, 9372., 520.67, 2., 'ATCACGAC', 'GGGGGGGG', 'TSCAIndexes', '2')],
dtype=[('Lane', '<u2'), ('Cluster Count', '<f4'), ('Fraction Mapped', '<f4'), ('Id', '<f4'), ('Index1', 'O'), ('Index2', 'O'), ('Project Name', 'O'), ('Sample Id', 'O')])

>>> index_summary(run_metrics_with_indexing, columns=['Total Fraction Mapped Reads'])
array([(1, 1536.2222)],
array([(1, 1536.22)],
dtype=[('Lane', '<u2'), ('Total Fraction Mapped Reads', '<f4')])

>>> index_summary(run_metrics_with_indexing, columns=['Incorrect'])
Expand Down Expand Up @@ -233,11 +233,11 @@ def summary(run_metrics, level='Total', columns=None, dtype='f4', ignore_missing


>>> summary(run_metrics_example)
array([(0.36666667, 6.6666665, 0., 0., 0.)],
array([(0.37, 6.67, 0., 0., 0.)],
dtype=[('Error Rate', '<f4'), ('First Cycle Intensity', '<f4'), ('Projected Yield G', '<f4'), ('Reads', '<f4'), ('Reads Pf', '<f4')])

>>> summary(run_metrics_example, 'Total')
array([(0.36666667, 6.6666665, 0., 0., 0.)],
array([(0.37, 6.67, 0., 0., 0.)],
dtype=[('Error Rate', '<f4'), ('First Cycle Intensity', '<f4'), ('Projected Yield G', '<f4'), ('Reads', '<f4'), ('Reads Pf', '<f4')])

>>> summary(run_metrics_example, 'NonIndex')
Expand All @@ -261,17 +261,16 @@ def summary(run_metrics, level='Total', columns=None, dtype='f4', ignore_missing

We can select specific columns using the `columns` parameter
>>> summary(run_metrics_example, 'Total', columns=['First Cycle Intensity', 'Error Rate'])
array([(6.6666665, 0.36666667)],
array([(6.67, 0.37)],
dtype=[('First Cycle Intensity', '<f4'), ('Error Rate', '<f4')])

If a column values are NaN, or missing, then it will automatically be excluded
>>> summary(run_metrics_example, 'Total', columns=['% Aligned', 'Error Rate'])
array([(0.36666667,)], dtype=[('Error Rate', '<f4')])
array([(0.37,)], dtype=[('Error Rate', '<f4')])

To include missing columns, set `ignore_missing_columns=False`
>>> summary(run_metrics_example, 'Total', ignore_missing_columns=False, columns=['% Aligned', 'Error Rate'])
array([(nan, 0.36666667)],
dtype=[('% Aligned', '<f4'), ('Error Rate', '<f4')])
array([(nan, 0.37)], dtype=[('% Aligned', '<f4'), ('Error Rate', '<f4')])

>>> summary(run_metrics_example, 'Total', columns=['Incorrect'])
Traceback (most recent call last):
Expand Down Expand Up @@ -513,18 +512,17 @@ def indexing(run_metrics, per_sample=True, dtype='f4', stype='O', **extra):
We can also convert a `run_metrics` object to an indexing table as follows
>>> ar = indexing(run_metrics_with_indexing)
>>> ar
array([(1., 1101., 'ATCACGAC-AAGGTTCA', '1', 4570., 900., 507.77777),
(1., 1101., 'ATCACGAC-GGGGGGGG', '2', 2343., 900., 260.33334),
(1., 1102., 'ATCACGAC-AAGGTTCA', '1', 4570., 0., 0. ),
(1., 1102., 'ATCACGAC-GGGGGGGG', '2', 2343., 0., 0. )],
array([(1., 1101., 'ATCACGAC-AAGGTTCA', '1', 4570., 900., 507.78),
(1., 1101., 'ATCACGAC-GGGGGGGG', '2', 2343., 900., 260.33),
(1., 1102., 'ATCACGAC-AAGGTTCA', '1', 4570., 0., 0. ),
(1., 1102., 'ATCACGAC-GGGGGGGG', '2', 2343., 0., 0. )],
dtype=[('Lane', '<f4'), ('Tile', '<f4'), ('Barcode', 'O'), ('SampleID', 'O'), ('Cluster Count', '<f4'), ('Cluster Count PF', '<f4'), ('% Demux', '<f4')])

The `indexing` function also provides an overall sample view by setting `per_sample=False`.

>>> ar = indexing(run_metrics_with_indexing, per_sample=False)
>>> ar
array([(1., 1101., 1000., 900., 768.11115),
(1., 1102., 0., 0., 0. )],
array([(1., 1101., 1000., 900., 768.11), (1., 1102., 0., 0., 0. )],
dtype=[('Lane', '<f4'), ('Tile', '<f4'), ('Cluster Count', '<f4'), ('Cluster Count PF', '<f4'), ('% Demux', '<f4')])

:param run_metrics: py_interop_run_metrics.run_metrics or string run folder path
Expand Down Expand Up @@ -1159,6 +1157,7 @@ def _run_doctests():
import interop.core
import doctest
import sys
np.set_printoptions(precision=2)
failure_count, test_count = doctest.testmod(interop.core
, optionflags=doctest.IGNORE_EXCEPTION_DETAIL
, globs=dict(
Expand Down
7 changes: 5 additions & 2 deletions src/ext/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ setup(
],
keywords="Illumina sequencer HiSeqX HiSeq NextSeq MiniSeq NovaSeq MiSeq SBS genome",
install_requires=[
'numpy>=1.16.6;python_version>="3.5"',
'numpy==1.16.6;python_version<"3.5"',
'numpy>=1.26.2;python_version>="3.12"',
'numpy>=1.23.2;python_version>="3.11"',
'numpy>=1.21.6;python_version>="3.10"',
'numpy>=1.19.3;python_version>="3.9"',
'numpy>=1.16.6,<2.0;python_version<="3.8"',
],
distclass=BinaryDistribution,
cmdclass={'install': InstallPlatlib},
Expand Down
2 changes: 1 addition & 1 deletion src/tests/interop/logic/summary_metrics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ TEST_P(run_summary_tests, lane_summary)
const float density_tol = 0.5f;
const float tol = 1e-2f; // TODO: fix this unit test on external Windows Builds (appveyor) was 1e-7f
#else
const float density_tol = 1e-7f;
const float density_tol = 1e-2f;
const float tol = 1e-7f;
#endif
ASSERT_EQ(actual.size(), expected.size());
Expand Down
10 changes: 5 additions & 5 deletions src/tests/python/CoreTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_bad_format_exception(self):
,7,0,90,4,1,0,-12,-56,15,64,-98,35,12,64,0,0,0,0,0,0,0,0,46,1,17,1,0,0,0,0,96,-41,-104,36,122,-86,-46,-120
,7,0,-66,4,1,0,96,-43,14,64,-63,49,13,64,0,0,0,0,0,0,0,0,56,1,17,1,0,0,0,0,112,125,77,38,122,-86,-46,-120
,7,0,66,8,1,0,74,-68,6,64,-118,-7,8,64,0,0,0,0,0,0,0,0,93,1,46,1,0,0,0,0,-47,-104,2,40,122,-86,-46,-120],
dtype=numpy.uint8)
dtype=numpy.int8).astype(dtype=numpy.uint8, casting='unsafe')
run = py_interop_run_metrics.run_metrics()
try:
py_interop_comm.read_interop_from_buffer(tmp, run.extraction_metric_set())
Expand All @@ -170,7 +170,7 @@ def test_incomplete_file_exception(self):
,7,0,90,4,1,0,-12,-56,15,64,-98,35,12,64,0,0,0,0,0,0,0,0,46,1,17,1,0,0,0,0,96,-41,-104,36,122,-86,-46,-120
,7,0,-66,4,1,0,96,-43,14,64,-63,49,13,64,0,0,0,0,0,0,0,0,56,1,17,1,0,0,0,0,112,125,77,38,122,-86,-46,-120
,7,0,66,8,1,0,74,-68,6,64,-118,-7,8,64,0,0,0,0,0,0,0,0,93,1,46,1,0,0,0,0,-47,-104,2,40,122,-86,-46,-120],
dtype=numpy.uint8)
dtype=numpy.int8).astype(dtype=numpy.uint8, casting='unsafe')
run = py_interop_run_metrics.run_metrics()
try:
py_interop_comm.read_interop_from_buffer(tmp, run.extraction_metric_set())
Expand All @@ -188,7 +188,7 @@ def test_invalid_argument(self):
,7,0,90,4,1,0,-12,-56,15,64,-98,35,12,64,0,0,0,0,0,0,0,0,46,1,17,1,0,0,0,0,96,-41,-104,36,122,-86,-46,-120
,7,0,-66,4,1,0,96,-43,14,64,-63,49,13,64,0,0,0,0,0,0,0,0,56,1,17,1,0,0,0,0,112,125,77,38,122,-86,-46,-120
,7,0,66,8,1,0,74,-68,6,64,-118,-7,8,64,0,0,0,0,0,0,0,0,93,1,46,1,0,0,0,0,-47,-104,2,40,122,-86,-46,-120],
dtype=numpy.uint8)
dtype=numpy.int8).astype(dtype=numpy.uint8, casting='unsafe')
run = py_interop_run_metrics.run_metrics()
py_interop_comm.read_interop_from_buffer(tmp, run.extraction_metric_set())
try:
Expand All @@ -208,7 +208,7 @@ def test_invalid_argument_run_metrics_read(self):
,7,0,90,4,1,0,-12,-56,15,64,-98,35,12,64,0,0,0,0,0,0,0,0,46,1,17,1,0,0,0,0,96,-41,-104,36,122,-86,-46,-120
,7,0,-66,4,1,0,96,-43,14,64,-63,49,13,64,0,0,0,0,0,0,0,0,56,1,17,1,0,0,0,0,112,125,77,38,122,-86,-46,-120
,7,0,66,8,1,0,74,-68,6,64,-118,-7,8,64,0,0,0,0,0,0,0,0,93,1,46,1,0,0,0,0,-47,-104,2,40,122,-86,-46,-120],
dtype=numpy.uint8)
dtype=numpy.int8).astype(dtype=numpy.uint8, casting='unsafe')
run = py_interop_run_metrics.run_metrics()
run.read_metrics_from_buffer(py_interop_run.Extraction, tmp)
try:
Expand Down Expand Up @@ -355,7 +355,7 @@ def test_populate_imaging_table(self):
,7,0,90,4,1,0,-12,-56,15,64,-98,35,12,64,0,0,0,0,0,0,0,0,46,1,17,1,0,0,0,0,96,-41,-104,36,122,-86,-46,-120
,7,0,-66,4,1,0,96,-43,14,64,-63,49,13,64,0,0,0,0,0,0,0,0,56,1,17,1,0,0,0,0,112,125,77,38,122,-86,-46,-120
,7,0,66,8,1,0,74,-68,6,64,-118,-7,8,64,0,0,0,0,0,0,0,0,93,1,46,1,0,0,0,0,-47,-104,2,40,122,-86,-46,-120],
dtype=numpy.uint8)
dtype=numpy.int8).astype(dtype=numpy.uint8, casting='unsafe')
run = py_interop_run_metrics.run_metrics()
py_interop_comm.read_interop_from_buffer(tmp, run.extraction_metric_set())
self.assertEqual(run.extraction_metric_set().size(), 3)
Expand Down
Loading
Loading