Skip to content

Commit

Permalink
Merged main and fixed conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rusu24edward committed Sep 19, 2024
2 parents da2d206 + 607aa83 commit 0dca276
Show file tree
Hide file tree
Showing 25 changed files with 525 additions and 91 deletions.
56 changes: 56 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
FROM quay.io/centos/centos:stream9

ARG BUILD_DATE
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="SSAPy Docker image" \
org.label-schema.description="Provides an environment containing a working copy of SSAPy." \
org.label-schema.vendor="LLNL"

# Copy over SSAPy
COPY SSAPy/ /opt/SSAPy/

# Install C/C++ compilers
RUN echo "sslverify=False" >> /etc/dnf/dnf.conf && \
dnf -y update && \
dnf groupinstall --exclude=selinux-policy --exclude=selinux-policy-targeted -y "Development Tools" && \
dnf -y clean all && \
sed -i '$ d' /etc/dnf/dnf.conf && \
gcc --version

# Install necessary cmake packages
RUN echo "sslverify=False" >> /etc/dnf/dnf.conf && \
dnf install -y make cmake3 tree wget vi && \
dnf -y clean all && \
sed -i '$ d' /etc/dnf/dnf.conf && \
make --version && \
cmake --version && \
ls -l /

# Install Python and some requirement dependencies
RUN echo "sslverify=False" >> /etc/dnf/dnf.conf && \
dnf install -y epel-release && \
dnf install -y hdf5 hdf5-devel && \
dnf install -y python3.12 python3.12-devel python3.12-pip && \
dnf -y clean all && \
sed -i '$ d' /etc/dnf/dnf.conf && \
unlink /usr/bin/python3 && \
ln -s /usr/bin/python3.12 /usr/bin/python3 && \
python3 --version

# Install the pip packages
RUN python3 -m pip --version && \
python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir --upgrade setuptools && \
python3 -m pip install --no-cache-dir -r /opt/SSAPy/requirements.txt

# Install SSAPY
RUN ls -la / && \
ls -la /opt && \
ls -la /opt/SSAPy && \
tree -r /opt/SSAPy && \
cd /opt/SSAPy && \
python3 setup.py build && \
python3 setup.py install && \
chmod -R go+rwX ./ && \
chmod -R go+rwX /usr/lib64/python3.12/site-packages/ && \
chmod -R go+rwX /usr/local/lib64/python3.12/site-packages/
89 changes: 81 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
name: CI/CD

on:
# This Workflow can be triggered manually
workflow_dispatch:
# Run daily at 0:01 UTC
schedule:
- cron: '1 0 * * *'
# Run on pushes that modify this branch or tag the repo
push:
branches:
- main
tags:
- v*.*.*
# Run on pull requests that modify this branch/file
pull_request:
branches:
- main
# Run daily at 0:01 UTC
schedule:
- cron: '1 0 * * *'
# Let's also run the workflow on releases
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -35,11 +42,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade pip setuptools flake8
python -m pip install -r requirements.txt
# install checked out SSAPy
python setup.py build
Expand All @@ -48,7 +54,7 @@ jobs:
- name: Install dependencies (MacOS)
if: matrix.os == 'macOS-latest'
run: |
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade pip setuptools flake8
python -m pip install -r requirements.txt
# install checked out SSAPy
python setup.py build
Expand All @@ -63,6 +69,16 @@ jobs:
# python setup.py build
# python setup.py install
# python -m pip list
#- name: Lint code
# if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
# run: |
# python3 --version
# flake8 --version
# flake8 ssapy/ tests/ devel/
#- name: Test with pytest
# run: |
# python3 ${CI_PROJECT_DIR}/tests/test_orbit.py
# pytest --cov-report=xml --cov=coffea --deselect=test_taskvine
- name: Run tests
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
run: |
Expand All @@ -79,16 +95,73 @@ jobs:
cd docs && make html && make html
touch _build/html/.nojekyll
- name: Deploy documentation
if: github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs/_build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pass:
needs: [test]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"
deploy-images:
needs: [pass]
if: github.event_name == 'push' || github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout SSAPy
uses: actions/checkout@v4
with:
path: 'SSAPy'
lfs: 'true'
submodules: 'recursive'
- name: Look around
run: |
echo ${{ github.workspace }}
pwd
ls -alh ./
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup Metadata
uses: docker/metadata-action@v5
id: docker_meta
with:
images: |
ghcr.io/${{ github.repository_owner }}/ssapy-centos-s9
tags: |
type=schedule,pattern=nightly
type=schedule,pattern=develop
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Deploy Images
uses: docker/build-push-action@v5
with:
context: .
file: SSAPy/.docker/Dockerfile
platforms: 'linux/amd64,linux/arm64'
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

images-built:
needs: [deploy-images]
runs-on: ubuntu-latest
steps:
- run: echo "Container built"
57 changes: 34 additions & 23 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,30 @@ SSAPy - Space Situational Awareness for Python
.. |codecov_badge| image:: https://codecov.io/gh/LLNL/SSAPy/branch/main/graph/badge.svg
:target: https://codecov.io/gh/LLNL/SSAPy

SSAPy is a python package allowing for fast and precise orbital modeling.

SSAPy is much faster than other orbit modeling tools and offers:

- A variety of integrators, including Runge-Kutta, SciPy, SGP4, etc.
- Customizable force propagation models, including a variety of Earth gravity models, lunar gravity, radiation pressure, etc.
`SSAPy <https://github.com/LLNL/SSAPy>`_ is a fast, flexible, high-fidelity orbital modeling and analysis tool for orbits spanning from low-Earth orbit into the cislunar regime, and includes the following:

- Ability to define satellite parameters (area, mass, radiation and drag coefficients, etc.)
- Support for multiple data types (e.g., read in orbit from TLE file, define a set of Keplerian, Equinoctial, or Kozai Mean Keplerian elements, etc.)
- Define a fully customizable analytic force propagation model including the following:
- Earth gravity models (WGS84, EGM84, EGM96, EGM2008)
- Lunar gravity model (point source & harmonic)
- Radiation pressure (Earth & solar)
- Forces for all planets out to Neptune
- Atmospheric drag models
- Maneuvering (takes a user defined burn profile)
- Various community used integrators: SGP4, Runge-Kutta (4, 8, and 7/8), SciPy, Keplerian, Taylor Series
- User definable timesteps with the ability to return various parameters for any orbit and at any desired timestep (e.g., magnitude, state vector, TLE, Keplerian elements, periapsis, apoapsis, specific angular momentum, and many more.)
- Ground and space-based observer models
- Location and time of various lighting conditions of interest
- Multiple-hypothesis tracking (MHT) UCT linker
- Vectorized computations
- Short arc probabilistic orbit determination
- Vectorized computations (use of array broadcasting for fast computation, easily parallelizable and deployable on HPC machines)
- Short arc probabilistic orbit determination methods
- Conjunction probability estimation
- Uncertainty quantification
- Monte Carlo data fusion
- Support for multiple coordinate frames (with coordinate frame conversions)
- Built-in uncertainty quantification
- Support for Monte Carlo runs and data fusion
- Support for multiple coordinate frames and coordinate frame conversions (GCRF, IERS, GCRS Cartesian, TEME Cartesian, ra/dec, NTW, zenith/azimuth, apparent positions, orthoginal tangent plane, and many more.)
- Various plotting capabilities (ground tracks, 3D orbit plotting, cislunar trajectory visualization, etc.)
- User definable timesteps and orbit information retrieval times, in which the user can query parameters of interest for that orbit and time.

Installation
------------
Expand Down Expand Up @@ -92,22 +103,22 @@ Please note that SSAPy has a `Code of Conduct <https://github.com/LLNL/SSAPy/blo
Authors
-------

SSAPy was developed with support from Lawrence Livermore National Laboratory's Laboratory Directed Research and Development (LDRD) Program under projects
SSAPy was developed with support from Lawrence Livermore National Laboratory's (LLNL) Laboratory Directed Research and Development (LDRD) Program under projects
`19-SI-004 <https://ldrd-annual.llnl.gov/archives/ldrd-annual-2021/project-highlights/high-performance-computing-simulation-and-data-science/madstare-modeling-and-analysis-data-starved-or-ambiguous-environments>`_ and
`22-ERD-054 <https://ldrd-annual.llnl.gov/ldrd-annual-2023/project-highlights/space-security/data-demand-capable-space-domain-awareness-architecture>`_, by the following individuals (in alphabetical order):

- `Robert Armstrong <https://people.llnl.gov/armstrong46>`_ (`LLNL <https://www.llnl.gov/>`_) - Technical Advisor
- `Nathan Golovich <https://people.llnl.gov/golovich1>`_ (`LLNL <https://www.llnl.gov/>`_) - Technical Advisor
- Julia Ebert (formerly `LLNL <https://www.llnl.gov/>`_, now at Fleet Robotics) - Developer
- Noah Lifset (formerly `LLNL <https://www.llnl.gov/>`_) - Developer
- `Robert Armstrong <https://people.llnl.gov/armstrong46>`_ (`LLNL <https://www.llnl.gov/>`_)
- `Nathan Golovich <https://people.llnl.gov/golovich1>`_ (`LLNL <https://www.llnl.gov/>`_)
- Julia Ebert (formerly `LLNL <https://www.llnl.gov/>`_, now at Fleet Robotics)
- Noah Lifset (formerly `LLNL <https://www.llnl.gov/>`_, now PhD student at `UT Austin <https://www.utexas.edu>`_)
- `Dan Merl <https://people.llnl.gov/merl1>`_ (`LLNL <https://www.llnl.gov/>`_) - Developer
- `Joshua Meyers <https://kipac.stanford.edu/people/josh-meyers>`_ (formerly `LLNL <https://www.llnl.gov/>`_, now at `KIPAC <https://kipac.stanford.edu/>`_) - Lead Developer
- `Caleb Miller <https://people.llnl.gov/miller294>`_ (`LLNL <https://www.llnl.gov/>`_) - Technical Advisor
- `Alexx Perloff <https://people.llnl.gov/perloff1>`_ (`LLNL <https://www.llnl.gov/>`_) - Developer
- `Kerianne Pruett <https://people.llnl.gov/pruett6>`_ (`LLNL <https://www.llnl.gov/>`_) - Developer, Technical Advisor
- `Edward Schlafly <https://www.stsci.edu/stsci-research/research-directory/edward-schlafly>`_ (formerly `LLNL <https://www.llnl.gov/>`_, now `STScI <https://www.stsci.edu/>`_) - Developer
- `Michael Schneider <https://people.llnl.gov/schneider42>`_ (`LLNL <https://www.llnl.gov/>`_) - Creator, Developer, Technical Advisor
- `Travis Yeager <https://people.llnl.gov/yeager7>`_ (`LLNL <https://www.llnl.gov/>`_) - Lead Developer
- `Joshua Meyers <https://kipac.stanford.edu/people/josh-meyers>`_ (formerly `LLNL <https://www.llnl.gov/>`_, now at `KIPAC <https://kipac.stanford.edu/>`_) - Former Lead Developer
- `Caleb Miller <https://people.llnl.gov/miller294>`_ (`LLNL <https://www.llnl.gov/>`_)
- `Alexx Perloff <https://people.llnl.gov/perloff1>`_ (`LLNL <https://www.llnl.gov/>`_)
- `Kerianne Pruett <https://people.llnl.gov/pruett6>`_ (`LLNL <https://www.llnl.gov/>`_)
- `Edward Schlafly <https://www.stsci.edu/stsci-research/research-directory/edward-schlafly>`_ (formerly `LLNL <https://www.llnl.gov/>`_, now `STScI <https://www.stsci.edu/>`_) - Former Lead Developer
- `Michael Schneider <https://people.llnl.gov/schneider42>`_ (`LLNL <https://www.llnl.gov/>`_) - Creator, Former Lead Developer
- `Travis Yeager <https://people.llnl.gov/yeager7>`_ (`LLNL <https://www.llnl.gov/>`_) - Current Lead Developer

