quicklook-package 1.3.2__tar.gz → 1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quicklook_package-1.4/.github/workflows/build-and-test.yml +73 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/.github/workflows/release.yml +9 -4
- {quicklook_package-1.3.2 → quicklook_package-1.4}/.gitignore +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/.pre-commit-config.yaml +5 -5
- {quicklook_package-1.3.2 → quicklook_package-1.4}/LICENSE +0 -0
- quicklook_package-1.4/MANIFEST.in +1 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/PKG-INFO +14 -8
- {quicklook_package-1.3.2 → quicklook_package-1.4}/README.md +0 -0
- quicklook_package-1.4/README_DEV.md +59 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/notebook/examples.ipynb +0 -0
- quicklook_package-1.4/pyproject.toml +92 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/pytest.ini +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/__init__.py +0 -0
- quicklook_package-1.4/quicklook/compat.py +42 -0
- quicklook_package-1.4/quicklook/data/TOIs.csv +7242 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4/quicklook}/data/simbad_obj_types.csv +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/gls.py +16 -49
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/measure.py +4 -13
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/plot.py +28 -77
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/science.mplstyle +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/tql.py +52 -123
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook/utils.py +10 -34
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook_package.egg-info/PKG-INFO +14 -8
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook_package.egg-info/SOURCES.txt +5 -5
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook_package.egg-info/requires.txt +15 -2
- {quicklook_package-1.3.2 → quicklook_package-1.4}/tests/TOI5071_s46_pdcsap_sc.png +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/tests/TOI5071_s46_pdcsap_sc_tls.h5 +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/tests/conftest.py +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/tests/test_import.py +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/tests/test_notebooks.py +3 -10
- {quicklook_package-1.3.2 → quicklook_package-1.4}/tests/test_tql.py +11 -3
- quicklook_package-1.4/tox.ini +47 -0
- quicklook_package-1.3.2/.flake8 +0 -5
- quicklook_package-1.3.2/.github/workflows/build-and-test.yml +0 -76
- quicklook_package-1.3.2/environment.yml +0 -12
- quicklook_package-1.3.2/pyproject.toml +0 -59
- quicklook_package-1.3.2/quicklook/compat.py +0 -61
- quicklook_package-1.3.2/requirements.txt +0 -20
- quicklook_package-1.3.2/setup.py +0 -22
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook_package.egg-info/dependency_links.txt +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/quicklook_package.egg-info/top_level.txt +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/scripts/ql +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/scripts/read_tls +0 -0
- {quicklook_package-1.3.2 → quicklook_package-1.4}/setup.cfg +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-13]
|
|
15
|
+
#python-version: ["3.8", "3.9", "3.10", "3.11"]
|
|
16
|
+
#tox-env: ["py38", "py39", "py310", "py311"] # without dot
|
|
17
|
+
python-version: ["3.10"]
|
|
18
|
+
tox-env: ["py10"] # update also `envlist` in tox.ini
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
uses: actions/setup-python@v4
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Cache pip packages
|
|
31
|
+
uses: actions/cache@v3
|
|
32
|
+
with:
|
|
33
|
+
path: ~/.cache/pip
|
|
34
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
|
|
35
|
+
restore-keys: |
|
|
36
|
+
${{ runner.os }}-pip-
|
|
37
|
+
|
|
38
|
+
- name: Cache tox virtualenvs
|
|
39
|
+
uses: actions/cache@v3
|
|
40
|
+
with:
|
|
41
|
+
path: .tox
|
|
42
|
+
key: ${{ runner.os }}-tox-${{ hashFiles('pyproject.toml') }}
|
|
43
|
+
restore-keys: |
|
|
44
|
+
${{ runner.os }}-tox-
|
|
45
|
+
|
|
46
|
+
- name: Cache Lightkurve data
|
|
47
|
+
uses: actions/cache@v3
|
|
48
|
+
with:
|
|
49
|
+
path: ~/.lightkurve/cache/mastDownload
|
|
50
|
+
key: ${{ runner.os }}-lightkurve-${{ hashFiles('pyproject.toml') }}
|
|
51
|
+
restore-keys: |
|
|
52
|
+
${{ runner.os }}-lightkurve-
|
|
53
|
+
|
|
54
|
+
- name: Remove corrupted FITS (if any)
|
|
55
|
+
run: |
|
|
56
|
+
find ~/.lightkurve/cache/mastDownload -type f -name "*.fits" -size -1M -delete || true
|
|
57
|
+
|
|
58
|
+
- name: Install dependencies
|
|
59
|
+
run: |
|
|
60
|
+
python -m pip install --upgrade pip
|
|
61
|
+
pip install -e ".[dev,notebooks]"
|
|
62
|
+
|
|
63
|
+
- name: Run regular tests
|
|
64
|
+
run: tox -e ${{ matrix.tox-env }}
|
|
65
|
+
|
|
66
|
+
#- name: Run notebook tests
|
|
67
|
+
# run: tox -e notebook
|
|
68
|
+
#- name: Run linting
|
|
69
|
+
# run: tox -e lint
|
|
70
|
+
#- name: Check code formatting
|
|
71
|
+
# run: tox -e format
|
|
72
|
+
#- name: Run type checks
|
|
73
|
+
# run: tox -e type
|
|
@@ -3,7 +3,7 @@ name: Publish to PyPI
|
|
|
3
3
|
on:
|
|
4
4
|
workflow_dispatch: #optional manual run
|
|
5
5
|
release:
|
|
6
|
-
types: [published]
|
|
6
|
+
types: [published]
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
publish:
|
|
@@ -19,11 +19,16 @@ jobs:
|
|
|
19
19
|
python-version: "3.10"
|
|
20
20
|
|
|
21
21
|
- name: Install build tools
|
|
22
|
-
run:
|
|
23
|
-
|
|
22
|
+
run: pip install --upgrade build twine
|
|
23
|
+
|
|
24
|
+
- name: Clean old builds
|
|
25
|
+
run: rm -rf dist/*
|
|
24
26
|
|
|
25
27
|
- name: Build package
|
|
26
|
-
run: python -m build
|
|
28
|
+
run: python -m build --sdist --wheel
|
|
29
|
+
|
|
30
|
+
- name: Verify distributions
|
|
31
|
+
run: twine check dist/*
|
|
27
32
|
|
|
28
33
|
- name: Publish to PyPI
|
|
29
34
|
run: twine upload dist/*
|
|
File without changes
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
-
rev:
|
|
3
|
+
rev: v6.0.0
|
|
4
4
|
hooks:
|
|
5
5
|
- id: check-yaml
|
|
6
6
|
- id: end-of-file-fixer
|
|
7
7
|
- id: trailing-whitespace
|
|
8
8
|
- repo: https://github.com/psf/black
|
|
9
|
-
rev: 25.
|
|
9
|
+
rev: 25.9.0
|
|
10
10
|
hooks:
|
|
11
11
|
- id: black
|
|
12
12
|
language_version: python3.10
|
|
13
|
-
- repo: https://github.com/
|
|
14
|
-
rev:
|
|
13
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
14
|
+
rev: v0.13.1
|
|
15
15
|
hooks:
|
|
16
|
-
|
|
16
|
+
- id: ruff
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include quicklook/data/*.csv
|
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: quicklook-package
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: Quicklook lightcurve plot generator
|
|
5
|
-
Home-page: https://github.com/jpdeleon/quicklook
|
|
3
|
+
Version: 1.4
|
|
6
4
|
Author-email: jpdeleon <jpdeleon.bsap@gmail.com>
|
|
7
5
|
Project-URL: Homepage, https://github.com/jpdeleon/quicklook
|
|
8
6
|
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
7
|
Classifier: Operating System :: POSIX :: Linux
|
|
11
8
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
12
9
|
Requires-Python: >=3.8
|
|
13
10
|
Description-Content-Type: text/markdown
|
|
14
11
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: pre-commit==3.4.0
|
|
16
12
|
Requires-Dist: matplotlib
|
|
17
13
|
Requires-Dist: lightkurve==2.5
|
|
18
14
|
Requires-Dist: numpy==1.23
|
|
19
15
|
Requires-Dist: transitleastsquares==1.32
|
|
20
16
|
Requires-Dist: wotan==1.10
|
|
21
|
-
Requires-Dist: aesthetic==0.6
|
|
22
17
|
Requires-Dist: flammkuchen==1.0.3
|
|
23
18
|
Requires-Dist: reproject==0.12.0
|
|
24
19
|
Requires-Dist: astroplan==0.9
|
|
25
20
|
Requires-Dist: loguru
|
|
26
21
|
Requires-Dist: importlib_resources>=5.0.0
|
|
27
|
-
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest-benchmark; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest-xdist; extra == "dev"
|
|
26
|
+
Requires-Dist: black; extra == "dev"
|
|
27
|
+
Requires-Dist: mypy; extra == "dev"
|
|
28
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
29
|
+
Requires-Dist: tox; extra == "dev"
|
|
30
|
+
Requires-Dist: ruff; extra == "dev"
|
|
31
|
+
Provides-Extra: notebooks
|
|
32
|
+
Requires-Dist: ipykernel; extra == "notebooks"
|
|
33
|
+
Requires-Dist: jupyter; extra == "notebooks"
|
|
34
|
+
Requires-Dist: nbconvert; extra == "notebooks"
|
|
28
35
|
Dynamic: license-file
|
|
29
|
-
Dynamic: summary
|
|
30
36
|
|
|
31
37
|
# QuickLook
|
|
32
38
|
`quicklook` is a Python program that runs a simple pipeline to search for transit signal in TESS (and Kepler soon) light curves. This program can be run in a jupyter notebook or from the terminal using the `ql` script.
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
## Development & Testing
|
|
2
|
+
|
|
3
|
+
- **Install dev tools**:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install -e ".[dev,notebooks]"
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
- **Initialize pre-commit**:
|
|
10
|
+
```bash
|
|
11
|
+
pre-commit install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- **Run tests**:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
tox
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- **Run only notebooks tests**:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pytest -v -m notebook
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- **Run linting, typing, and formatting**:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
tox -e lint
|
|
30
|
+
tox -e type
|
|
31
|
+
tox -e black
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- **Benchmark performance** (locally, not in CI):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pytest --benchmark-only
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
import os
|
|
43
|
+
import pytest
|
|
44
|
+
import pytest_benchmark
|
|
45
|
+
|
|
46
|
+
@pytest.mark.skipif(os.getenv("CI") == "true", reason="Skip performance tests in CI")
|
|
47
|
+
@pytest.mark.benchmark
|
|
48
|
+
def test_tql_runtime(benchmark, planet_inputs):
|
|
49
|
+
def run_ql():
|
|
50
|
+
ql = TessQuickLook(**planet_inputs)
|
|
51
|
+
fig = ql.plot_tql()
|
|
52
|
+
benchmark(run_ql)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- **Re-install tox**:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
tox -r
|
|
59
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=61.0",
|
|
4
|
+
"setuptools_scm",
|
|
5
|
+
"wheel"
|
|
6
|
+
]
|
|
7
|
+
build-backend = "setuptools.build_meta"
|
|
8
|
+
|
|
9
|
+
[tool.setuptools_scm]
|
|
10
|
+
fallback_version = "0.0.0"
|
|
11
|
+
version_scheme = "guess-next-dev"
|
|
12
|
+
local_scheme = "no-local-version"
|
|
13
|
+
|
|
14
|
+
[tool.setuptools.packages.find]
|
|
15
|
+
where = ["."]
|
|
16
|
+
include = ["quicklook*"]
|
|
17
|
+
exclude = ["app*", "static*", "notebook*", "tests*"]
|
|
18
|
+
|
|
19
|
+
[tool.setuptools.package-data]
|
|
20
|
+
"quicklook" = ["data/*.csv"]
|
|
21
|
+
|
|
22
|
+
[project]
|
|
23
|
+
name = "quicklook-package"
|
|
24
|
+
dynamic = ["version"]
|
|
25
|
+
authors = [{name = "jpdeleon", email = "jpdeleon.bsap@gmail.com"}]
|
|
26
|
+
readme = "README.md"
|
|
27
|
+
requires-python = ">=3.8"
|
|
28
|
+
classifiers = [
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Operating System :: POSIX :: Linux",
|
|
31
|
+
"Topic :: Scientific/Engineering :: Astronomy",
|
|
32
|
+
]
|
|
33
|
+
dependencies = [
|
|
34
|
+
"matplotlib",
|
|
35
|
+
"lightkurve==2.5",
|
|
36
|
+
"numpy==1.23",
|
|
37
|
+
"transitleastsquares==1.32",
|
|
38
|
+
"wotan==1.10",
|
|
39
|
+
"flammkuchen==1.0.3",
|
|
40
|
+
"reproject==0.12.0",
|
|
41
|
+
"astroplan==0.9",
|
|
42
|
+
"loguru",
|
|
43
|
+
"importlib_resources>=5.0.0"
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
dev = [
|
|
48
|
+
"pytest", # run tests
|
|
49
|
+
"pytest-benchmark", # measure performance
|
|
50
|
+
"pytest-xdist",
|
|
51
|
+
"black", # enforce formatting
|
|
52
|
+
"mypy", # static type checking
|
|
53
|
+
"pre-commit", # hook management
|
|
54
|
+
"tox", # multi-env testing
|
|
55
|
+
"ruff", # fast linting
|
|
56
|
+
#"flake8>=6.0" # legacy linting
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
# --- converter ---
|
|
60
|
+
notebooks = [
|
|
61
|
+
"ipykernel",
|
|
62
|
+
"jupyter",
|
|
63
|
+
"nbconvert"
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[project.urls]
|
|
67
|
+
Homepage = "https://github.com/jpdeleon/quicklook"
|
|
68
|
+
|
|
69
|
+
# --- formatter ---
|
|
70
|
+
[tool.black]
|
|
71
|
+
line-length = 100
|
|
72
|
+
include = '\.pyi?$'
|
|
73
|
+
exclude = '/(\.git|\.hg|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist)/'
|
|
74
|
+
|
|
75
|
+
# --- linter ---
|
|
76
|
+
[tool.ruff]
|
|
77
|
+
line-length = 100
|
|
78
|
+
select = ["B", "C", "E", "F", "W", "B9"]
|
|
79
|
+
|
|
80
|
+
[tool.ruff.lint]
|
|
81
|
+
ignore = [
|
|
82
|
+
"E203",
|
|
83
|
+
"E266",
|
|
84
|
+
"E501",
|
|
85
|
+
"F403",
|
|
86
|
+
"F401",
|
|
87
|
+
"C901",
|
|
88
|
+
"B904", #exceptions
|
|
89
|
+
"B006", #Do not use mutable data structures for argument defaults
|
|
90
|
+
"B028", #No explicit `stacklevel` keyword argument found; in gls.py
|
|
91
|
+
"C408", #Unnecessary `dict()` call; in gls.py
|
|
92
|
+
]
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Compatibility module for different Python versions.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def get_data_path(package_name: str) -> Path:
|
|
10
|
+
"""
|
|
11
|
+
Get the path to the data directory for a package, compatible across Python versions.
|
|
12
|
+
"""
|
|
13
|
+
# Python ≥3.9
|
|
14
|
+
if sys.version_info >= (3, 9):
|
|
15
|
+
try:
|
|
16
|
+
from importlib.resources import files, as_file
|
|
17
|
+
|
|
18
|
+
data_path = files(package_name).joinpath("data")
|
|
19
|
+
# as_file ensures we get a real filesystem path
|
|
20
|
+
return Path(as_file(data_path).__enter__())
|
|
21
|
+
except Exception:
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
# Backport for older Python
|
|
25
|
+
try:
|
|
26
|
+
from importlib_resources import files, as_file
|
|
27
|
+
|
|
28
|
+
data_path = files(package_name).joinpath("data")
|
|
29
|
+
return Path(as_file(data_path).__enter__())
|
|
30
|
+
except Exception:
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
# Fallback using __file__
|
|
34
|
+
import importlib.util
|
|
35
|
+
import os
|
|
36
|
+
|
|
37
|
+
spec = importlib.util.find_spec(package_name)
|
|
38
|
+
if spec and spec.origin:
|
|
39
|
+
return Path(spec.origin).parent.joinpath("data")
|
|
40
|
+
|
|
41
|
+
# Last resort
|
|
42
|
+
return Path(sys.modules[package_name].__file__).parent.joinpath("data")
|