From 1d1b91051adf01cf28199e17d3943c9f375e7fd1 Mon Sep 17 00:00:00 2001 From: johnowagon <97626704+johnowagon@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:22:01 -0700 Subject: [PATCH] Issue #79: refactored repo to src style directory using pyproject.toml --- pyproject.toml | 35 +++++++++++++ setup.py | 49 ------------------- {bsk_rl => src/bsk_rl}/__init__.py | 0 {bsk_rl => src/bsk_rl}/agents/__init__.py | 0 .../bsk_rl}/agents/genetic_algorithm.py | 0 {bsk_rl => src/bsk_rl}/agents/mcts.py | 0 .../bsk_rl}/agents/state_machine.py | 0 {bsk_rl => src/bsk_rl}/envs/__init__.py | 0 .../bsk_rl}/envs/agile_eos/__init__.py | 0 .../bsk_rl}/envs/agile_eos/bsk_sim.py | 0 .../bsk_rl}/envs/agile_eos/gym_env.py | 0 .../general_satellite_tasking/__init__.py | 0 .../envs/general_satellite_tasking/gym_env.py | 0 .../scenario/__init__.py | 0 .../scenario/communication.py | 0 .../scenario/data.py | 0 .../scenario/environment_features.py | 0 .../scenario/sat_actions.py | 0 .../scenario/sat_observations.py | 0 .../scenario/satellites.py | 0 .../simulation/__init__.py | 0 .../simulation/dynamics.py | 0 .../simulation/environment.py | 0 .../simulation/fsw.py | 0 .../simulation/simulator.py | 0 .../envs/general_satellite_tasking/types.py | 0 .../utils/__init__.py | 0 .../general_satellite_tasking/utils/debug.py | 0 .../utils/functional.py | 0 .../utils/orbital.py | 0 .../envs/multisat_agile_eos/__init__.py | 0 .../multisat_agile_eos/bsk_models/__init__.py | 0 .../multisat_agile_eos/bsk_models/dynamics.py | 0 .../bsk_models/environment.py | 0 .../envs/multisat_agile_eos/bsk_models/fsw.py | 0 .../bsk_models/fsw_steering.py | 0 .../envs/multisat_agile_eos/bsk_sim.py | 0 .../envs/multisat_agile_eos/env_settings.py | 0 .../envs/multisat_agile_eos/gym_env.py | 0 .../bsk_rl}/envs/multisensor_eos/__init__.py | 0 .../bsk_rl}/envs/multisensor_eos/bsk_sim.py | 0 .../envs/multisensor_eos/env_settings.py | 0 .../bsk_rl}/envs/multisensor_eos/gym_env.py | 0 .../bsk_rl}/envs/simple_eos/__init__.py | 0 .../bsk_rl}/envs/simple_eos/bsk_sim.py | 0 .../bsk_rl}/envs/simple_eos/gym_env.py | 0 .../envs/small_body_science/__init__.py | 0 .../envs/small_body_science/bsk_sim.py | 0 .../envs/small_body_science/gym_env.py | 0 .../envs/small_body_science_pomdp/__init__.py | 0 .../envs/small_body_science_pomdp/bsk_sim.py | 0 .../envs/small_body_science_pomdp/gym_env.py | 0 src/bsk_rl/finish_install.py | 31 ++++++++++++ {bsk_rl => src/bsk_rl}/training/__init__.py | 0 .../bsk_rl}/training/mcts/INSTRUCTIONS.md | 0 .../bsk_rl}/training/mcts/__init__.py | 0 .../bsk_rl}/training/mcts/mcts_train.py | 0 .../bsk_rl}/training/sb3/__init__.py | 0 .../bsk_rl}/training/sb3/experiments.py | 0 {bsk_rl => src/bsk_rl}/utilities/__init__.py | 0 .../utilities/effector_primitives/__init__.py | 0 .../actuator_primitives.py | 0 .../utilities/genetic_algorithm/__init__.py | 0 .../genetic_algorithm/experiments.py | 0 .../utilities/initial_conditions/__init__.py | 0 .../leo_initial_conditions.py | 0 .../utilities/initial_conditions/leo_orbit.py | 0 .../initial_conditions/sc_attitudes.py | 0 .../initial_conditions/small_body.py | 0 .../bsk_rl}/utilities/mcts/__init__.py | 0 .../utilities/mcts/rollout_policies.py | 0 .../bsk_rl}/utilities/sb3/__init__.py | 0 .../utilities/sb3/custom_sb3_policies.py | 0 .../utilities/sb3/shielded_policies.py | 0 .../bsk_rl}/utilities/sb3/shields.py | 0 .../utilities/state_machine/__init__.py | 0 .../utilities/state_machine/agile_eos_ops.adv | 0 .../state_machine/multisensor_eos_ops.adv | 0 .../state_machine/simple_eos_ops.adv | 0 79 files changed, 66 insertions(+), 49 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py rename {bsk_rl => src/bsk_rl}/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/agents/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/agents/genetic_algorithm.py (100%) rename {bsk_rl => src/bsk_rl}/agents/mcts.py (100%) rename {bsk_rl => src/bsk_rl}/agents/state_machine.py (100%) rename {bsk_rl => src/bsk_rl}/envs/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/agile_eos/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/agile_eos/bsk_sim.py (100%) rename {bsk_rl => src/bsk_rl}/envs/agile_eos/gym_env.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/gym_env.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/communication.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/data.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/environment_features.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/sat_actions.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/sat_observations.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/scenario/satellites.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/simulation/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/simulation/dynamics.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/simulation/environment.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/simulation/fsw.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/simulation/simulator.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/types.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/utils/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/utils/debug.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/utils/functional.py (100%) rename {bsk_rl => src/bsk_rl}/envs/general_satellite_tasking/utils/orbital.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/bsk_models/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/bsk_models/dynamics.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/bsk_models/environment.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/bsk_models/fsw.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/bsk_models/fsw_steering.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/bsk_sim.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/env_settings.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisat_agile_eos/gym_env.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisensor_eos/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisensor_eos/bsk_sim.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisensor_eos/env_settings.py (100%) rename {bsk_rl => src/bsk_rl}/envs/multisensor_eos/gym_env.py (100%) rename {bsk_rl => src/bsk_rl}/envs/simple_eos/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/simple_eos/bsk_sim.py (100%) rename {bsk_rl => src/bsk_rl}/envs/simple_eos/gym_env.py (100%) rename {bsk_rl => src/bsk_rl}/envs/small_body_science/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/small_body_science/bsk_sim.py (100%) rename {bsk_rl => src/bsk_rl}/envs/small_body_science/gym_env.py (100%) rename {bsk_rl => src/bsk_rl}/envs/small_body_science_pomdp/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/envs/small_body_science_pomdp/bsk_sim.py (100%) rename {bsk_rl => src/bsk_rl}/envs/small_body_science_pomdp/gym_env.py (100%) create mode 100644 src/bsk_rl/finish_install.py rename {bsk_rl => src/bsk_rl}/training/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/training/mcts/INSTRUCTIONS.md (100%) rename {bsk_rl => src/bsk_rl}/training/mcts/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/training/mcts/mcts_train.py (100%) rename {bsk_rl => src/bsk_rl}/training/sb3/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/training/sb3/experiments.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/effector_primitives/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/effector_primitives/actuator_primitives.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/genetic_algorithm/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/genetic_algorithm/experiments.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/initial_conditions/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/initial_conditions/leo_initial_conditions.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/initial_conditions/leo_orbit.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/initial_conditions/sc_attitudes.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/initial_conditions/small_body.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/mcts/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/mcts/rollout_policies.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/sb3/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/sb3/custom_sb3_policies.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/sb3/shielded_policies.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/sb3/shields.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/state_machine/__init__.py (100%) rename {bsk_rl => src/bsk_rl}/utilities/state_machine/agile_eos_ops.adv (100%) rename {bsk_rl => src/bsk_rl}/utilities/state_machine/multisensor_eos_ops.adv (100%) rename {bsk_rl => src/bsk_rl}/utilities/state_machine/simple_eos_ops.adv (100%) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..02ea968e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,35 @@ +[build-system] + requires = ["setuptools", "setuptools-scm"] + build-backend = "setuptools.build_meta" + +[project] + name = "bsk_rl" + version = "0.0.0" + authors = [ + {name = "Adam Herrmann", email = "adam.herrmann@colorado.edu"}, + {name = "Mark Stephenson", email = "mark.a.stephenson@colorado.edu"}, + ] + description = "RL environments and tools for spacecraft autonomy research, built on Basilisk. Developed by the AVS Lab." + readme = "README.md" + requires-python = ">=3.9.0" + license = {text = "MIT"} + dependencies = [ + "deap==1.3.3", + "Deprecated", + "gymnasium", + "matplotlib", + "numpy", + "pandas", + "pytest", + "pytest-cov", + "pytest-repeat", + "requests", + "scikit-learn", + "scipy", + "stable-baselines3", + "tensorflow", + "torch", + ] + +[project.scripts] + finish_install = "bsk_rl.finish_install:pck_install" \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 2dbe240f..00000000 --- a/setup.py +++ /dev/null @@ -1,49 +0,0 @@ -import io -import subprocess -import sys -import zipfile -from pathlib import Path - -from setuptools import setup - -setup( - name="bsk_rl", - version="0.0.0", - python_requires=">3.9.0", - install_requires=[ - "deap==1.3.3", - "Deprecated", - "gymnasium", - "matplotlib", - "numpy", - "pandas", - "pytest", - "pytest-cov", - "pytest-repeat", - "requests", - "scikit-learn", - "scipy", - "stable-baselines3", - "tensorflow", - "torch", - ], -) - -subprocess.check_call( - [sys.executable, "-m", "pip", "install", "git+https://github.com/chebpy/chebpy.git"] -) - -import requests # noqa: E402 - -r = requests.get( - "https://simplemaps.com/static/data/world-cities/basic/simplemaps_worldcities_basicv1.76.zip" -) -z = zipfile.ZipFile(io.BytesIO(r.content)) -z.extractall( - Path(__file__).parent.resolve() - / "bsk_rl" - / "envs" - / "general_satellite_tasking" - / "scenario" - / "simplemaps_worldcities" -) diff --git a/bsk_rl/__init__.py b/src/bsk_rl/__init__.py similarity index 100% rename from bsk_rl/__init__.py rename to src/bsk_rl/__init__.py diff --git a/bsk_rl/agents/__init__.py b/src/bsk_rl/agents/__init__.py similarity index 100% rename from bsk_rl/agents/__init__.py rename to src/bsk_rl/agents/__init__.py diff --git a/bsk_rl/agents/genetic_algorithm.py b/src/bsk_rl/agents/genetic_algorithm.py similarity index 100% rename from bsk_rl/agents/genetic_algorithm.py rename to src/bsk_rl/agents/genetic_algorithm.py diff --git a/bsk_rl/agents/mcts.py b/src/bsk_rl/agents/mcts.py similarity index 100% rename from bsk_rl/agents/mcts.py rename to src/bsk_rl/agents/mcts.py diff --git a/bsk_rl/agents/state_machine.py b/src/bsk_rl/agents/state_machine.py similarity index 100% rename from bsk_rl/agents/state_machine.py rename to src/bsk_rl/agents/state_machine.py diff --git a/bsk_rl/envs/__init__.py b/src/bsk_rl/envs/__init__.py similarity index 100% rename from bsk_rl/envs/__init__.py rename to src/bsk_rl/envs/__init__.py diff --git a/bsk_rl/envs/agile_eos/__init__.py b/src/bsk_rl/envs/agile_eos/__init__.py similarity index 100% rename from bsk_rl/envs/agile_eos/__init__.py rename to src/bsk_rl/envs/agile_eos/__init__.py diff --git a/bsk_rl/envs/agile_eos/bsk_sim.py b/src/bsk_rl/envs/agile_eos/bsk_sim.py similarity index 100% rename from bsk_rl/envs/agile_eos/bsk_sim.py rename to src/bsk_rl/envs/agile_eos/bsk_sim.py diff --git a/bsk_rl/envs/agile_eos/gym_env.py b/src/bsk_rl/envs/agile_eos/gym_env.py similarity index 100% rename from bsk_rl/envs/agile_eos/gym_env.py rename to src/bsk_rl/envs/agile_eos/gym_env.py diff --git a/bsk_rl/envs/general_satellite_tasking/__init__.py b/src/bsk_rl/envs/general_satellite_tasking/__init__.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/__init__.py rename to src/bsk_rl/envs/general_satellite_tasking/__init__.py diff --git a/bsk_rl/envs/general_satellite_tasking/gym_env.py b/src/bsk_rl/envs/general_satellite_tasking/gym_env.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/gym_env.py rename to src/bsk_rl/envs/general_satellite_tasking/gym_env.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/__init__.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/__init__.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/__init__.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/__init__.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/communication.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/communication.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/communication.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/communication.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/data.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/data.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/data.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/data.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/environment_features.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/environment_features.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/environment_features.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/environment_features.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/sat_actions.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/sat_actions.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/sat_actions.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/sat_actions.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/sat_observations.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/sat_observations.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/sat_observations.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/sat_observations.py diff --git a/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/scenario/satellites.py rename to src/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py diff --git a/bsk_rl/envs/general_satellite_tasking/simulation/__init__.py b/src/bsk_rl/envs/general_satellite_tasking/simulation/__init__.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/simulation/__init__.py rename to src/bsk_rl/envs/general_satellite_tasking/simulation/__init__.py diff --git a/bsk_rl/envs/general_satellite_tasking/simulation/dynamics.py b/src/bsk_rl/envs/general_satellite_tasking/simulation/dynamics.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/simulation/dynamics.py rename to src/bsk_rl/envs/general_satellite_tasking/simulation/dynamics.py diff --git a/bsk_rl/envs/general_satellite_tasking/simulation/environment.py b/src/bsk_rl/envs/general_satellite_tasking/simulation/environment.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/simulation/environment.py rename to src/bsk_rl/envs/general_satellite_tasking/simulation/environment.py diff --git a/bsk_rl/envs/general_satellite_tasking/simulation/fsw.py b/src/bsk_rl/envs/general_satellite_tasking/simulation/fsw.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/simulation/fsw.py rename to src/bsk_rl/envs/general_satellite_tasking/simulation/fsw.py diff --git a/bsk_rl/envs/general_satellite_tasking/simulation/simulator.py b/src/bsk_rl/envs/general_satellite_tasking/simulation/simulator.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/simulation/simulator.py rename to src/bsk_rl/envs/general_satellite_tasking/simulation/simulator.py diff --git a/bsk_rl/envs/general_satellite_tasking/types.py b/src/bsk_rl/envs/general_satellite_tasking/types.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/types.py rename to src/bsk_rl/envs/general_satellite_tasking/types.py diff --git a/bsk_rl/envs/general_satellite_tasking/utils/__init__.py b/src/bsk_rl/envs/general_satellite_tasking/utils/__init__.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/utils/__init__.py rename to src/bsk_rl/envs/general_satellite_tasking/utils/__init__.py diff --git a/bsk_rl/envs/general_satellite_tasking/utils/debug.py b/src/bsk_rl/envs/general_satellite_tasking/utils/debug.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/utils/debug.py rename to src/bsk_rl/envs/general_satellite_tasking/utils/debug.py diff --git a/bsk_rl/envs/general_satellite_tasking/utils/functional.py b/src/bsk_rl/envs/general_satellite_tasking/utils/functional.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/utils/functional.py rename to src/bsk_rl/envs/general_satellite_tasking/utils/functional.py diff --git a/bsk_rl/envs/general_satellite_tasking/utils/orbital.py b/src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py similarity index 100% rename from bsk_rl/envs/general_satellite_tasking/utils/orbital.py rename to src/bsk_rl/envs/general_satellite_tasking/utils/orbital.py diff --git a/bsk_rl/envs/multisat_agile_eos/__init__.py b/src/bsk_rl/envs/multisat_agile_eos/__init__.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/__init__.py rename to src/bsk_rl/envs/multisat_agile_eos/__init__.py diff --git a/bsk_rl/envs/multisat_agile_eos/bsk_models/__init__.py b/src/bsk_rl/envs/multisat_agile_eos/bsk_models/__init__.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/bsk_models/__init__.py rename to src/bsk_rl/envs/multisat_agile_eos/bsk_models/__init__.py diff --git a/bsk_rl/envs/multisat_agile_eos/bsk_models/dynamics.py b/src/bsk_rl/envs/multisat_agile_eos/bsk_models/dynamics.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/bsk_models/dynamics.py rename to src/bsk_rl/envs/multisat_agile_eos/bsk_models/dynamics.py diff --git a/bsk_rl/envs/multisat_agile_eos/bsk_models/environment.py b/src/bsk_rl/envs/multisat_agile_eos/bsk_models/environment.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/bsk_models/environment.py rename to src/bsk_rl/envs/multisat_agile_eos/bsk_models/environment.py diff --git a/bsk_rl/envs/multisat_agile_eos/bsk_models/fsw.py b/src/bsk_rl/envs/multisat_agile_eos/bsk_models/fsw.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/bsk_models/fsw.py rename to src/bsk_rl/envs/multisat_agile_eos/bsk_models/fsw.py diff --git a/bsk_rl/envs/multisat_agile_eos/bsk_models/fsw_steering.py b/src/bsk_rl/envs/multisat_agile_eos/bsk_models/fsw_steering.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/bsk_models/fsw_steering.py rename to src/bsk_rl/envs/multisat_agile_eos/bsk_models/fsw_steering.py diff --git a/bsk_rl/envs/multisat_agile_eos/bsk_sim.py b/src/bsk_rl/envs/multisat_agile_eos/bsk_sim.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/bsk_sim.py rename to src/bsk_rl/envs/multisat_agile_eos/bsk_sim.py diff --git a/bsk_rl/envs/multisat_agile_eos/env_settings.py b/src/bsk_rl/envs/multisat_agile_eos/env_settings.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/env_settings.py rename to src/bsk_rl/envs/multisat_agile_eos/env_settings.py diff --git a/bsk_rl/envs/multisat_agile_eos/gym_env.py b/src/bsk_rl/envs/multisat_agile_eos/gym_env.py similarity index 100% rename from bsk_rl/envs/multisat_agile_eos/gym_env.py rename to src/bsk_rl/envs/multisat_agile_eos/gym_env.py diff --git a/bsk_rl/envs/multisensor_eos/__init__.py b/src/bsk_rl/envs/multisensor_eos/__init__.py similarity index 100% rename from bsk_rl/envs/multisensor_eos/__init__.py rename to src/bsk_rl/envs/multisensor_eos/__init__.py diff --git a/bsk_rl/envs/multisensor_eos/bsk_sim.py b/src/bsk_rl/envs/multisensor_eos/bsk_sim.py similarity index 100% rename from bsk_rl/envs/multisensor_eos/bsk_sim.py rename to src/bsk_rl/envs/multisensor_eos/bsk_sim.py diff --git a/bsk_rl/envs/multisensor_eos/env_settings.py b/src/bsk_rl/envs/multisensor_eos/env_settings.py similarity index 100% rename from bsk_rl/envs/multisensor_eos/env_settings.py rename to src/bsk_rl/envs/multisensor_eos/env_settings.py diff --git a/bsk_rl/envs/multisensor_eos/gym_env.py b/src/bsk_rl/envs/multisensor_eos/gym_env.py similarity index 100% rename from bsk_rl/envs/multisensor_eos/gym_env.py rename to src/bsk_rl/envs/multisensor_eos/gym_env.py diff --git a/bsk_rl/envs/simple_eos/__init__.py b/src/bsk_rl/envs/simple_eos/__init__.py similarity index 100% rename from bsk_rl/envs/simple_eos/__init__.py rename to src/bsk_rl/envs/simple_eos/__init__.py diff --git a/bsk_rl/envs/simple_eos/bsk_sim.py b/src/bsk_rl/envs/simple_eos/bsk_sim.py similarity index 100% rename from bsk_rl/envs/simple_eos/bsk_sim.py rename to src/bsk_rl/envs/simple_eos/bsk_sim.py diff --git a/bsk_rl/envs/simple_eos/gym_env.py b/src/bsk_rl/envs/simple_eos/gym_env.py similarity index 100% rename from bsk_rl/envs/simple_eos/gym_env.py rename to src/bsk_rl/envs/simple_eos/gym_env.py diff --git a/bsk_rl/envs/small_body_science/__init__.py b/src/bsk_rl/envs/small_body_science/__init__.py similarity index 100% rename from bsk_rl/envs/small_body_science/__init__.py rename to src/bsk_rl/envs/small_body_science/__init__.py diff --git a/bsk_rl/envs/small_body_science/bsk_sim.py b/src/bsk_rl/envs/small_body_science/bsk_sim.py similarity index 100% rename from bsk_rl/envs/small_body_science/bsk_sim.py rename to src/bsk_rl/envs/small_body_science/bsk_sim.py diff --git a/bsk_rl/envs/small_body_science/gym_env.py b/src/bsk_rl/envs/small_body_science/gym_env.py similarity index 100% rename from bsk_rl/envs/small_body_science/gym_env.py rename to src/bsk_rl/envs/small_body_science/gym_env.py diff --git a/bsk_rl/envs/small_body_science_pomdp/__init__.py b/src/bsk_rl/envs/small_body_science_pomdp/__init__.py similarity index 100% rename from bsk_rl/envs/small_body_science_pomdp/__init__.py rename to src/bsk_rl/envs/small_body_science_pomdp/__init__.py diff --git a/bsk_rl/envs/small_body_science_pomdp/bsk_sim.py b/src/bsk_rl/envs/small_body_science_pomdp/bsk_sim.py similarity index 100% rename from bsk_rl/envs/small_body_science_pomdp/bsk_sim.py rename to src/bsk_rl/envs/small_body_science_pomdp/bsk_sim.py diff --git a/bsk_rl/envs/small_body_science_pomdp/gym_env.py b/src/bsk_rl/envs/small_body_science_pomdp/gym_env.py similarity index 100% rename from bsk_rl/envs/small_body_science_pomdp/gym_env.py rename to src/bsk_rl/envs/small_body_science_pomdp/gym_env.py diff --git a/src/bsk_rl/finish_install.py b/src/bsk_rl/finish_install.py new file mode 100644 index 00000000..91e1e38e --- /dev/null +++ b/src/bsk_rl/finish_install.py @@ -0,0 +1,31 @@ +import io +import subprocess +import requests +import sys +import zipfile +from pathlib import Path + + +def pck_install(): + subprocess.check_call( + [ + sys.executable, + "-m", + "pip", + "install", + "git+https://github.com/chebpy/chebpy.git", + ] + ) + + r = requests.get( + "https://simplemaps.com/static/data/world-cities/basic/simplemaps_worldcities_basicv1.76.zip" + ) + z = zipfile.ZipFile(io.BytesIO(r.content)) + z.extractall( + Path(__file__).parent.resolve() + / "bsk_rl" + / "envs" + / "general_satellite_tasking" + / "scenario" + / "simplemaps_worldcities" + ) diff --git a/bsk_rl/training/__init__.py b/src/bsk_rl/training/__init__.py similarity index 100% rename from bsk_rl/training/__init__.py rename to src/bsk_rl/training/__init__.py diff --git a/bsk_rl/training/mcts/INSTRUCTIONS.md b/src/bsk_rl/training/mcts/INSTRUCTIONS.md similarity index 100% rename from bsk_rl/training/mcts/INSTRUCTIONS.md rename to src/bsk_rl/training/mcts/INSTRUCTIONS.md diff --git a/bsk_rl/training/mcts/__init__.py b/src/bsk_rl/training/mcts/__init__.py similarity index 100% rename from bsk_rl/training/mcts/__init__.py rename to src/bsk_rl/training/mcts/__init__.py diff --git a/bsk_rl/training/mcts/mcts_train.py b/src/bsk_rl/training/mcts/mcts_train.py similarity index 100% rename from bsk_rl/training/mcts/mcts_train.py rename to src/bsk_rl/training/mcts/mcts_train.py diff --git a/bsk_rl/training/sb3/__init__.py b/src/bsk_rl/training/sb3/__init__.py similarity index 100% rename from bsk_rl/training/sb3/__init__.py rename to src/bsk_rl/training/sb3/__init__.py diff --git a/bsk_rl/training/sb3/experiments.py b/src/bsk_rl/training/sb3/experiments.py similarity index 100% rename from bsk_rl/training/sb3/experiments.py rename to src/bsk_rl/training/sb3/experiments.py diff --git a/bsk_rl/utilities/__init__.py b/src/bsk_rl/utilities/__init__.py similarity index 100% rename from bsk_rl/utilities/__init__.py rename to src/bsk_rl/utilities/__init__.py diff --git a/bsk_rl/utilities/effector_primitives/__init__.py b/src/bsk_rl/utilities/effector_primitives/__init__.py similarity index 100% rename from bsk_rl/utilities/effector_primitives/__init__.py rename to src/bsk_rl/utilities/effector_primitives/__init__.py diff --git a/bsk_rl/utilities/effector_primitives/actuator_primitives.py b/src/bsk_rl/utilities/effector_primitives/actuator_primitives.py similarity index 100% rename from bsk_rl/utilities/effector_primitives/actuator_primitives.py rename to src/bsk_rl/utilities/effector_primitives/actuator_primitives.py diff --git a/bsk_rl/utilities/genetic_algorithm/__init__.py b/src/bsk_rl/utilities/genetic_algorithm/__init__.py similarity index 100% rename from bsk_rl/utilities/genetic_algorithm/__init__.py rename to src/bsk_rl/utilities/genetic_algorithm/__init__.py diff --git a/bsk_rl/utilities/genetic_algorithm/experiments.py b/src/bsk_rl/utilities/genetic_algorithm/experiments.py similarity index 100% rename from bsk_rl/utilities/genetic_algorithm/experiments.py rename to src/bsk_rl/utilities/genetic_algorithm/experiments.py diff --git a/bsk_rl/utilities/initial_conditions/__init__.py b/src/bsk_rl/utilities/initial_conditions/__init__.py similarity index 100% rename from bsk_rl/utilities/initial_conditions/__init__.py rename to src/bsk_rl/utilities/initial_conditions/__init__.py diff --git a/bsk_rl/utilities/initial_conditions/leo_initial_conditions.py b/src/bsk_rl/utilities/initial_conditions/leo_initial_conditions.py similarity index 100% rename from bsk_rl/utilities/initial_conditions/leo_initial_conditions.py rename to src/bsk_rl/utilities/initial_conditions/leo_initial_conditions.py diff --git a/bsk_rl/utilities/initial_conditions/leo_orbit.py b/src/bsk_rl/utilities/initial_conditions/leo_orbit.py similarity index 100% rename from bsk_rl/utilities/initial_conditions/leo_orbit.py rename to src/bsk_rl/utilities/initial_conditions/leo_orbit.py diff --git a/bsk_rl/utilities/initial_conditions/sc_attitudes.py b/src/bsk_rl/utilities/initial_conditions/sc_attitudes.py similarity index 100% rename from bsk_rl/utilities/initial_conditions/sc_attitudes.py rename to src/bsk_rl/utilities/initial_conditions/sc_attitudes.py diff --git a/bsk_rl/utilities/initial_conditions/small_body.py b/src/bsk_rl/utilities/initial_conditions/small_body.py similarity index 100% rename from bsk_rl/utilities/initial_conditions/small_body.py rename to src/bsk_rl/utilities/initial_conditions/small_body.py diff --git a/bsk_rl/utilities/mcts/__init__.py b/src/bsk_rl/utilities/mcts/__init__.py similarity index 100% rename from bsk_rl/utilities/mcts/__init__.py rename to src/bsk_rl/utilities/mcts/__init__.py diff --git a/bsk_rl/utilities/mcts/rollout_policies.py b/src/bsk_rl/utilities/mcts/rollout_policies.py similarity index 100% rename from bsk_rl/utilities/mcts/rollout_policies.py rename to src/bsk_rl/utilities/mcts/rollout_policies.py diff --git a/bsk_rl/utilities/sb3/__init__.py b/src/bsk_rl/utilities/sb3/__init__.py similarity index 100% rename from bsk_rl/utilities/sb3/__init__.py rename to src/bsk_rl/utilities/sb3/__init__.py diff --git a/bsk_rl/utilities/sb3/custom_sb3_policies.py b/src/bsk_rl/utilities/sb3/custom_sb3_policies.py similarity index 100% rename from bsk_rl/utilities/sb3/custom_sb3_policies.py rename to src/bsk_rl/utilities/sb3/custom_sb3_policies.py diff --git a/bsk_rl/utilities/sb3/shielded_policies.py b/src/bsk_rl/utilities/sb3/shielded_policies.py similarity index 100% rename from bsk_rl/utilities/sb3/shielded_policies.py rename to src/bsk_rl/utilities/sb3/shielded_policies.py diff --git a/bsk_rl/utilities/sb3/shields.py b/src/bsk_rl/utilities/sb3/shields.py similarity index 100% rename from bsk_rl/utilities/sb3/shields.py rename to src/bsk_rl/utilities/sb3/shields.py diff --git a/bsk_rl/utilities/state_machine/__init__.py b/src/bsk_rl/utilities/state_machine/__init__.py similarity index 100% rename from bsk_rl/utilities/state_machine/__init__.py rename to src/bsk_rl/utilities/state_machine/__init__.py diff --git a/bsk_rl/utilities/state_machine/agile_eos_ops.adv b/src/bsk_rl/utilities/state_machine/agile_eos_ops.adv similarity index 100% rename from bsk_rl/utilities/state_machine/agile_eos_ops.adv rename to src/bsk_rl/utilities/state_machine/agile_eos_ops.adv diff --git a/bsk_rl/utilities/state_machine/multisensor_eos_ops.adv b/src/bsk_rl/utilities/state_machine/multisensor_eos_ops.adv similarity index 100% rename from bsk_rl/utilities/state_machine/multisensor_eos_ops.adv rename to src/bsk_rl/utilities/state_machine/multisensor_eos_ops.adv diff --git a/bsk_rl/utilities/state_machine/simple_eos_ops.adv b/src/bsk_rl/utilities/state_machine/simple_eos_ops.adv similarity index 100% rename from bsk_rl/utilities/state_machine/simple_eos_ops.adv rename to src/bsk_rl/utilities/state_machine/simple_eos_ops.adv