diff --git a/.jp_app_launcher_reducer.yaml b/.jp_app_launcher_reducer.yaml new file mode 100644 index 0000000..0b2b59e --- /dev/null +++ b/.jp_app_launcher_reducer.yaml @@ -0,0 +1,9 @@ +# Notebook in the "Stellarphot setup" section of the launcher + +- title: Image calibration + description: Settings for camera, observatory and passbands + source: ../reducer/reducer-template.ipynb + icon: ../reducer/stellarphot-logo.svg + cwd: not_used + type: notebook + catalog: Astro tools diff --git a/pyproject.toml b/pyproject.toml index dc68fc7..3884a12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,8 @@ dependencies = [ "numpy", "scikit-image", "scipy", + "jupyter-app-launcher", + "ipyautoui", ] [project.optional-dependencies] @@ -54,3 +56,11 @@ version-file = "reducer/_version.py" include = [ "/reducer", ] + +[tool.hatch.build.targets.wheel.shared-data] +# This section determines what data files are included in the wheel +# and where they should eventually be installed in the user's environment. +"docs/_static/stellarphot-logo.svg" = "share/jupyter/stellarphot/stellarphot-logo.svg" +# This includes the notebooks used in the launcher +"reducer/reducer-template.ipynb" = "share/jupyter/reducer/reducer-template.ipynb" +".jp_app_launcher_reducer.yaml" = "share/jupyter/jupyter_app_launcher/jp_app_launcher_stellarphot.yaml" diff --git a/reducer/__init__.py b/reducer/__init__.py index 76608cb..7dfab0e 100644 --- a/reducer/__init__.py +++ b/reducer/__init__.py @@ -3,6 +3,4 @@ from .core import * -from ._version import get_versions -__version__ = get_versions()['version'] -del get_versions +from ._version import __version__, __version_tuple__ # noqa: F401 diff --git a/reducer/reducer-template.ipynb b/reducer/reducer-template.ipynb index e2ef752..9bd41d1 100644 --- a/reducer/reducer-template.ipynb +++ b/reducer/reducer-template.ipynb @@ -7,27 +7,6 @@ "## Reducer: (Put your name here)" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Reviewer: (Put your name here)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# jupyter notebook crash course" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Click on a code cell (has grey background) then press Shift-Enter (at the same time) to run a code cell. That will add the controls (buttons, etc) you use to do the reduction one-by-one; then use them for reduction." - ] - }, { "cell_type": "code", "execution_count": null, @@ -53,7 +32,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Enter name of directory that contains your data in the cell below, " + "# Select the directory that contains your data in the cell below" ] }, { @@ -167,7 +146,7 @@ "exp_times_chooser = ipw.Dropdown(description=\"Exposure time\", options=EXPOSURE_KEYWORDS)\n", "maybe_exp_time = [exp for exp in EXPOSURE_KEYWORDS if exp.lower() in images.summary.colnames]\n", "exp_times_chooser.value = maybe_exp_time[0] if maybe_exp_time else EXPOSURE_KEYWORDS[0]\n", - " \n", + "\n", "title = ipw.HTML(value=\"Choose the keyword in your images for each type\")\n", "vb = ipw.VBox(children=[title] + list(widgets.values()) + [exp_times_chooser])\n", "vb\n" @@ -489,13 +468,6 @@ "reduced_browser = ImageBrowser(reduced_collection, keys=['imagetyp', 'filter'])\n", "reduced_browser.display()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {