astro-otter 0.0.2__tar.gz → 0.2.0__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.
Files changed (36) hide show
  1. astro_otter-0.2.0/PKG-INFO +164 -0
  2. astro_otter-0.2.0/README.md +92 -0
  3. {astro_otter-0.0.2 → astro_otter-0.2.0}/pyproject.toml +36 -14
  4. astro_otter-0.2.0/src/astro_otter.egg-info/PKG-INFO +164 -0
  5. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/astro_otter.egg-info/SOURCES.txt +5 -0
  6. astro_otter-0.2.0/src/astro_otter.egg-info/requires.txt +33 -0
  7. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/__init__.py +6 -1
  8. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/_version.py +1 -1
  9. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/exceptions.py +29 -0
  10. astro_otter-0.2.0/src/otter/io/data_finder.py +1037 -0
  11. astro_otter-0.2.0/src/otter/io/host.py +186 -0
  12. astro_otter-0.2.0/src/otter/io/otter.py +1244 -0
  13. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/io/transient.py +337 -164
  14. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/plotter/otter_plotter.py +6 -4
  15. astro_otter-0.2.0/src/otter/plotter/plotter.py +274 -0
  16. astro_otter-0.2.0/src/otter/schema.py +296 -0
  17. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/util.py +258 -17
  18. astro_otter-0.2.0/tests/test_data_finder.py +264 -0
  19. {astro_otter-0.0.2 → astro_otter-0.2.0}/tests/test_exceptions.py +24 -0
  20. astro_otter-0.2.0/tests/test_host.py +71 -0
  21. {astro_otter-0.0.2 → astro_otter-0.2.0}/tests/test_otter.py +10 -8
  22. {astro_otter-0.0.2 → astro_otter-0.2.0}/tests/test_transient.py +32 -1
  23. astro_otter-0.0.2/PKG-INFO +0 -875
  24. astro_otter-0.0.2/README.md +0 -815
  25. astro_otter-0.0.2/src/astro_otter.egg-info/PKG-INFO +0 -875
  26. astro_otter-0.0.2/src/astro_otter.egg-info/requires.txt +0 -17
  27. astro_otter-0.0.2/src/otter/io/otter.py +0 -492
  28. astro_otter-0.0.2/src/otter/plotter/plotter.py +0 -96
  29. {astro_otter-0.0.2 → astro_otter-0.2.0}/LICENSE +0 -0
  30. {astro_otter-0.0.2 → astro_otter-0.2.0}/setup.cfg +0 -0
  31. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/astro_otter.egg-info/dependency_links.txt +0 -0
  32. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/astro_otter.egg-info/top_level.txt +0 -0
  33. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/io/__init__.py +0 -0
  34. {astro_otter-0.0.2 → astro_otter-0.2.0}/src/otter/plotter/__init__.py +0 -0
  35. {astro_otter-0.0.2 → astro_otter-0.2.0}/tests/test_package.py +0 -0
  36. {astro_otter-0.0.2 → astro_otter-0.2.0}/tests/test_util.py +0 -0
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: astro-otter
3
+ Version: 0.2.0
4
+ Author-email: Noah Franz <nfranz@arizona.edu>
5
+ License: MIT License
6
+
7
+ Copyright (c) 2023 Noah Franz
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Project-URL: Home, https://github.com/astro-otter
28
+ Classifier: License :: OSI Approved :: BSD License
29
+ Classifier: Topic :: Scientific/Engineering
30
+ Classifier: Intended Audience :: Science/Research
31
+ Classifier: Intended Audience :: Developers
32
+ Classifier: Operating System :: OS Independent
33
+ Classifier: License :: OSI Approved :: BSD License
34
+ Classifier: Programming Language :: Python
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Development Status :: 2 - Pre-Alpha
39
+ Requires-Python: <3.12,>=3.10
40
+ Description-Content-Type: text/markdown
41
+ License-File: LICENSE
42
+ Requires-Dist: numpy<2,>=1.20
43
+ Requires-Dist: astropy>=6
44
+ Requires-Dist: pandas
45
+ Requires-Dist: synphot
46
+ Requires-Dist: typing-extensions
47
+ Requires-Dist: pyarango
48
+ Requires-Dist: matplotlib
49
+ Requires-Dist: plotly
50
+ Requires-Dist: astroquery
51
+ Requires-Dist: ads
52
+ Requires-Dist: skypatrol
53
+ Requires-Dist: fundamentals
54
+ Requires-Dist: astro-datalab
55
+ Requires-Dist: sparclclient
56
+ Requires-Dist: astro-ghost
57
+ Requires-Dist: pydantic
58
+ Requires-Dist: pyreadline3; platform_system == "Windows"
59
+ Provides-Extra: docs
60
+ Requires-Dist: Sphinx>=3.0.0; extra == "docs"
61
+ Requires-Dist: myst-parser>=0.13; extra == "docs"
62
+ Requires-Dist: nbsphinx>=0.9.1; extra == "docs"
63
+ Requires-Dist: sphinx-book-theme>=0.0.33; extra == "docs"
64
+ Requires-Dist: sphinx_copybutton; extra == "docs"
65
+ Requires-Dist: autodoc; extra == "docs"
66
+ Requires-Dist: ipykernel; extra == "docs"
67
+ Requires-Dist: autodoc_pydantic; extra == "docs"
68
+ Provides-Extra: dev
69
+ Requires-Dist: ruff; extra == "dev"
70
+ Requires-Dist: pre-commit; extra == "dev"
71
+ Dynamic: license-file
72
+
73
+ # OTTER API
74
+ ### **O**pen mul**T**iwavelength **T**ransient **E**vent **R**epository
75
+
76
+ A Python API for the OTTER.
77
+
78
+ [actions-badge]: https://github.com/astro-otter/otter/workflows/CI/badge.svg
79
+ [actions-link]: https://github.com/astro-otter/otter/actions
80
+ [black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
81
+ [black-link]: https://github.com/psf/black
82
+ [conda-badge]: https://img.shields.io/conda/vn/conda-forge/hepfile
83
+ [conda-link]: https://github.com/conda-forge/hepfile-feedstock
84
+ [github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
85
+ [github-discussions-link]: https://github.com/mattbellis/hepfile/discussions
86
+ [gitter-badge]: https://badges.gitter.im/https://github.com/mattbellis/hepfile/community.svg
87
+ [gitter-link]: https://gitter.im/https://github.com/mattbellis/hepfile/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
88
+ [pypi-link]: https://pypi.org/project/astro-otter/
89
+ [pypi-platforms]: https://img.shields.io/pypi/pyversions/astro-otter
90
+ [pypi-version]: https://badge.fury.io/py/astro-otter.svg
91
+ [rtd-badge]: https://readthedocs.org/projects/otter/badge/?version=latest
92
+ [rtd-link]: https://otter.readthedocs.io/en/latest/?badge=latest
93
+ [sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
94
+ [ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
95
+ [ruff-link]: https://github.com/astral-sh/ruff
96
+ [codecov-badge]: https://codecov.io/gh/astro-otter/otter/graph/badge.svg?token=BtCerOdTc0
97
+ [codecov-link]: https://codecov.io/gh/astro-otter/otter
98
+
99
+ [![Documentation Status](https://readthedocs.org/projects/astro-otter/badge/?version=latest)](https://astro-otter.readthedocs.io/en/latest/?badge=latest)
100
+ [![Actions Status][actions-badge]][actions-link]
101
+ [![PyPI version][pypi-version]][pypi-link]
102
+ [![Linting: Ruff][ruff-badge]][ruff-link]
103
+ [![codecov][codecov-badge]][codecov-link]
104
+
105
+ ## Installation
106
+ To install the OTTER API use
107
+ ```
108
+ python3 -m pip install astro-otter
109
+ ```
110
+
111
+ ## Developer Instructions
112
+ 1. Set the `OTTER_ROOT` environment variable
113
+ ```
114
+ export OTTER_ROOT=/path/to/where/to/clone
115
+ ```
116
+ 2. Clone the relevant repos:
117
+ ```
118
+ git clone https://github.com/astro-otter/otter.git $OTTER_ROOT/otter
119
+ git clone https://github.com/astro-otter/otterdb.git $OTTER_ROOT/otterdb
120
+ ```
121
+ 3. Install the NASA ADS Python API by following the instructions at https://ads.readthedocs.io/en/latest/#getting-started
122
+ 4. Install otter, the API for this database. From
123
+ the root directory where you installed these repos:
124
+ ```
125
+ cd $OTTER_ROOT/otter
126
+ python -m pip install -e .
127
+ ```
128
+ 5. Process the data to build the local "database" (although it is really just a directory).
129
+ Then, you can build the "database" by running the
130
+ following commands:
131
+ ```
132
+ cd $OTTER_ROOT/otter/scripts/
133
+ python3 gen_summary_table.py --otterroot $OTTER_ROOT
134
+ ```
135
+ 6. Easily access the data using the Otter code! In python:
136
+ ```
137
+ import os
138
+ from otter import Otter
139
+ otter = Otter(os.path.join(os.environ['OTTER_ROOT'], 'otterdb', '.otter'))
140
+ res = otter.query(names='AT2018hyz')
141
+ print(res)
142
+ ```
143
+
144
+ ## Installation from Source
145
+ To install the OTTER API from the source code use
146
+ ```
147
+ git clone https://github.com/astro-otter/otter.git
148
+ cd otter
149
+ python -m pip install .
150
+ ```
151
+ This will be changed into the more convenient `python -m pip install astro-otter` at a later date!
152
+
153
+ For developers, please also enable the pre-commit hooks using
154
+ ```
155
+ pre-commit install
156
+ ```
157
+
158
+ ## Repo Organization
159
+ | Directory | Contents |
160
+ |------------|------------|
161
+ | `src/otter` | A pip installable API for interfacing with the OTTER database|
162
+ | `scripts` | The pipeline scripts for converting unprocessed data into the OTTER JSON format|
163
+ | `docs` | Documentation for the OTTER API |
164
+ | `test` | Some Unit tests for the source code |
@@ -0,0 +1,92 @@
1
+ # OTTER API
2
+ ### **O**pen mul**T**iwavelength **T**ransient **E**vent **R**epository
3
+
4
+ A Python API for the OTTER.
5
+
6
+ [actions-badge]: https://github.com/astro-otter/otter/workflows/CI/badge.svg
7
+ [actions-link]: https://github.com/astro-otter/otter/actions
8
+ [black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
9
+ [black-link]: https://github.com/psf/black
10
+ [conda-badge]: https://img.shields.io/conda/vn/conda-forge/hepfile
11
+ [conda-link]: https://github.com/conda-forge/hepfile-feedstock
12
+ [github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
13
+ [github-discussions-link]: https://github.com/mattbellis/hepfile/discussions
14
+ [gitter-badge]: https://badges.gitter.im/https://github.com/mattbellis/hepfile/community.svg
15
+ [gitter-link]: https://gitter.im/https://github.com/mattbellis/hepfile/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
16
+ [pypi-link]: https://pypi.org/project/astro-otter/
17
+ [pypi-platforms]: https://img.shields.io/pypi/pyversions/astro-otter
18
+ [pypi-version]: https://badge.fury.io/py/astro-otter.svg
19
+ [rtd-badge]: https://readthedocs.org/projects/otter/badge/?version=latest
20
+ [rtd-link]: https://otter.readthedocs.io/en/latest/?badge=latest
21
+ [sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
22
+ [ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
23
+ [ruff-link]: https://github.com/astral-sh/ruff
24
+ [codecov-badge]: https://codecov.io/gh/astro-otter/otter/graph/badge.svg?token=BtCerOdTc0
25
+ [codecov-link]: https://codecov.io/gh/astro-otter/otter
26
+
27
+ [![Documentation Status](https://readthedocs.org/projects/astro-otter/badge/?version=latest)](https://astro-otter.readthedocs.io/en/latest/?badge=latest)
28
+ [![Actions Status][actions-badge]][actions-link]
29
+ [![PyPI version][pypi-version]][pypi-link]
30
+ [![Linting: Ruff][ruff-badge]][ruff-link]
31
+ [![codecov][codecov-badge]][codecov-link]
32
+
33
+ ## Installation
34
+ To install the OTTER API use
35
+ ```
36
+ python3 -m pip install astro-otter
37
+ ```
38
+
39
+ ## Developer Instructions
40
+ 1. Set the `OTTER_ROOT` environment variable
41
+ ```
42
+ export OTTER_ROOT=/path/to/where/to/clone
43
+ ```
44
+ 2. Clone the relevant repos:
45
+ ```
46
+ git clone https://github.com/astro-otter/otter.git $OTTER_ROOT/otter
47
+ git clone https://github.com/astro-otter/otterdb.git $OTTER_ROOT/otterdb
48
+ ```
49
+ 3. Install the NASA ADS Python API by following the instructions at https://ads.readthedocs.io/en/latest/#getting-started
50
+ 4. Install otter, the API for this database. From
51
+ the root directory where you installed these repos:
52
+ ```
53
+ cd $OTTER_ROOT/otter
54
+ python -m pip install -e .
55
+ ```
56
+ 5. Process the data to build the local "database" (although it is really just a directory).
57
+ Then, you can build the "database" by running the
58
+ following commands:
59
+ ```
60
+ cd $OTTER_ROOT/otter/scripts/
61
+ python3 gen_summary_table.py --otterroot $OTTER_ROOT
62
+ ```
63
+ 6. Easily access the data using the Otter code! In python:
64
+ ```
65
+ import os
66
+ from otter import Otter
67
+ otter = Otter(os.path.join(os.environ['OTTER_ROOT'], 'otterdb', '.otter'))
68
+ res = otter.query(names='AT2018hyz')
69
+ print(res)
70
+ ```
71
+
72
+ ## Installation from Source
73
+ To install the OTTER API from the source code use
74
+ ```
75
+ git clone https://github.com/astro-otter/otter.git
76
+ cd otter
77
+ python -m pip install .
78
+ ```
79
+ This will be changed into the more convenient `python -m pip install astro-otter` at a later date!
80
+
81
+ For developers, please also enable the pre-commit hooks using
82
+ ```
83
+ pre-commit install
84
+ ```
85
+
86
+ ## Repo Organization
87
+ | Directory | Contents |
88
+ |------------|------------|
89
+ | `src/otter` | A pip installable API for interfacing with the OTTER database|
90
+ | `scripts` | The pipeline scripts for converting unprocessed data into the OTTER JSON format|
91
+ | `docs` | Documentation for the OTTER API |
92
+ | `test` | Some Unit tests for the source code |
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ['setuptools>=42']
2
+ requires = ['setuptools>=64']
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
@@ -9,7 +9,7 @@ readme = "README.md"
9
9
  license = {file = "LICENSE"}
10
10
  dynamic = ["version"]
11
11
 
12
- requires-python = ">=3.9"
12
+ requires-python = ">=3.10,<3.12"
13
13
 
14
14
  classifiers = [
15
15
  "License :: OSI Approved :: BSD License",
@@ -20,7 +20,6 @@ classifiers = [
20
20
  "License :: OSI Approved :: BSD License",
21
21
  "Programming Language :: Python",
22
22
  "Programming Language :: Python :: 3",
23
- "Programming Language :: Python :: 3.9",
24
23
  "Programming Language :: Python :: 3.10",
25
24
  "Programming Language :: Python :: 3.11",
26
25
  "Development Status :: 2 - Pre-Alpha"
@@ -28,31 +27,54 @@ classifiers = [
28
27
 
29
28
  dependencies = [
30
29
  # necessary dependencies for the src code
31
- "numpy>=1.20",
32
- "astropy>=5.2",
30
+ "numpy>=1.20,<2",
31
+ "astropy>=6",
33
32
  "pandas",
33
+ "synphot",
34
+ "typing-extensions",
35
+ "pyarango",
36
+
37
+ # for the plotting
34
38
  "matplotlib",
35
39
  "plotly",
40
+
41
+ # for the DataFinder query tool
36
42
  "astroquery",
37
- "synphot",
38
43
  "ads",
44
+ "skypatrol",
45
+ "fundamentals",
46
+ "astro-datalab",
47
+ "sparclclient",
48
+ "astro-ghost",
39
49
 
40
- # useful dev tools
41
- "ruff", # linter
42
- "pre-commit", # enable pre-commit hooks
50
+ # for the schema validation
51
+ "pydantic",
52
+
53
+ # only for windows OS b/c it doesn't ship with readline by default
54
+ 'pyreadline3; platform_system == "Windows"'
55
+ ]
43
56
 
44
- # tools for building the readthedocs page
57
+ [project.urls]
58
+ Home = "https://github.com/astro-otter"
59
+
60
+ [project.optional-dependencies]
61
+ # tools for building the readthedocs page
62
+ docs = [
45
63
  "Sphinx>=3.0.0",
46
- "myst_parser>=0.13",
64
+ "myst-parser>=0.13",
47
65
  "nbsphinx>=0.9.1",
48
66
  "sphinx-book-theme>=0.0.33",
49
67
  "sphinx_copybutton",
50
68
  "autodoc",
51
- "ipykernel"
69
+ "ipykernel",
70
+ "autodoc_pydantic"
52
71
  ]
53
72
 
54
- [project.urls]
55
- Home = "https://github.com/astro-otter"
73
+ # useful tools for developers
74
+ dev = [
75
+ "ruff", # linter
76
+ "pre-commit", # enable pre-commit hooks
77
+ ]
56
78
 
57
79
  [tool.setuptools.packages.find]
58
80
  where = ['src']
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.4
2
+ Name: astro-otter
3
+ Version: 0.2.0
4
+ Author-email: Noah Franz <nfranz@arizona.edu>
5
+ License: MIT License
6
+
7
+ Copyright (c) 2023 Noah Franz
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Project-URL: Home, https://github.com/astro-otter
28
+ Classifier: License :: OSI Approved :: BSD License
29
+ Classifier: Topic :: Scientific/Engineering
30
+ Classifier: Intended Audience :: Science/Research
31
+ Classifier: Intended Audience :: Developers
32
+ Classifier: Operating System :: OS Independent
33
+ Classifier: License :: OSI Approved :: BSD License
34
+ Classifier: Programming Language :: Python
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Development Status :: 2 - Pre-Alpha
39
+ Requires-Python: <3.12,>=3.10
40
+ Description-Content-Type: text/markdown
41
+ License-File: LICENSE
42
+ Requires-Dist: numpy<2,>=1.20
43
+ Requires-Dist: astropy>=6
44
+ Requires-Dist: pandas
45
+ Requires-Dist: synphot
46
+ Requires-Dist: typing-extensions
47
+ Requires-Dist: pyarango
48
+ Requires-Dist: matplotlib
49
+ Requires-Dist: plotly
50
+ Requires-Dist: astroquery
51
+ Requires-Dist: ads
52
+ Requires-Dist: skypatrol
53
+ Requires-Dist: fundamentals
54
+ Requires-Dist: astro-datalab
55
+ Requires-Dist: sparclclient
56
+ Requires-Dist: astro-ghost
57
+ Requires-Dist: pydantic
58
+ Requires-Dist: pyreadline3; platform_system == "Windows"
59
+ Provides-Extra: docs
60
+ Requires-Dist: Sphinx>=3.0.0; extra == "docs"
61
+ Requires-Dist: myst-parser>=0.13; extra == "docs"
62
+ Requires-Dist: nbsphinx>=0.9.1; extra == "docs"
63
+ Requires-Dist: sphinx-book-theme>=0.0.33; extra == "docs"
64
+ Requires-Dist: sphinx_copybutton; extra == "docs"
65
+ Requires-Dist: autodoc; extra == "docs"
66
+ Requires-Dist: ipykernel; extra == "docs"
67
+ Requires-Dist: autodoc_pydantic; extra == "docs"
68
+ Provides-Extra: dev
69
+ Requires-Dist: ruff; extra == "dev"
70
+ Requires-Dist: pre-commit; extra == "dev"
71
+ Dynamic: license-file
72
+
73
+ # OTTER API
74
+ ### **O**pen mul**T**iwavelength **T**ransient **E**vent **R**epository
75
+
76
+ A Python API for the OTTER.
77
+
78
+ [actions-badge]: https://github.com/astro-otter/otter/workflows/CI/badge.svg
79
+ [actions-link]: https://github.com/astro-otter/otter/actions
80
+ [black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
81
+ [black-link]: https://github.com/psf/black
82
+ [conda-badge]: https://img.shields.io/conda/vn/conda-forge/hepfile
83
+ [conda-link]: https://github.com/conda-forge/hepfile-feedstock
84
+ [github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github
85
+ [github-discussions-link]: https://github.com/mattbellis/hepfile/discussions
86
+ [gitter-badge]: https://badges.gitter.im/https://github.com/mattbellis/hepfile/community.svg
87
+ [gitter-link]: https://gitter.im/https://github.com/mattbellis/hepfile/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
88
+ [pypi-link]: https://pypi.org/project/astro-otter/
89
+ [pypi-platforms]: https://img.shields.io/pypi/pyversions/astro-otter
90
+ [pypi-version]: https://badge.fury.io/py/astro-otter.svg
91
+ [rtd-badge]: https://readthedocs.org/projects/otter/badge/?version=latest
92
+ [rtd-link]: https://otter.readthedocs.io/en/latest/?badge=latest
93
+ [sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
94
+ [ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
95
+ [ruff-link]: https://github.com/astral-sh/ruff
96
+ [codecov-badge]: https://codecov.io/gh/astro-otter/otter/graph/badge.svg?token=BtCerOdTc0
97
+ [codecov-link]: https://codecov.io/gh/astro-otter/otter
98
+
99
+ [![Documentation Status](https://readthedocs.org/projects/astro-otter/badge/?version=latest)](https://astro-otter.readthedocs.io/en/latest/?badge=latest)
100
+ [![Actions Status][actions-badge]][actions-link]
101
+ [![PyPI version][pypi-version]][pypi-link]
102
+ [![Linting: Ruff][ruff-badge]][ruff-link]
103
+ [![codecov][codecov-badge]][codecov-link]
104
+
105
+ ## Installation
106
+ To install the OTTER API use
107
+ ```
108
+ python3 -m pip install astro-otter
109
+ ```
110
+
111
+ ## Developer Instructions
112
+ 1. Set the `OTTER_ROOT` environment variable
113
+ ```
114
+ export OTTER_ROOT=/path/to/where/to/clone
115
+ ```
116
+ 2. Clone the relevant repos:
117
+ ```
118
+ git clone https://github.com/astro-otter/otter.git $OTTER_ROOT/otter
119
+ git clone https://github.com/astro-otter/otterdb.git $OTTER_ROOT/otterdb
120
+ ```
121
+ 3. Install the NASA ADS Python API by following the instructions at https://ads.readthedocs.io/en/latest/#getting-started
122
+ 4. Install otter, the API for this database. From
123
+ the root directory where you installed these repos:
124
+ ```
125
+ cd $OTTER_ROOT/otter
126
+ python -m pip install -e .
127
+ ```
128
+ 5. Process the data to build the local "database" (although it is really just a directory).
129
+ Then, you can build the "database" by running the
130
+ following commands:
131
+ ```
132
+ cd $OTTER_ROOT/otter/scripts/
133
+ python3 gen_summary_table.py --otterroot $OTTER_ROOT
134
+ ```
135
+ 6. Easily access the data using the Otter code! In python:
136
+ ```
137
+ import os
138
+ from otter import Otter
139
+ otter = Otter(os.path.join(os.environ['OTTER_ROOT'], 'otterdb', '.otter'))
140
+ res = otter.query(names='AT2018hyz')
141
+ print(res)
142
+ ```
143
+
144
+ ## Installation from Source
145
+ To install the OTTER API from the source code use
146
+ ```
147
+ git clone https://github.com/astro-otter/otter.git
148
+ cd otter
149
+ python -m pip install .
150
+ ```
151
+ This will be changed into the more convenient `python -m pip install astro-otter` at a later date!
152
+
153
+ For developers, please also enable the pre-commit hooks using
154
+ ```
155
+ pre-commit install
156
+ ```
157
+
158
+ ## Repo Organization
159
+ | Directory | Contents |
160
+ |------------|------------|
161
+ | `src/otter` | A pip installable API for interfacing with the OTTER database|
162
+ | `scripts` | The pipeline scripts for converting unprocessed data into the OTTER JSON format|
163
+ | `docs` | Documentation for the OTTER API |
164
+ | `test` | Some Unit tests for the source code |
@@ -9,14 +9,19 @@ src/astro_otter.egg-info/top_level.txt
9
9
  src/otter/__init__.py
10
10
  src/otter/_version.py
11
11
  src/otter/exceptions.py
12
+ src/otter/schema.py
12
13
  src/otter/util.py
13
14
  src/otter/io/__init__.py
15
+ src/otter/io/data_finder.py
16
+ src/otter/io/host.py
14
17
  src/otter/io/otter.py
15
18
  src/otter/io/transient.py
16
19
  src/otter/plotter/__init__.py
17
20
  src/otter/plotter/otter_plotter.py
18
21
  src/otter/plotter/plotter.py
22
+ tests/test_data_finder.py
19
23
  tests/test_exceptions.py
24
+ tests/test_host.py
20
25
  tests/test_otter.py
21
26
  tests/test_package.py
22
27
  tests/test_transient.py
@@ -0,0 +1,33 @@
1
+ numpy<2,>=1.20
2
+ astropy>=6
3
+ pandas
4
+ synphot
5
+ typing-extensions
6
+ pyarango
7
+ matplotlib
8
+ plotly
9
+ astroquery
10
+ ads
11
+ skypatrol
12
+ fundamentals
13
+ astro-datalab
14
+ sparclclient
15
+ astro-ghost
16
+ pydantic
17
+
18
+ [:platform_system == "Windows"]
19
+ pyreadline3
20
+
21
+ [dev]
22
+ ruff
23
+ pre-commit
24
+
25
+ [docs]
26
+ Sphinx>=3.0.0
27
+ myst-parser>=0.13
28
+ nbsphinx>=0.9.1
29
+ sphinx-book-theme>=0.0.33
30
+ sphinx_copybutton
31
+ autodoc
32
+ ipykernel
33
+ autodoc_pydantic
@@ -10,5 +10,10 @@ __package__ = "otter"
10
10
  # import important stuff
11
11
  from .io.otter import Otter
12
12
  from .io.transient import Transient
13
+ from .io.host import Host
14
+ from .io.data_finder import DataFinder
13
15
  from .plotter.otter_plotter import OtterPlotter
14
- from .plotter.plotter import plot_light_curve, plot_sed
16
+ from .plotter.plotter import plot_light_curve, plot_sed, quick_view, query_quick_view
17
+ from . import util
18
+ from . import schema
19
+ from . import exceptions
@@ -2,4 +2,4 @@
2
2
  Just define the package version in one place
3
3
  """
4
4
 
5
- __version__ = "0.0.2"
5
+ __version__ = "0.2.0"
@@ -43,3 +43,32 @@ class TransientMergeError(Exception):
43
43
  """
44
44
 
45
45
  pass
46
+
47
+
48
+ class OtterNotImplementedError(Exception):
49
+ """
50
+ Exception thrown by methods that are not yet implemented
51
+ """
52
+
53
+ def __str__(self):
54
+ return "Not yet implemented! Please consider contributing on our GitHub!"
55
+
56
+
57
+ class MissingEnvVarError(Exception):
58
+ """
59
+ Thrown when the querying code expects an Environment variable and doesn't get one
60
+ """
61
+
62
+ def __init__(self, v, url=None):
63
+ self.v = v
64
+ self.url = url
65
+
66
+ def __str__(self):
67
+ msg = "You are missing the following environment variables:\n"
68
+ for vv in self.v:
69
+ msg += f"\t- {vv}\n"
70
+ msg += "Please make an account and/or set these variables!\n"
71
+ if self.url is not None:
72
+ msg += f"See: {self.url}"
73
+
74
+ return msg