From 05eb72e5b416163c2ccc40048b91eb95eaba377a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Sun, 5 Nov 2023 23:39:44 +0100 Subject: [PATCH 01/24] Bugfix: NUSEF fixation locations often not correctly scaled to image coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- pysaliency/external_datasets/nusef.py | 56 ++++++++++++++++++++++----- tests/external_datasets/test_NUSEF.py | 56 +++++++++++++++++++++++++++ tests/test_external_datasets.py | 47 ---------------------- 3 files changed, 103 insertions(+), 56 deletions(-) create mode 100644 tests/external_datasets/test_NUSEF.py diff --git a/pysaliency/external_datasets/nusef.py b/pysaliency/external_datasets/nusef.py index 33deee6..de6eb8b 100644 --- a/pysaliency/external_datasets/nusef.py +++ b/pysaliency/external_datasets/nusef.py @@ -30,10 +30,10 @@ def get_NUSEF_public(location=None): function returns only the 444 images which are available public (and the corresponding fixations). - Subjects ids used currently might not be the real subject ids + Subjects ids used currently might not be the real subject ids and might be inconsistent across images. - The data collection experiment didn't enforce a specific + The data collection experiment didn't enforce a specific fixation at stimulus onset. @type location: string, defaults to `None` @@ -92,15 +92,29 @@ def get_NUSEF_public(location=None): durations = [] date_format = "%H:%M:%S.%f" - scale_x = 1024 / 260 - scale_y = 768 / 280 - fix_location = os.path.join(temp_dir, 'NUSEF_database', 'fix_data') for sub_dir in tqdm(os.listdir(fix_location)): - if not sub_dir + '.jpg' in stimuli_indices: + if sub_dir + '.jpg' not in stimuli_indices: # one of the non public images continue n = stimuli_indices[sub_dir + '.jpg'] + + scale_x = 1024 / 260 + scale_y = 768 / 280 + + size = stimuli.sizes[n] + + image_resize_factor = 768 / size[0] + resized_height = 768 + resized_width = size[1] * image_resize_factor + if resized_width > 1024: + image_resize_factor * (1024 / resized_width) + resized_width = 1024 + resized_height *= (1024 / resized_width) + + x_offset = (1024 - resized_width) / 2 + y_offset = (768 - resized_height) / 2 + for subject_data in glob.glob(os.path.join(fix_location, sub_dir, '*.fix')): subject_id = int(subject_data.split('+')[0][-2:]) data = open(subject_data).read().replace('\r\n', '\n') @@ -129,8 +143,22 @@ def get_NUSEF_public(location=None): no_of_flags, fix_loss, interfix_loss) = lines[i].split() - x.append(float(hor_pos) * scale_x) - y.append(float(ver_pos) * scale_y) + + # transform from eye trackoer to screen pixels + this_x = float(hor_pos) * scale_x + this_y = float(ver_pos) * scale_y + + # transform to screen image coordinate + this_x -= x_offset + this_y -= y_offset + + # transform to original image coordinates + this_x /= image_resize_factor + this_y /= image_resize_factor + + x.append(this_x) + y.append(this_y) + current_start_time = datetime.strptime(str(start_time), date_format) if i == 0: initial_start_time = current_start_time @@ -144,7 +172,17 @@ def get_NUSEF_public(location=None): train_subjects.append(subject_id) durations.append(fixation_durations) - fixations = FixationTrains.from_fixation_trains(xs, ys, ts, ns, train_subjects, durations) + fixations = FixationTrains.from_fixation_trains( + xs, + ys, + ts, + ns, + train_subjects, + scanpath_fixation_attributes={ + 'durations': durations, + }, + scanpath_attribute_mapping={'durations': 'duration'} + ) if location: stimuli.to_hdf5(os.path.join(location, 'stimuli.hdf5')) diff --git a/tests/external_datasets/test_NUSEF.py b/tests/external_datasets/test_NUSEF.py new file mode 100644 index 0000000..bf9e764 --- /dev/null +++ b/tests/external_datasets/test_NUSEF.py @@ -0,0 +1,56 @@ +import numpy as np +import pytest +from pytest import approx +from scipy.stats import kurtosis, skew + +import pysaliency +from tests.test_external_datasets import _location + + +@pytest.mark.slow +@pytest.mark.download +def test_NUSEF(location): + real_location = _location(location) + + stimuli, fixations = pysaliency.external_datasets.get_NUSEF_public(location=real_location) + if location is None: + assert isinstance(stimuli, pysaliency.Stimuli) + assert not isinstance(stimuli, pysaliency.FileStimuli) + else: + assert isinstance(stimuli, pysaliency.FileStimuli) + assert location.join('NUSEF_public/stimuli.hdf5').check() + assert location.join('NUSEF_public/fixations.hdf5').check() + + assert len(stimuli.stimuli) == 444 + + assert len(fixations.x) == 71477 + + assert np.mean(fixations.x) == approx(459.25215477028985) + assert np.mean(fixations.y) == approx(337.7105607071453) + assert np.mean(fixations.t) == approx(2.0601419197783906) + assert np.mean(fixations.lengths) == approx(4.205604600081145) + + assert np.std(fixations.x) == approx(188.22873273245887) + assert np.std(fixations.y) == approx(141.41626835405654) + assert np.std(fixations.t) == approx(1.8835345300302346) + assert np.std(fixations.lengths) == approx(3.5120574118479095) + + assert kurtosis(fixations.x) == approx(0.40246559702264895) + assert kurtosis(fixations.y) == approx(2.0149558833607584) + assert kurtosis(fixations.t) == approx(4500.149257624623) + assert kurtosis(fixations.lengths) == approx(0.7152102743878679) + + assert skew(fixations.x) == approx(0.3652464937556074) + assert skew(fixations.y) == approx(0.7127109189315761) + assert skew(fixations.t) == approx(36.84824400914634) + assert skew(fixations.lengths) == approx(0.9617232401848484) + + # there are images without any fixations + #assert entropy(fixations.n) == approx(nan) + assert (fixations.n == 0).sum() == 132 + + # not testing this, there are many out-of-stimulus fixations in the dataset + # assert len(fixations) == len(pysaliency.datasets.remove_out_of_stimulus_fixations(stimuli, fixations)) + + + diff --git a/tests/test_external_datasets.py b/tests/test_external_datasets.py index 0bfb0ce..fdf2726 100644 --- a/tests/test_external_datasets.py +++ b/tests/test_external_datasets.py @@ -502,50 +502,3 @@ def test_OSIE(location): assert (fixations.n == 0).sum() == 141 assert len(fixations) == len(pysaliency.datasets.remove_out_of_stimulus_fixations(stimuli, fixations)) - - -@pytest.mark.slow -@pytest.mark.download -def test_NUSEF(location): - real_location = _location(location) - - stimuli, fixations = pysaliency.external_datasets.get_NUSEF_public(location=real_location) - if location is None: - assert isinstance(stimuli, pysaliency.Stimuli) - assert not isinstance(stimuli, pysaliency.FileStimuli) - else: - assert isinstance(stimuli, pysaliency.FileStimuli) - assert location.join('NUSEF_public/stimuli.hdf5').check() - assert location.join('NUSEF_public/fixations.hdf5').check() - - assert len(stimuli.stimuli) == 444 - - assert len(fixations.x) == 71477 - - assert np.mean(fixations.x) == approx(515.7081586714573) - assert np.mean(fixations.y) == approx(339.39582588745634) - assert np.mean(fixations.t) == approx(9.704377576003472) - assert np.mean(fixations.lengths) == approx(4.205604600081145) - - assert np.std(fixations.x) == approx(164.706599106392) - assert np.std(fixations.y) == approx(138.0916655852643) - assert np.std(fixations.t) == approx(15.045168261403202) - assert np.std(fixations.lengths) == approx(3.5120574118479087) - - assert kurtosis(fixations.x) == approx(1.0061621405730756) - assert kurtosis(fixations.y) == approx(1.324567134330601) - assert kurtosis(fixations.t) == approx(2.378559181643473) - assert kurtosis(fixations.lengths) == approx(0.7152102743878705) - - assert skew(fixations.x) == approx(0.1128294554690726) - assert skew(fixations.y) == approx(0.5176640896547959) - assert skew(fixations.t) == approx(1.9080635569791038) - assert skew(fixations.lengths) == approx(0.9617232401848489) - - assert (fixations.n == 0).sum() == 132 - - # not testing this, there are many out-of-stimulus fixations in the dataset - # assert len(fixations) == len(pysaliency.datasets.remove_out_of_stimulus_fixations(stimuli, fixations)) - - - From 76e8cc5828a7f43f9f10465a037fdf681903fb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Sun, 5 Nov 2023 23:47:15 +0100 Subject: [PATCH 02/24] Add more comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- pysaliency/external_datasets/nusef.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pysaliency/external_datasets/nusef.py b/pysaliency/external_datasets/nusef.py index de6eb8b..5114033 100644 --- a/pysaliency/external_datasets/nusef.py +++ b/pysaliency/external_datasets/nusef.py @@ -104,6 +104,13 @@ def get_NUSEF_public(location=None): size = stimuli.sizes[n] + # according to the MATLAB visualiation code, images were scaled to screen size by + # 1. scaling the images to have a height of 768 pixels + # 2. checking if the resulting width is larger than 1024, in this case + # the image is downscaled to have a width of 1024 + # (and hence a height of less than 768) + # here we recompute the scale factors so that we can compute fixation locations + # in image coordinates from the screen coordinates image_resize_factor = 768 / size[0] resized_height = 768 resized_width = size[1] * image_resize_factor @@ -112,6 +119,7 @@ def get_NUSEF_public(location=None): resized_width = 1024 resized_height *= (1024 / resized_width) + # images were shown centered x_offset = (1024 - resized_width) / 2 y_offset = (768 - resized_height) / 2 From 7b8cf559f0796bfa59a1e389df34bf32ca0cbc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Mon, 6 Nov 2023 11:33:31 +0100 Subject: [PATCH 03/24] keep source file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- pysaliency/external_datasets/nusef.py | 9 +++++++-- tests/external_datasets/test_NUSEF.py | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pysaliency/external_datasets/nusef.py b/pysaliency/external_datasets/nusef.py index 5114033..06e07c8 100644 --- a/pysaliency/external_datasets/nusef.py +++ b/pysaliency/external_datasets/nusef.py @@ -60,13 +60,18 @@ def get_NUSEF_public(location=None): with atomic_directory_setup(location): with TemporaryDirectory(cleanup=True) as temp_dir: + source_directory = os.path.join(location, 'src') + os.makedirs(source_directory) + + source_file = os.path.join(source_directory, 'NUSEF_database.zip') + download_and_check('https://ncript.comp.nus.edu.sg/site/mmas/NUSEF_database.zip', - os.path.join(temp_dir, 'NUSEF_database.zip'), + source_file, '429a78ad92184e8a4b37419988d98953') # Stimuli print('Creating stimuli') - f = zipfile.ZipFile(os.path.join(temp_dir, 'NUSEF_database.zip')) + f = zipfile.ZipFile(source_file) f.extractall(temp_dir) stimuli_src_location = os.path.join(temp_dir, 'NUSEF_database', 'stimuli') diff --git a/tests/external_datasets/test_NUSEF.py b/tests/external_datasets/test_NUSEF.py index bf9e764..ea59732 100644 --- a/tests/external_datasets/test_NUSEF.py +++ b/tests/external_datasets/test_NUSEF.py @@ -20,6 +20,7 @@ def test_NUSEF(location): assert isinstance(stimuli, pysaliency.FileStimuli) assert location.join('NUSEF_public/stimuli.hdf5').check() assert location.join('NUSEF_public/fixations.hdf5').check() + assert location.join('NUSEF_public/src/NUSEF_database.zip').check() assert len(stimuli.stimuli) == 444 From df077fff46dae0b6e035c3173e70b3bda4791602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Mon, 6 Nov 2023 11:33:58 +0100 Subject: [PATCH 04/24] add pyproject.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..a61094a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[tool.ruff] +select = ["B", "E", "F", "FIX", "I", "T20"] +line-length = 200 +ignore = ["T201"] # ignore print statements \ No newline at end of file From 31b130a4ff43f4eb5b05209d437eb33e180aa22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 00:53:04 +0100 Subject: [PATCH 05/24] NUSEF: Don't include fixation data for segmenation-mask only images, remove empty images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- CHANGELOG.md | 2 ++ pysaliency/external_datasets/nusef.py | 51 ++++++++++++++++++++++++--- tests/external_datasets/test_NUSEF.py | 41 +++++++++++---------- 3 files changed, 69 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ee18f4..2a427f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog * 0.2.22 (dev): + * Bugfix: The NUSEF dataset scaled some fixations not correctly to image coordinates. Also, we now account for some typos in the + dataset source data. * Feature: CrossvalMultipleRegularizations, CrossvalGoldMultipleRegularizations and GeneralMixtureKernelDensityEstimator in baseline utils (names might change!) * Feature: DVAAwareScanpathModel * Feature: ShuffledBaselineModel is now much more efficient and able to handle large numbers of stimuli. diff --git a/pysaliency/external_datasets/nusef.py b/pysaliency/external_datasets/nusef.py index 06e07c8..b94b3eb 100644 --- a/pysaliency/external_datasets/nusef.py +++ b/pysaliency/external_datasets/nusef.py @@ -16,7 +16,36 @@ from .utils import _load, create_stimuli -# TODO: extract fixation durations +IMAGE_TYPOS = { + '3005_0.jpg': '3005.1.jpg', + '3005_2.jpg': '3005.2.jpg', +} + +# for some images, only segmentation masks are included in the dataset, +# the actual images seem to be part of the non-public IAPS dataset. +IMAGES_WITH_ONLY_PUBLIC_SEGMENTATION_MASKS = [ + '1112_0.jpg', + '1112_2.jpg', + '1303_0.jpg', + '1303_2.jpg', + '3005.1.jpg', + '3005.2.jpg', + '7233_0.jpg', + '7233_1.jpg', + '7233_2.jpg', + '9006_0.jpg', + '9006_1.jpg', + # '9501_0.jpg', # actual image included + # '9501_2.jpg', # actual image included + # '9502_1.jpg', # actual image included + # '9502_2.jpg', # actual image included + '9561_0.jpg', + '9561_2.jpg', + '9635_0.jpg', + '9635_2.jpg' + ] + + def get_NUSEF_public(location=None): """ Loads or downloads and caches the part of the NUSEF dataset, @@ -25,11 +54,16 @@ def get_NUSEF_public(location=None): and the fixations of 25 subjects while doing a freeviewing task with 5 seconds presentation time. - Part of the stimuli from NUSEF are available only + Part of the stimuli from NUSEF are from the IAPS dataset + and are available only under a special license and only upon request. This function returns only the 444 images which are available public (and the corresponding fixations). + For some images only segmentation masks are included in the + public data, those images and their fixations are also not + included in this pysaliency dataset. + Subjects ids used currently might not be the real subject ids and might be inconsistent across images. @@ -77,6 +111,7 @@ def get_NUSEF_public(location=None): stimuli_src_location = os.path.join(temp_dir, 'NUSEF_database', 'stimuli') images = glob.glob(os.path.join(stimuli_src_location, '*.jpg')) images = [os.path.relpath(img, start=stimuli_src_location) for img in images] + images = [filename for filename in images if os.path.basename(filename) not in IMAGES_WITH_ONLY_PUBLIC_SEGMENTATION_MASKS] stimuli_filenames = sorted(images) stimuli_target_location = os.path.join(location, 'Stimuli') if location else None @@ -99,10 +134,18 @@ def get_NUSEF_public(location=None): fix_location = os.path.join(temp_dir, 'NUSEF_database', 'fix_data') for sub_dir in tqdm(os.listdir(fix_location)): - if sub_dir + '.jpg' not in stimuli_indices: + stimulus_name = sub_dir + '.jpg' + + stimulus_name = IMAGE_TYPOS.get(stimulus_name, stimulus_name) + + if stimulus_name not in stimuli_indices: # one of the non public images + print("missing stimulus for", stimulus_name) + continue + + if stimulus_name in IMAGES_WITH_ONLY_PUBLIC_SEGMENTATION_MASKS: continue - n = stimuli_indices[sub_dir + '.jpg'] + n = stimuli_indices[stimulus_name] scale_x = 1024 / 260 scale_y = 768 / 280 diff --git a/tests/external_datasets/test_NUSEF.py b/tests/external_datasets/test_NUSEF.py index ea59732..4275a9d 100644 --- a/tests/external_datasets/test_NUSEF.py +++ b/tests/external_datasets/test_NUSEF.py @@ -4,7 +4,7 @@ from scipy.stats import kurtosis, skew import pysaliency -from tests.test_external_datasets import _location +from tests.test_external_datasets import _location, entropy @pytest.mark.slow @@ -22,32 +22,31 @@ def test_NUSEF(location): assert location.join('NUSEF_public/fixations.hdf5').check() assert location.join('NUSEF_public/src/NUSEF_database.zip').check() - assert len(stimuli.stimuli) == 444 + assert len(stimuli.stimuli) == 429 - assert len(fixations.x) == 71477 + assert len(fixations.x) == 66133 - assert np.mean(fixations.x) == approx(459.25215477028985) - assert np.mean(fixations.y) == approx(337.7105607071453) - assert np.mean(fixations.t) == approx(2.0601419197783906) - assert np.mean(fixations.lengths) == approx(4.205604600081145) + assert np.mean(fixations.x) == approx(452.88481928283653) + assert np.mean(fixations.y) == approx(337.03301271592267) + assert np.mean(fixations.t) == approx(2.0420471776571456) + assert np.mean(fixations.lengths) == approx(4.085887529675049) - assert np.std(fixations.x) == approx(188.22873273245887) - assert np.std(fixations.y) == approx(141.41626835405654) - assert np.std(fixations.t) == approx(1.8835345300302346) - assert np.std(fixations.lengths) == approx(3.5120574118479095) + assert np.std(fixations.x) == approx(187.61359889152612) + assert np.std(fixations.y) == approx(142.59867038067452) + assert np.std(fixations.t) == approx(1.82140623534086) + assert np.std(fixations.lengths) == approx(3.4339653884944963) - assert kurtosis(fixations.x) == approx(0.40246559702264895) - assert kurtosis(fixations.y) == approx(2.0149558833607584) - assert kurtosis(fixations.t) == approx(4500.149257624623) - assert kurtosis(fixations.lengths) == approx(0.7152102743878679) + assert kurtosis(fixations.x) == approx(0.403419633086465) + assert kurtosis(fixations.y) == approx(2.0001760382566793) + assert kurtosis(fixations.t) == approx(5285.812604733467) + assert kurtosis(fixations.lengths) == approx(0.8320210638515699) - assert skew(fixations.x) == approx(0.3652464937556074) - assert skew(fixations.y) == approx(0.7127109189315761) - assert skew(fixations.t) == approx(36.84824400914634) - assert skew(fixations.lengths) == approx(0.9617232401848484) + assert skew(fixations.x) == approx(0.42747360917257937) + assert skew(fixations.y) == approx(0.7441609934536769) + assert skew(fixations.t) == approx(39.25751334379433) + assert skew(fixations.lengths) == approx(0.9874139139443956) - # there are images without any fixations - #assert entropy(fixations.n) == approx(nan) + assert entropy(fixations.n) == approx(8.603204478724775) assert (fixations.n == 0).sum() == 132 # not testing this, there are many out-of-stimulus fixations in the dataset From 36173f11a6916e57af8c5f25ebe2840fab838b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 01:06:16 +0100 Subject: [PATCH 06/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index c1dcb93..5178b66 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -68,5 +68,5 @@ jobs: - name: test build and install run: | python setup.py sdist - pip install dist/*.tar.gz + $CONDA/bin/pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From 6a658895ca9968b6c31628e7dd2f7db333bc1a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 01:25:53 +0100 Subject: [PATCH 07/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 5178b66..3e0d637 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -67,6 +67,6 @@ jobs: python -m pytest --nomatlab --notheano tests - name: test build and install run: | - python setup.py sdist + $CONDA/bin/python setup.py sdist $CONDA/bin/pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From 60a707913a03a109f68739d657de8c124983d4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 10:09:42 +0100 Subject: [PATCH 08/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 3e0d637..d710420 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -41,6 +41,7 @@ jobs: pandas \ piexif \ pillow \ + pip \ pkg-config \ pytorch \ requests \ From 1d0286e64c4b662366c7ad585a9d4a7129f013ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 10:12:03 +0100 Subject: [PATCH 09/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index d710420..1e57151 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -52,6 +52,7 @@ jobs: sphinx \ torchvision \ tqdm + ls /usr/share/miniconda/lib/ pip install h5py # https://github.com/h5py/h5py/issues/1880 # - name: Lint with flake8 # run: | From 2d6cc180ff8b99e2d87f9f3a9ad2aae17eb3939b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 10:23:59 +0100 Subject: [PATCH 10/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 1e57151..8c6668d 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -14,15 +14,15 @@ jobs: - "3.9" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH +# - name: Add conda to system path +# run: | +# # $CONDA is an environment variable pointing to the root of the miniconda directory +# echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies run: | # conda env update --file environment.yml --name base From 70d2b2c3e9e82f06aef2fc90ecc2bb275ea9030f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 10:30:08 +0100 Subject: [PATCH 11/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 8c6668d..2479f4a 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -26,8 +26,8 @@ jobs: - name: Install dependencies run: | # conda env update --file environment.yml --name base - conda config --add channels conda-forge - conda install \ + #conda config --add channels conda-forge + pip install \ boltons \ cython \ deprecation \ @@ -52,7 +52,6 @@ jobs: sphinx \ torchvision \ tqdm - ls /usr/share/miniconda/lib/ pip install h5py # https://github.com/h5py/h5py/issues/1880 # - name: Lint with flake8 # run: | @@ -63,12 +62,13 @@ jobs: # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - conda install pytest hypothesis + # conda install pytest hypothesis + pip install pytest hypothesis python setup.py build_ext --inplace python -m pytest --nomatlab --notheano tests - name: test build and install run: | - $CONDA/bin/python setup.py sdist - $CONDA/bin/pip install dist/*.tar.gz + python setup.py sdist + pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From 944503fe42bc084094955752cf1f5214809c9782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 16:00:19 +0100 Subject: [PATCH 12/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 30 +++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 2479f4a..cb8dd92 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -14,11 +14,25 @@ jobs: - "3.9" steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python-version }} + #activate-environment: anaconda-client-env + #environment-file: etc/example-environment.yml + #condarc-file: etc/example-condarc.yml + #auto-activate-base: false + channels: conda-forge + - name: Conda info + shell: bash -el {0} + run: conda info + - name: Conda list + shell: pwsh + run: conda list +# - name: Set up Python +# uses: actions/setup-python@v4 +# with: +# python-version: ${{ matrix.python-version }} # - name: Add conda to system path # run: | # # $CONDA is an environment variable pointing to the root of the miniconda directory @@ -26,13 +40,14 @@ jobs: - name: Install dependencies run: | # conda env update --file environment.yml --name base - #conda config --add channels conda-forge - pip install \ + # conda config --add channels conda-forge + conda install \ boltons \ cython \ deprecation \ dill \ diskcache \ + h5py \ imageio \ natsort \ numba \ @@ -52,7 +67,7 @@ jobs: sphinx \ torchvision \ tqdm - pip install h5py # https://github.com/h5py/h5py/issues/1880 + #pip install h5py # https://github.com/h5py/h5py/issues/1880 # - name: Lint with flake8 # run: | # conda install flake8 @@ -62,8 +77,7 @@ jobs: # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - # conda install pytest hypothesis - pip install pytest hypothesis + conda install pytest hypothesis python setup.py build_ext --inplace python -m pytest --nomatlab --notheano tests From 39a2b29dacc7be3ef48cc1ebf381c51d443ac0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 16:01:17 +0100 Subject: [PATCH 13/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index cb8dd92..b4eab3e 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -28,7 +28,7 @@ jobs: run: conda info - name: Conda list shell: pwsh - run: conda list + run: conda list # - name: Set up Python # uses: actions/setup-python@v4 # with: From 5934940db0b06252570b172487eb39e77eaa1ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 22:38:44 +0100 Subject: [PATCH 14/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index b4eab3e..f631ecf 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -77,8 +77,12 @@ jobs: # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | + echo "which conda" + type coda conda install pytest hypothesis - + echo "which python" + type python + echo "Running setup py" python setup.py build_ext --inplace python -m pytest --nomatlab --notheano tests - name: test build and install From 837c4554c5c7175e75e328dacf33b135bddaa37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 22:43:53 +0100 Subject: [PATCH 15/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index f631ecf..5cc743b 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -78,7 +78,7 @@ jobs: - name: Test with pytest run: | echo "which conda" - type coda + type conda conda install pytest hypothesis echo "which python" type python From 360f1b3e19b766cfc3c894e2587c70d0ffd6a1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 22:50:19 +0100 Subject: [PATCH 16/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 5cc743b..aaa3c56 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -38,6 +38,7 @@ jobs: # # $CONDA is an environment variable pointing to the root of the miniconda directory # echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies + shell: bash -el {0} run: | # conda env update --file environment.yml --name base # conda config --add channels conda-forge @@ -76,6 +77,7 @@ jobs: # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest + shell: bash -el {0} run: | echo "which conda" type conda @@ -86,6 +88,7 @@ jobs: python setup.py build_ext --inplace python -m pytest --nomatlab --notheano tests - name: test build and install + shell: bash -el {0} run: | python setup.py sdist pip install dist/*.tar.gz From ba6772aaa1da900baa90586688368a1cdf843810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 23:12:17 +0100 Subject: [PATCH 17/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index aaa3c56..1d696df 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -24,10 +24,11 @@ jobs: #auto-activate-base: false channels: conda-forge - name: Conda info + # the shell setting is necessary for loading profile etc which activates the conda environment shell: bash -el {0} run: conda info - name: Conda list - shell: pwsh + shell: bash -el {0} run: conda list # - name: Set up Python # uses: actions/setup-python@v4 @@ -90,6 +91,10 @@ jobs: - name: test build and install shell: bash -el {0} run: | + conda list + echo "which python" + type python + echo "starting build" python setup.py sdist pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From f41e87e747724a11821b853648c15a087f181d88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 23:34:24 +0100 Subject: [PATCH 18/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 1d696df..1398fb8 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -77,17 +77,17 @@ jobs: # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - shell: bash -el {0} - run: | - echo "which conda" - type conda - conda install pytest hypothesis - echo "which python" - type python - echo "Running setup py" - python setup.py build_ext --inplace - python -m pytest --nomatlab --notheano tests + # - name: Test with pytest + # shell: bash -el {0} + # run: | + # echo "which conda" + # type conda + # conda install pytest hypothesis + # echo "which python" + # type python + # echo "Running setup py" + # python setup.py build_ext --inplace + # python -m pytest --nomatlab --notheano tests - name: test build and install shell: bash -el {0} run: | @@ -96,5 +96,7 @@ jobs: type python echo "starting build" python setup.py sdist + echo "which pip" + type pip pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From cdc3defb5c0058553b4b40b46494bcebdb6623ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 23:39:48 +0100 Subject: [PATCH 19/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 1398fb8..118f775 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -98,5 +98,6 @@ jobs: python setup.py sdist echo "which pip" type pip + python -c "import Cython; print(Cython); print('done')" pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From dc6cd1b76964c4a2805cfd97e0866ea63e93b82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 23:43:40 +0100 Subject: [PATCH 20/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a61094a..851c242 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,7 @@ [tool.ruff] select = ["B", "E", "F", "FIX", "I", "T20"] line-length = 200 -ignore = ["T201"] # ignore print statements \ No newline at end of file +ignore = ["T201"] # ignore print statements + +[build-system] +requires = ["setuptools", "wheel", "Cython"] \ No newline at end of file From e16f3f0a8080bcd23017dde1a479e0149b815658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 23:50:41 +0100 Subject: [PATCH 21/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 41 +++++++----------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 118f775..c523378 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -1,6 +1,6 @@ name: Tests -on: [push] +on: [push, pull_request] jobs: build-linux: @@ -18,10 +18,6 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python-version }} - #activate-environment: anaconda-client-env - #environment-file: etc/example-environment.yml - #condarc-file: etc/example-condarc.yml - #auto-activate-base: false channels: conda-forge - name: Conda info # the shell setting is necessary for loading profile etc which activates the conda environment @@ -30,14 +26,6 @@ jobs: - name: Conda list shell: bash -el {0} run: conda list -# - name: Set up Python -# uses: actions/setup-python@v4 -# with: -# python-version: ${{ matrix.python-version }} -# - name: Add conda to system path -# run: | -# # $CONDA is an environment variable pointing to the root of the miniconda directory -# echo $CONDA/bin >> $GITHUB_PATH - name: Install dependencies shell: bash -el {0} run: | @@ -77,27 +65,20 @@ jobs: # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - # - name: Test with pytest - # shell: bash -el {0} - # run: | - # echo "which conda" - # type conda - # conda install pytest hypothesis - # echo "which python" - # type python - # echo "Running setup py" - # python setup.py build_ext --inplace - # python -m pytest --nomatlab --notheano tests - - name: test build and install + - name: Test with pytest shell: bash -el {0} run: | - conda list + echo "which conda" + type conda + conda install pytest hypothesis echo "which python" type python - echo "starting build" + echo "Running setup py" + python setup.py build_ext --inplace + python -m pytest --nomatlab --notheano tests + - name: test build and install + shell: bash -el {0} + run: | python setup.py sdist - echo "which pip" - type pip - python -c "import Cython; print(Cython); print('done')" pip install dist/*.tar.gz mkdir tmp && cd tmp && python -c "import pysaliency" From b871bc6816f384329a38455f477417bdb562a022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Tue, 7 Nov 2023 23:51:50 +0100 Subject: [PATCH 22/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 22 +++++++++++----------- pyproject.toml | 7 ++++++- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index c523378..168aa80 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -65,17 +65,17 @@ jobs: # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - shell: bash -el {0} - run: | - echo "which conda" - type conda - conda install pytest hypothesis - echo "which python" - type python - echo "Running setup py" - python setup.py build_ext --inplace - python -m pytest --nomatlab --notheano tests + # - name: Test with pytest + # shell: bash -el {0} + # run: | + # echo "which conda" + # type conda + # conda install pytest hypothesis + # echo "which python" + # type python + # echo "Running setup py" + # python setup.py build_ext --inplace + # python -m pytest --nomatlab --notheano tests - name: test build and install shell: bash -el {0} run: | diff --git a/pyproject.toml b/pyproject.toml index 851c242..36bbf98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,9 @@ line-length = 200 ignore = ["T201"] # ignore print statements [build-system] -requires = ["setuptools", "wheel", "Cython"] \ No newline at end of file +requires = [ + "numpy", + "setuptools", + "wheel", + "Cython" +] \ No newline at end of file From 379e8e1420cd37960342a754ca897496600aa021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Wed, 8 Nov 2023 10:31:13 +0100 Subject: [PATCH 23/24] try fixing failing github test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 168aa80..4cf61aa 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -9,9 +9,11 @@ jobs: max-parallel: 5 matrix: python-version: - - "3.7" + # - "3.7" # conda takes forever to install the dependencies - "3.8" - "3.9" + - "3.10" + - "3.11" steps: - uses: actions/checkout@v2 @@ -65,17 +67,17 @@ jobs: # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - # - name: Test with pytest - # shell: bash -el {0} - # run: | - # echo "which conda" - # type conda - # conda install pytest hypothesis - # echo "which python" - # type python - # echo "Running setup py" - # python setup.py build_ext --inplace - # python -m pytest --nomatlab --notheano tests + - name: Test with pytest + shell: bash -el {0} + run: | + echo "which conda" + type conda + conda install pytest hypothesis + echo "which python" + type python + echo "Running setup py" + python setup.py build_ext --inplace + python -m pytest --nomatlab --notheano tests - name: test build and install shell: bash -el {0} run: | From 26397d3dce3b0112b30bdecd615fdcf00fe56640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=BCmmmerer?= Date: Thu, 9 Nov 2023 23:00:53 +0100 Subject: [PATCH 24/24] Cleanup test workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Kümmmerer --- .github/workflows/test-package-conda.yml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test-package-conda.yml b/.github/workflows/test-package-conda.yml index 4cf61aa..f862467 100644 --- a/.github/workflows/test-package-conda.yml +++ b/.github/workflows/test-package-conda.yml @@ -14,7 +14,6 @@ jobs: - "3.9" - "3.10" - "3.11" - steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2 @@ -25,14 +24,9 @@ jobs: # the shell setting is necessary for loading profile etc which activates the conda environment shell: bash -el {0} run: conda info - - name: Conda list - shell: bash -el {0} - run: conda list - name: Install dependencies shell: bash -el {0} run: | - # conda env update --file environment.yml --name base - # conda config --add channels conda-forge conda install \ boltons \ cython \ @@ -59,23 +53,13 @@ jobs: sphinx \ torchvision \ tqdm - #pip install h5py # https://github.com/h5py/h5py/issues/1880 -# - name: Lint with flake8 -# run: | -# conda install flake8 -# # stop the build if there are Python syntax errors or undefined names -# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics -# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide -# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Conda list + shell: bash -el {0} + run: conda list - name: Test with pytest shell: bash -el {0} run: | - echo "which conda" - type conda conda install pytest hypothesis - echo "which python" - type python - echo "Running setup py" python setup.py build_ext --inplace python -m pytest --nomatlab --notheano tests - name: test build and install