Many thanks go to SSAPy's other `contributors <https://github.com/llnl/ssapy/graphs/contributors>`_.

Expand Down
2 changes: 1 addition & 1 deletion docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Then, to build the HTML documentation locally, from the `docs` directory, run

Then open `_build/html/index.html` to browse the docs locally.

Alternatively, you can run `sphinx-autobuild . _build/html` to start a server that watches for changes in `/docs`
Alternatively, you can run `sphinx-autobuild source _build/html` to start a server that watches for changes in `/docs`
and regenerates the HTML docs automatically while serving them at http://127.0.0.1:8000/.

Note that if you updated docstrings, you'll need to re-build and re-install ssapy before re-building the docs.
File renamed without changes.
File renamed without changes
8 changes: 8 additions & 0 deletions docs/source/benchmarks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SSAPy Benchmarks
================

THIS PAGE IS UNDER DEVELOPMENT

The following figures provide an overview of our timing and accuracy benchmarking tests against various community SSA/SDA packages, integrators, and propagators.

THIS PAGE IS UNDER DEVELOPMENT
13 changes: 8 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'SSAPy'
copyright = '2018, Michael Schneider, Josh Meyers, Edward Schlafly, Julia Ebert'
author = 'Michael Schneider, Josh Meyers, Edward Schlafly, Julia Ebert'
copyright = '2018, Lawrence Livermore National Security, LLC'
author = 'Michael Schneider, Josh Meyers, Edward Schlafly, Julia Ebert, Travis Yeager, et al.'

githash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode("ascii")

Expand Down Expand Up @@ -51,6 +51,7 @@ def linkcode_resolve(domain, info):
try:
path = inspect.getsourcefile(obj)
relpath = path[len(modpath) + 1:]
relpath = relpath.split(".egg/")[-1]
_, lineno = inspect.getsourcelines(obj)
except TypeError:
# skip property or other type that inspect doesn't like
Expand All @@ -60,7 +61,8 @@ def linkcode_resolve(domain, info):
)


autosummary_generate = True
autosummary_generate = False
numpydoc_show_class_members = False
sphinx_tabs_valid_builders = ['linkcheck']
source_suffix = ['.rst', '.md']
templates_path = ['_templates']
Expand All @@ -69,15 +71,16 @@ def linkcode_resolve(domain, info):
"python": ("https://docs.python.org/3", None),
"numpy": ("http://docs.scipy.org/doc/numpy", None),
}
tls_verify = False
master_doc = "index"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_logo = "images/logo/ssapy_logo.svg"
html_logo = "_static/images/logo/ssapy_logo.svg"
html_theme_options = {
'logo_only': True,
}
html_favicon = 'images/logo/ssapy_logo.ico'
html_favicon = '_static/images/logo/ssapy_logo.ico'
4 changes: 3 additions & 1 deletion docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
SSAPy by Example
================

The following pages are rendered jupyter notebooks that provide an overview and example usage of SSAPy features.
THIS PAGE IS UNDER DEVELOPMENT

The following rendered jupyter notebooks provide an overview and example usage of SSAPy features and functions.
Each notebook builds on the previous one so it is recommended to go through them in order.

THIS PAGE IS UNDER DEVELOPMENT
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

installation
examples
benchmarks
concepts
contribution_guide

Expand Down
7 changes: 7 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ After cloning the main git repository, you must run the following command to clo
git submodule update --init --recursive
Then checkout the large files

.. code-block:: console
git lfs install
git lfs pull
Then run the usual setup commands:

.. code-block:: console
Expand Down
1 change: 1 addition & 0 deletions docs/source/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ and/or heavy dependencies. Below lists the packages available in the ``ssapy``
ssapy.plotUtils
ssapy.propagator
ssapy.rvsampler
ssapy.simple
ssapy.utils
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ pypdf2
ipyvolume
ipython_genutils
pytest-cov
ipython
pytest
imageio
tqdm
Loading

0 comments on commit 0dca276

Please sign in to comment.