Skip to content

Commit

Permalink
Merge branch 'main' into vectorial_model_rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoset authored Dec 12, 2022
2 parents e86dd39 + 997d64d commit 06061f7
Show file tree
Hide file tree
Showing 41 changed files with 2,059 additions and 1,637 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/ci_cron_weekly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# GitHub Actions workflow that runs on a cron schedule.
# Check URLs and run latest deps with remote tests

name: Weekly CI Tests

Expand All @@ -8,9 +9,18 @@ on:
- cron: '0 6 * * 1'

jobs:
# Weekly testing to catch links that stop working for some reason.
doc_test:
weekly:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Check links in docs using tox
toxenv: linkcheck
- name: Check dev versions of key dependencies
toxenv: py39-test-devdeps
toxposargs: --remote-data

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -19,10 +29,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Install base dependencies
run: |
python -m pip install --upgrade pip tox
- name: Check links in docs using tox
run: |
tox -e linkcheck
- name: Test with tox
env:
ADS_DEV_KEY: ${{ secrets.ADS_DEV_KEY }}
run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}}
9 changes: 4 additions & 5 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: CI Tests
on:
push:
branches:
- master # GitHub now defaults to 'main' as the name of the primary branch. Change this as needed.
- main # GitHub now defaults to 'main' as the name of the primary branch. Change this as needed.
# tags: # run CI if specific tags are pushed
pull_request:
# branches: # only build on PRs against 'main' if you need to further limit when CI is run.
Expand Down Expand Up @@ -42,11 +42,10 @@ jobs:
python: 3.8
toxenv: py38-test-alldeps

- name: Python 3.8 with all optional dependencies, remote tests, and coverage checking
- name: Python 3.8 with all optional dependencies and coverage checking
os: ubuntu-latest
python: 3.8
toxenv: py38-test-alldeps-cov
toxposargs: --remote-data

# - name: Windows - Python 3.8 with all optional dependencies
# os: windows-latest
Expand Down Expand Up @@ -88,8 +87,8 @@ jobs:
python -m pip install --upgrade pip
python -m pip install tox codecov
- name: Test with tox
run: |
tox -e ${{ matrix.toxenv }}
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}

# This is an example of how to upload coverage to codecov
# - name: Upload coverage to codecov
# if: "contains(matrix.toxenv, '-cov')"
Expand Down
17 changes: 17 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,25 @@ sbpy.data

- Added ``Orbit.tisserand`` to calculate the Tisserand parameter of small
body's orbits with respect to planets. [#325]

- Added ``Orbit.D_criterion`` to evaluate the D-criterion between two sets
of orbital elements. [#325]
- Added ``DataClass.__contains__`` to enable `in` operator for ``DataClass``
objects. [#357]


Bug Fixes
---------

sbpy.data
^^^^^^^^^

- Cometary magnitudes obtained via ``Phys.from_sbdb`` (i.e., M1 and M2) now have
appropriate units. [#349]

- Asteroids with A/ designations (e.g., A/2019 G2) are correctly identified by
``Names`` as asteroids. Improved handling of interstellar object (I/)
designations: they do not parse as cometary or asteroidal. [#334, #340]


0.3.0 (2022-04-28)
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. image:: https://github.com/NASA-Planetary-Science/sbpy/raw/master/logo/sbpy_logo_short.png
.. image:: https://github.com/NASA-Planetary-Science/sbpy/raw/main/logo/sbpy_logo_short.png
:width: 400px
:align: center
:alt: sbpy
Expand All @@ -23,7 +23,7 @@ planetary astronomy.
:target: https://doi.org/10.21105/joss.01426
:alt: JOSS documentation

.. image:: https://codecov.io/gh/NASA-Planetary-Science/sbpy/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/NASA-Planetary-Science/sbpy/branch/main/graph/badge.svg
:target: https://codecov.io/gh/NASA-Planetary-Science/sbpy
:alt: codecov status

Expand Down Expand Up @@ -62,7 +62,7 @@ sbpy is still under development, with v1.0 scheduled for delivery in 2024. For a
Acknowledgements
----------------

`sbpy` is supported by NASA PDART Grant No. 80NSSC18K0987.
`sbpy` support provided by NASA PDART Grant Nos. 80NSSC18K0987 and 80NSSC22K0143.

If you use `sbpy` in your work, please acknowledge it by citing

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
if versionmod.version.release:
edit_on_github_branch = "v" + versionmod.version.version
else:
edit_on_github_branch = "master"
edit_on_github_branch = "main"

edit_on_github_source_root = ""
edit_on_github_doc_root = "docs"
Expand Down
8 changes: 5 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Current Status
:target: https://github.com/NASA-Planetary-Science/sbpy/actions
:alt: GitHub testing status

.. image:: https://codecov.io/gh/NASA-Planetary-Science/sbpy/branch/master/graph/badge.svg
:target: https://app.codecov.io/gh/NASA-Planetary-Science/sbpy/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/NASA-Planetary-Science/sbpy/branch/main/graph/badge.svg
:target: https://codecov.io/gh/NASA-Planetary-Science/sbpy
:alt: codecov status


Expand All @@ -59,10 +59,12 @@ Data Structures: Orbits, Ephemerides, Observations, and Physical Properties
---------------------------------------------------------------------------

.. toctree::
:maxdepth: 2
:maxdepth: 1
:glob:

sbpy/data/index.rst
sbpy/data/fieldnames.rst
sbpy/data/*

Photometry and Spectroscopy
---------------------------
Expand Down
42 changes: 33 additions & 9 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,49 @@ The latest development version of `sbpy` can be easily installed using:
$ pip install git+https://github.com/NASA-Planetary-Science/sbpy.git
Using GitHub
^^^^^^^^^^^^
Using conda
^^^^^^^^^^^

The latest stable version of `sbpy` can be installed with `Anaconda
<https://www.anaconda.com/>`__ via the `conda-forge <https://conda-forge.org/>`__
channel:

.. code-block:: bash
$ conda install sbpy --channel=conda-forge
If you do not have the conda-forge channel available, add it and re-run the
installation command:

.. code-block:: bash
$ conda config --add channels conda-forge
$ conda install sbpy --channel=conda-forge
This way of installing `sbpy` is recommended if you plan to contribute
to the module. The current development version of `sbpy` can be
obtained from `GitHub <https://github.com/NASA-Planetary-Science/sbpy>`__ using
Using Git+Pip
^^^^^^^^^^^^^

This way of installing `sbpy` is recommended if you plan to contribute to the
module. The current development version of `sbpy` can be obtained from `GitHub
<https://github.com/NASA-Planetary-Science/sbpy>`__ using:

.. code-block:: bash
$ git clone https://github.com/NASA-Planetary-Science/sbpy.git
This will create a new directory (``sbpy/``). In this directory, run
This will create a new directory (``sbpy/``). In this directory, run:

.. code-block:: bash
$ python setup.py install --user
$ pip install .
As above, to install optional dependencies, instead use ``pip install .[all]``.

in order to use `sbpy` in your default Python environment. If you plan to work on the code and always want to use the latest version of your code, you can install it with
If you plan to work on the code and always want to use the latest version of
your code, we recommend installing in "editable" mode with the optional
dependences and the testing dependencies:

.. code-block:: bash
$ python setup.py develop --user
$ pip install -e .[all,test]
15 changes: 12 additions & 3 deletions docs/sbpy/data/dataclass.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _data containers:

===============
Data Containers
===============
=======================================
Data Containers (`sbpy.data.DataClass`)
=======================================

`sbpy` relies heavily on the use of `~sbpy.data.DataClass` data
containers that are used to encapsulate data and to propagate them
Expand Down Expand Up @@ -313,6 +313,15 @@ object, you can use `~sbpy.data.DataClass.field_names`:
>>> obs.field_names
['ra', 'dec', 't']

You can also use the `in` operator to check if a field is contained in
a `~sbpy.data.DataClass` object. Alternative field names can also be
used for the `in` test:

>>> 'ra' in obs
True
>>> 'RA' in obs
True

Each of these columns can be accessed easily, for instance:

>>> obs['ra']
Expand Down
Loading

0 comments on commit 06061f7

Please sign in to comment.