Skip to content
Snippets Groups Projects
Commit 822806e2 authored by Deep Chatterjee's avatar Deep Chatterjee
Browse files

drop python3.7 support, add python3.9 testing

- Fix failing detchar test for python3.9
- Restrict ligo.em-bright < 1.0 until SCCB approval. See !854
Using importlib resources on a data path leads to IsADirectory
error. Replaced with pathlib.
parent 8671782f
No related branches found
No related tags found
1 merge request!855Remove python3.7 support, add python3.9 testing
......@@ -55,12 +55,12 @@ build:
- poetry config virtualenvs.create false
- poetry install -E test
needs: []
test/poetry/python3.7:
extends: .test-poetry
image: python:3.7
test/poetry/python3.8:
extends: .test-poetry
image: python:3.8
test/poetry/python3.9:
extends: .test-poetry
image: python:3.9
# Run test suite using wheel and bleeding-edge dependencies
.test-wheel:
......@@ -75,12 +75,12 @@ test/poetry/python3.8:
- *install-redis
needs:
- build
test/wheel/python3.7:
extends: .test-wheel
image: python:3.7
test/wheel/python3.8:
extends: .test-wheel
image: python:3.8
test/wheel/python3.9:
extends: .test-wheel
image: python:3.9
lint:
stage: test
......@@ -142,7 +142,7 @@ pages:
only:
- main
needs:
- test/poetry/python3.7
- test/poetry/python3.8
# Upload package to PyPI.
# Place your PyPI API token in the repository's GitLab CI secrets.
......
from importlib import resources
from io import BytesIO
import logging
from pathlib import Path
from unittest.mock import call, patch
from astropy.time import Time
......@@ -12,20 +12,17 @@ import pytest
from ..import app
from ..import _version
from ..tasks import detchar
from . import data
@pytest.fixture
def llhoft_glob_pass(monkeypatch):
with resources.path(data, '') as path:
path = str(path / 'llhoft/pass/{detector}/*.gwf')
path = str(Path(__file__).parent / 'data/llhoft/pass/{detector}/*.gwf')
yield monkeypatch.setitem(app.conf, 'llhoft_glob', path)
@pytest.fixture
def llhoft_glob_fail(monkeypatch):
with resources.path(data, '') as path:
path = str(path / 'llhoft/fail/{detector}/*.gwf')
path = str(Path(__file__).parent / 'data/llhoft/fail/{detector}/*.gwf')
yield monkeypatch.setitem(app.conf, 'llhoft_glob', path)
......@@ -70,8 +67,7 @@ def test_create_cache_old_data(mock_find, llhoft_glob_fail):
mock_find.assert_called()
with resources.path(data, '') as expected_path:
expected_path = str(expected_path / 'llhoft/omegascan/scanme.gwf')
expected_path = Path(__file__).parent / 'data/llhoft/omegascan/scanme.gwf'
@patch('gwcelery.tasks.detchar.create_cache', return_value=[expected_path])
......
This diff is collapsed.
......@@ -45,7 +45,7 @@ include = [
"Bug Tracker" = "https://git.ligo.org/emfollow/gwcelery/issues"
[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
astropy = ">=4.3.1" # https://github.com/astropy/astropy/issues/11879
bilby-pipe = ">=0.3.8"
celery = {version = ">=5.1", extras = ["redis"]}
......@@ -67,7 +67,7 @@ ligo-followup-advocate = ">=1.1.6"
ligo-gracedb = ">=2.7.5" # https://git.ligo.org/lscsoft/gracedb-client/-/issues/28
ligo-raven = ">=2.0"
ligo-segments = "*"
"ligo.em-bright" = ">=0.1.5"
"ligo.em-bright" = "<1.0"
"ligo.skymap" = ">=0.4.0"
lscsoft-glue = "*"
lxml = "*"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment