diff --git a/pyproject.toml b/pyproject.toml index d0841eb..471bc70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ classifiers = [ dynamic = ["version"] dependencies = [ "ipykernel", # Support for Jupyter notebooks + "numpy" ] [project.urls] diff --git a/src/adler/.DS_Store b/src/adler/.DS_Store new file mode 100644 index 0000000..8006c22 Binary files /dev/null and b/src/adler/.DS_Store differ diff --git a/src/adler/__init__.py b/src/adler/__init__.py index b564b85..25b7585 100644 --- a/src/adler/__init__.py +++ b/src/adler/__init__.py @@ -1,3 +1,2 @@ -from .example_module import greetings, meaning - -__all__ = ["greetings", "meaning"] +from . import dataclasses +from . import science diff --git a/src/adler/adler.py b/src/adler/adler.py new file mode 100644 index 0000000..334d2b3 --- /dev/null +++ b/src/adler/adler.py @@ -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() diff --git a/src/adler/dataclasses/.DS_Store b/src/adler/dataclasses/.DS_Store new file mode 100644 index 0000000..231a8b9 Binary files /dev/null and b/src/adler/dataclasses/.DS_Store differ diff --git a/src/adler/AdlerPlanetoid.py b/src/adler/dataclasses/AdlerPlanetoid.py similarity index 88% rename from src/adler/AdlerPlanetoid.py rename to src/adler/dataclasses/AdlerPlanetoid.py index b7c8b41..c04cd62 100644 --- a/src/adler/AdlerPlanetoid.py +++ b/src/adler/dataclasses/AdlerPlanetoid.py @@ -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: @@ -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) diff --git a/src/adler/DataSchema.py b/src/adler/dataclasses/DataSchema.py similarity index 100% rename from src/adler/DataSchema.py rename to src/adler/dataclasses/DataSchema.py diff --git a/src/adler/example_module.py b/src/adler/example_module.py deleted file mode 100644 index f76e837..0000000 --- a/src/adler/example_module.py +++ /dev/null @@ -1,23 +0,0 @@ -"""An example module containing simplistic functions.""" - - -def greetings() -> str: - """A friendly greeting for a future friend. - - Returns - ------- - str - A typical greeting from a software engineer. - """ - return "Hello from LINCC-Frameworks!" - - -def meaning() -> int: - """The meaning of life, the universe, and everything. - - Returns - ------- - int - The meaning of life. - """ - return 42 diff --git a/src/adler/science/DummyScience.py b/src/adler/science/DummyScience.py new file mode 100644 index 0000000..d76be0d --- /dev/null +++ b/src/adler/science/DummyScience.py @@ -0,0 +1,3 @@ +class DummyScience: + def __init__(self): + self.science_result = "look, science!" diff --git a/tests/adler/.DS_Store b/tests/adler/.DS_Store new file mode 100644 index 0000000..c8ea8e5 Binary files /dev/null and b/tests/adler/.DS_Store differ diff --git a/tests/adler/conftest.py b/tests/adler/conftest.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/adler/dataclasses/dummy_test.py b/tests/adler/dataclasses/dummy_test.py new file mode 100644 index 0000000..154efa1 --- /dev/null +++ b/tests/adler/dataclasses/dummy_test.py @@ -0,0 +1,5 @@ +# placeholder test to ensure tests work + + +def test_dummytest(): + print("test complete") diff --git a/tests/adler/test_example_module.py b/tests/adler/test_example_module.py deleted file mode 100644 index 09bfb59..0000000 --- a/tests/adler/test_example_module.py +++ /dev/null @@ -1,13 +0,0 @@ -from adler import example_module - - -def test_greetings() -> None: - """Verify the output of the `greetings` function""" - output = example_module.greetings() - assert output == "Hello from LINCC-Frameworks!" - - -def test_meaning() -> None: - """Verify the output of the `meaning` function""" - output = example_module.meaning() - assert output == 42