Skip to content

Commit

Permalink
Remove support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed Feb 6, 2024
1 parent 8f0f8b9 commit 0b5459b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ cov = [
]

[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
python = ["3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.types]
dependencies = [
Expand Down
24 changes: 21 additions & 3 deletions src/qusi/toy_light_curve_collection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from pathlib import Path

try:
from typing import List
except ImportError:
from typing_extensions import List

import numpy as np

from qusi.light_curve import LightCurve
Expand All @@ -15,6 +20,8 @@ class ToyLightCurve:
def flat(cls, value: float = 1) -> LightCurve:
"""
Creates a flat light curve.
:param value: The flux value of the flat light curve.
"""
length = 100
fluxes = np.full(shape=[length], fill_value=value, dtype=np.float32)
Expand All @@ -33,14 +40,25 @@ def sine_wave(cls, period=50) -> LightCurve:
return LightCurve.new(times=times, fluxes=fluxes)


def toy_light_curve_get_paths_function():
def toy_light_curve_get_paths_function() -> List[Path]:
"""
A fake function to fulfill the need of returning a list of paths.
"""
return [Path('')]

def toy_flat_light_curve_load_times_and_fluxes(path: Path) -> (np.ndarray, np.ndarray):

def toy_flat_light_curve_load_times_and_fluxes(_path: Path) -> (np.ndarray, np.ndarray):
"""
Loads a flat toy light curve.
"""
light_curve = ToyLightCurve.flat()
return light_curve.times, light_curve.fluxes

def toy_sine_wave_light_curve_load_times_and_fluxes(path: Path) -> (np.ndarray, np.ndarray):

def toy_sine_wave_light_curve_load_times_and_fluxes(_path: Path) -> (np.ndarray, np.ndarray):
"""
Loads a sine wave toy light curve.
"""
light_curve = ToyLightCurve.sine_wave()
return light_curve.times, light_curve.fluxes

Expand Down

0 comments on commit 0b5459b

Please sign in to comment.