Skip to content

Commit

Permalink
Adding file structure and basic adler.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
astronomerritt committed Feb 16, 2024
1 parent 14bf334 commit ced2831
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 41 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"ipykernel", # Support for Jupyter notebooks
"numpy"
]

[project.urls]
Expand Down
Binary file added src/adler/.DS_Store
Binary file not shown.
5 changes: 2 additions & 3 deletions src/adler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .example_module import greetings, meaning

__all__ = ["greetings", "meaning"]
from . import dataclasses
from . import science
26 changes: 26 additions & 0 deletions src/adler/adler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import argparse

from adler.dataclasses.AdlerPlanetoid import AdlerPlanetoid


def runAdler(args):
planetoid = AdlerPlanetoid(args.ssoid)

planetoid.do_pretend_science()


def main():
parser = argparse.ArgumentParser(description="Runs Adler for a select planetoid and given user input.")

parser.add_argument("-s", "--ssoid", help="SSObject ID of planetoid.", type="str", required=True)

# can add arguments to specify a date range etc later
# alternatively we may start using a config file

args = parser.parse_args()

runAdler(args)


if __name__ == "__main__":
main()
Binary file added src/adler/dataclasses/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from lsst.rsp import get_tap_service, retrieve_query
from DataSchema import Observations, MPCORB, SSObject
from lsst.rsp import get_tap_service
from adler.dataclasses.DataSchema import Observations, MPCORB, SSObject
from adler.science.DummyScience import DummyScience


class AdlerPlanetoid:
Expand Down Expand Up @@ -63,3 +64,8 @@ def populate_SSObject(self):
"""

self.SSObject = SSObject(self.ssObjectId, SSObject_sql_query, self.service, self.sql_filename)

def do_pretend_science(self):
self.DummyScienceResult = DummyScience().science_result

print(self.DummyScienceResult)
File renamed without changes.
23 changes: 0 additions & 23 deletions src/adler/example_module.py

This file was deleted.

3 changes: 3 additions & 0 deletions src/adler/science/DummyScience.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class DummyScience:
def __init__(self):
self.science_result = "look, science!"
Binary file added tests/adler/.DS_Store
Binary file not shown.
Empty file removed tests/adler/conftest.py
Empty file.
5 changes: 5 additions & 0 deletions tests/adler/dataclasses/dummy_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# placeholder test to ensure tests work


def test_dummytest():
print("test complete")
13 changes: 0 additions & 13 deletions tests/adler/test_example_module.py

This file was deleted.

0 comments on commit ced2831

Please sign in to comment.