Skip to content

Commit

Permalink
feat: new documentation page (#329)
Browse files Browse the repository at this point in the history
* feat: add orbit pass computation logic

* feat: add more tests

* feat: fix tests

* chore: remove unnecessary variable

* chore: bad rebase

* feat: working build, have to add make commands

* feat: add make command and cleanup

* feat: working well

* feat: fix makefile

* feat: update makefile

* feat: final fix

* feat: remove group and update docstrings

* feat: update index.html

* Apply suggestions from code review

Co-authored-by: kyle-cochran <kyle.ray.cochran@gmail.com>

* chore: fix cpp docs

---------

Co-authored-by: kyle-cochran <kyle.ray.cochran@gmail.com>
  • Loading branch information
vishwa2710 and kyle-cochran authored Feb 6, 2024
1 parent b26f945 commit 2821cdb
Show file tree
Hide file tree
Showing 89 changed files with 401 additions and 273 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ coverage/

docs/html/
docs/latex/
docs/xml/
docs/_autosummary
docs/_build
docs/_notebooks
docs/cpp_rst

## Misc.

Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md

This file was deleted.

17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,21 @@ build-documentation-standalone: ## Build documentation (standalone)
--volume="/app/build" \
--workdir=/app/build \
$(docker_development_image_repository):$(docker_image_version) \
/bin/bash -c "cmake -DBUILD_UNIT_TESTS=OFF -DBUILD_BENCHMARK=OFF -DBUILD_VALIDATION_TESTS=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_DOCUMENTATION=ON .. \
&& $(MAKE) docs"
/bin/bash -c "cmake -DBUILD_UNIT_TESTS=OFF -DBUILD_BENCHMARK=OFF -DBUILD_VALIDATION_TESTS=OFF -DBUILD_PYTHON_BINDINGS=ON -DBUILD_DOCUMENTATION=ON .. \
&& ostk-build \
&& ostk-install-python \
&& pip install -r /app/docs/requirements.txt \
&& mkdir -p /app/docs/_notebooks \
&& cd /app/docs/_notebooks \
&& git init \
&& git remote add origin https://github.com/open-space-collective/open-space-toolkit \
&& git config core.sparseCheckout true \
&& echo "notebooks/Astrodynamics/*" >> .git/info/sparse-checkout \
&& git pull origin main \
&& find . -type f -name "*.ipynb" -exec mv {} . \; \
&& cd /app/docs \
&& breathe-apidoc -o cpp_rst xml -g class \
&& sphinx-build -j 4 -b html . _build/html"

.PHONY: build-documentation-standalone

Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![PyPI version](https://badge.fury.io/py/open-space-toolkit-astrodynamics.svg)](https://badge.fury.io/py/open-space-toolkit-astrodynamics)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Orbit, attitude, access.
Orbit, attitude, access, mission analysis.

<img src="./docs/assets/example.svg" height="500px" width="auto">

Expand Down Expand Up @@ -98,10 +98,7 @@ pip install open-space-toolkit-astrodynamics

## Documentation

Documentation is available here:

- [C++](https://open-space-collective.github.io/open-space-toolkit-astrodynamics)
- [Python](./bindings/python/docs)
Documentation is available [here](https://open-space-collective.github.io/open-space-toolkit-astrodynamics):

<details>
<summary>Structure</summary>
Expand Down Expand Up @@ -157,8 +154,8 @@ The library exhibits the following detailed and descriptive structure:

Tutorials are available here:

- [C++](./tutorials/cpp)
- [Python](./tutorials/python)
- C++ (in progress)
- [Python](https://github.com/open-space-collective/open-space-toolkit/tree/main/notebooks)

## Setup

Expand Down Expand Up @@ -339,7 +336,7 @@ The validation tests can be run with `ostk-validate` from within the dev contain

Contributions are more than welcome!

Please read our [contributing guide](CONTRIBUTING.md) to learn about our development process, how to propose fixes and improvements, and how to build and test the code.
For the contributing guide, please consult the CONTRIBUTING.md in the [open-space-toolkit](https://github.com/open-space-collective/open-space-toolkit) base repo [here](https://github.com/open-space-collective/open-space-toolkit/blob/main/CONTRIBUTING.md).

## Special Thanks

Expand Down
3 changes: 0 additions & 3 deletions bindings/python/src/OpenSpaceToolkitAstrodynamicsPy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ PYBIND11_MODULE(OpenSpaceToolkitAstrodynamicsPy, m)
// Add optional docstring for package OpenSpaceToolkitAstrodynamicsPy
m.doc() = "Orbit, attitude, access for OpenSpaceToolkit";

// Add __path__ attribute to python package
m.attr("__path__") = "ostk.astrodynamics";

// Change attribute __name__ to make OpenSpaceToolkitAstrodynamicsPy invisible in modules path
m.attr("__name__") = "ostk.astrodynamics";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Access(pybind11::module& aModule)
This class encapsulates the concept of visibility access between two trajectories.
Group:
access
)doc"
);

Expand Down Expand Up @@ -199,9 +197,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Access(pybind11::module& aModule)
// Create "access" python submodule
auto access = aModule.def_submodule("access");

// Add __path__ attribute for "access" submodule
access.attr("__path__") = "ostk.astrodynamics.access";

// Add elements to "access" module
OpenSpaceToolkitAstrodynamicsPy_Access_Generator(access);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Access_Generator(pybind11::module& a
"Generator",
R"doc(
An access generator.
Group:
access
)doc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction(pybind11::module& aModul
// Create "conjunction" python submodule
auto conjunction = aModule.def_submodule("conjunction");

// Add __path__ attribute for "conjunction" submodule
conjunction.attr("__path__") = "ostk.astrodynamics.conjunction";

// Add objects to "conjunction" submodule
OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages(conjunction);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages(pybind11::modul
// Create "messages" python submodule
auto messages = aModule.def_submodule("messages");

// Add __path__ attribute for "messages" submodule
messages.attr("__path__") = "ostk.astrodynamics.conjunction.messages";

// Add objects to "messages" submodule
OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS(messages);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS(pybind11:
// Create "ccsds" python submodule
auto ccsds = aModule.def_submodule("ccsds");

// Add __path__ attribute for "ccsds" submodule
ccsds.attr("__path__") = "ostk.astrodynamics.conjunction.messages.ccsds";

// Add objects to "ccsds" submodule
OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS_CDM(ccsds);
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS_CDM(pybin
Ref: https://public.ccsds.org/Pubs/508x0b1e2s.pdf
Group:
ccsds
)doc"
);

Expand Down Expand Up @@ -359,8 +357,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS_CDM(pybin
Ref: https://public.ccsds.org/Pubs/508x0b1e2s.pdf
Group:
ccsds
)doc"
)

Expand Down Expand Up @@ -439,8 +435,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS_CDM(pybin
Ref: https://public.ccsds.org/Pubs/508x0b1e2s.pdf
Group:
ccsds
)doc"
)

Expand Down Expand Up @@ -625,8 +619,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS_CDM(pybin
Ref: https://public.ccsds.org/Pubs/508x0b1e2s.pdf
Group:
ccsds
)doc"
)

Expand Down Expand Up @@ -871,8 +863,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Conjunction_Messages_CCSDS_CDM(pybin
Ref: https://public.ccsds.org/Pubs/508x0b1e2s.pdf
Group:
ccsds
)doc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics(pybind11::module& aModule)
- compute_contribution
to create a custom dynamics class
Group:
dynamics
)doc"
)

Expand Down Expand Up @@ -188,9 +186,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics(pybind11::module& aModule)
// Create "dynamics" python submodule
auto dynamics = aModule.def_submodule("dynamics");

// Add __path__ attribute for "dynamics" submodule
dynamics.attr("__path__") = "ostk.astrodynamics.dynamics";

// Add objects to "dynamics" submodule
OpenSpaceToolkitAstrodynamicsPy_Dynamics_PositionDerivative(dynamics);
OpenSpaceToolkitAstrodynamicsPy_Dynamics_CentralBodyGravity(dynamics);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics_AtmosphericDrag(pybind11::m
R"doc(
The atmospheric drag dynamics.
Group:
dynamics
)doc"
)
.def(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics_CentralBodyGravity(pybind11
R"doc(
The central-body gravity model.
Group:
dynamics
)doc"
)
.def(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics_PositionDerivative(pybind11
R"doc(
The position derivative model.
Group:
dynamics
)doc"
)
.def(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics_Tabulated(pybind11::module&
R"doc(
The tabulated dynamics.
Group:
dynamics
)doc"
)
.def(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics_ThirdBodyGravity(pybind11::
R"doc(
The third body gravity model.
Group:
dynamics
)doc"
)
.def(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Dynamics_Thruster(pybind11::module&
Base class to derive other thruster classes from. Cannot be instantiated.
Group:
dynamics
)doc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition(pybind11::module& aMo
R"doc(
An Event Condition defines a criterion that can be evaluated based on a current/previous state vectors and times
Group:
event-condition
)doc"
);

Expand All @@ -57,8 +55,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition(pybind11::module& aMo
R"doc(
The Event Condition Target.
Group:
event-condition
)doc"
);

Expand Down Expand Up @@ -260,9 +256,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition(pybind11::module& aMo
// Create "event_condition" python submodule
auto event_condition = aModule.def_submodule("event_condition");

// Add __path__ attribute for "event_condition" submodule
event_condition.attr("__path__") = "ostk.astrodynamics.event_condition";

OpenSpaceToolkitAstrodynamicsPy_EventCondition_RealCondition(event_condition);
OpenSpaceToolkitAstrodynamicsPy_EventCondition_BooleanCondition(event_condition);
OpenSpaceToolkitAstrodynamicsPy_EventCondition_AngularCondition(event_condition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_AngularCondition(pybi
R"doc(
An Angular Event Condition.
Group:
event-condition
)doc"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_BooleanCondition(pybi
R"doc(
A Boolean Event Condition.
Group:
event-condition
)doc"
)

Expand All @@ -40,8 +38,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_BooleanCondition(pybi
evaluator (function): The evaluator of the condition.
is_inverse (bool): Whether the condition is inverse.
Group:
Constructors
)doc",
arg("name"),
arg("criterion"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_COECondition(pybind11
R"doc(
A COE Event Condition.
Group:
event-condition
)doc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_InstantCondition(pybi
R"doc(
An Instant Event Condition.
Group:
event-condition
)doc"
)

Expand All @@ -34,8 +32,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_InstantCondition(pybi
criterion (Criterion): The criterion.
instant (Instant): The instant.
Group:
Constructors
)doc",
arg("criterion"),
arg("instant")
Expand All @@ -50,8 +46,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_InstantCondition(pybi
Returns:
Instant: The instant.
Group:
Methods
)doc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_LogicalCondition(pybi
R"doc(
A Logical Event Condition. This class is used to combine multiple event conditions into a single set.
Group:
event-condition
)doc"
);

Expand Down Expand Up @@ -54,8 +52,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_LogicalCondition(pybi
type (Type): The type of the logical condition.
event_conditions (list[EventCondition]): The list of event conditions.
Group:
Constructors
)doc",
arg("name"),
arg("type"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_EventCondition_RealCondition(pybind1
R"doc(
A Real Event Condition.
Group:
event-condition
)doc"
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight(pybind11::module& aModule)
// Create "flight" python submodule
auto flight = aModule.def_submodule("flight");

// Add __path__ attribute for "flight" submodule
flight.attr("__path__") = "ostk.astrodynamics.flight";

// Add objects to "flight" submodule
OpenSpaceToolkitAstrodynamicsPy_Flight_Profile(flight);
OpenSpaceToolkitAstrodynamicsPy_Flight_System(flight);
Expand Down
Loading

0 comments on commit 2821cdb

Please sign in to comment.