Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: "3.12"
python-version: "3.13"
miniforge-version: latest
channels: conda-forge,defaults
show-channel-urls: true
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
version: "~= 26.1"
2 changes: 1 addition & 1 deletion .github/workflows/test_and_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
Expand Down
18 changes: 5 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = [ "setuptools", "setuptools_scm<8.0" ]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -39,8 +39,8 @@ dependencies = [
"pytz",
"skyproj",
"tabulate",
"rubin-scheduler >= 3.18.0",
"rubin-sim >= 2.6.0",
"rubin-scheduler >= 3.22.0",
"rubin-sim >= 2.6.1",
"uranography >= 1.4.1 ",
]

Expand Down Expand Up @@ -72,22 +72,14 @@ version = { attr = "setuptools_scm.get_version" }
[tool.setuptools.packages.find]
where = [ "" ]

[tool.setuptools_scm]
write_to = "schedview/version.py"
write_to_template = """
# Generated by setuptools_scm
__all__ = ["__version__"]
__version__ = "{version}"
"""

[tool.pytest.ini_options]
addopts = "--ignore-glob=*/version.py --ignore-glob=*data_dir/*"
testpaths = "."
asyncio_default_fixture_loop_scope="function"

[tool.black]
line-length = 110
target-version = ["py311"]
target-version = ["py313"]

[tool.isort]
profile = "black"
Expand All @@ -114,7 +106,7 @@ select = [
"N", # pep8-naming
"W", # pycodestyle
]
target-version = "py311"
target-version = "py313"
extend-select = [
"RUF100", # Warn about unused noqa
]
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ scikit-learn
skyproj
tabulate
uranography>=1.4.1
rubin-scheduler>=3.18.0
rubin-sim>=2.6.0
rubin-scheduler>=3.22.0
rubin-sim>=2.6.1
pip
9 changes: 8 additions & 1 deletion schedview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("rubin_sim")
except PackageNotFoundError:
# package is not installed
pass

from .dayobs import DayObs
from .sphere import *
from .util import band_column
from .version import __version__
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SchedulerSnapshotDashboard(param.Parameterized):
"""

# Get available skybrightness_pre date range.
(mjd_min, mjd_max) = get_sky_brightness_date_bounds()
mjd_min, mjd_max = get_sky_brightness_date_bounds()
# Convert astropy times to iso format to be
# used as bounds for datetime parameter.
date_bounds = (mjd_min.to_datetime(), mjd_max.to_datetime())
Expand Down Expand Up @@ -552,7 +552,7 @@ def read_scheduler(self):
scheduler_resource_path = ResourcePath(scheduler_path)
scheduler_resource_path.use_threads = False
with scheduler_resource_path.as_local() as local_scheduler_resource:
(scheduler, conditions) = schedview.collect.scheduler_pickle.read_scheduler(
scheduler, conditions = schedview.collect.scheduler_pickle.read_scheduler(
local_scheduler_resource.ospath
)

Expand Down
2 changes: 1 addition & 1 deletion schedview/collect/scheduler_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def read_scheduler(file_name_or_url=None, everything=False):
contents = read_local_scheduler_pickle(local_scheduler_resource.ospath, everything=True)
return contents
else:
(scheduler, conditions) = read_local_scheduler_pickle(local_scheduler_resource.ospath)
scheduler, conditions = read_local_scheduler_pickle(local_scheduler_resource.ospath)

return scheduler, conditions

Expand Down
Binary file modified schedview/data/sample_opsim.db
Binary file not shown.
Binary file modified schedview/data/sample_rewards.h5
Binary file not shown.
Binary file modified schedview/data/sample_scheduler.pickle.xz
Binary file not shown.
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytest
black>=24.0
black
ruff
pytest-cov
firefox
Expand Down
Loading