Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Candidate 0.3.0 #75

Merged
merged 164 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
e66345a
ENH: add keplerian inputs to sgp4
jklenzing Jun 28, 2021
4688af5
DOC: update changelog
jklenzing Jun 28, 2021
73311ad
Update pysatMissions/instruments/missions_sgp4.py
jklenzing Jun 30, 2021
49a5e94
STY: remove python 2.7 imports
jklenzing Jul 7, 2021
62087da
ENH: add orbital check
jklenzing Jul 7, 2021
74ccad8
STY: strings
jklenzing Jul 7, 2021
8bd4d6f
TST: add docstring tests
jklenzing Aug 4, 2021
9a057b7
DOC: improve docstrings
jklenzing Aug 4, 2021
4905a2a
DOC: update changelog
jklenzing Aug 4, 2021
74d28b3
DOC: update docstring
jklenzing Aug 4, 2021
6f66a4e
DOC: add docstring
jklenzing Aug 4, 2021
6827ace
BUG: revert changes from other branch
jklenzing Aug 4, 2021
a5265c8
Update pysatMissions/methods/magcoord.py
jklenzing Aug 4, 2021
fdd4e58
STY: reduce duplicate code
jklenzing Aug 4, 2021
cf624a4
TST: add tests for orbit methods
jklenzing Aug 4, 2021
6cee8ce
STY: use new sgp4 syntax, improve structure
jklenzing Aug 4, 2021
dc8ed18
STY: improve kwargs
jklenzing Aug 4, 2021
ebb2175
STY: docstring
jklenzing Aug 4, 2021
6172d67
ENH: regenerate metadata with each load #55
jklenzing Aug 4, 2021
1712025
MAINT: update requirements
jklenzing Aug 4, 2021
11426ac
ENH: add oribtal kwarg collection check
jklenzing Aug 5, 2021
2355fd7
STY: rename function
jklenzing Aug 5, 2021
ad6f826
TST: add instrument tests for initialization checks
jklenzing Aug 5, 2021
d188460
DOC: update changelog
jklenzing Aug 5, 2021
8d10656
DOC: update changelog
jklenzing Aug 5, 2021
2eea93d
STY: doc and code style
jklenzing Aug 5, 2021
8ec752f
ENH: pass through gravity constant
jklenzing Aug 5, 2021
aed2c5d
BUG: no kwargs for sgp4
jklenzing Aug 5, 2021
6748358
ENH: add geodetic conversions
jklenzing Aug 5, 2021
bb59557
DOC: update changelog
jklenzing Aug 5, 2021
c39033b
ENH: add ECEF velocity
jklenzing Aug 5, 2021
43c33a2
STY: improve metadata
jklenzing Aug 5, 2021
46faece
DOC: improve comments
jklenzing Aug 5, 2021
cd10299
TST: manual install of geospacepy-lite on github actions
jklenzing Aug 5, 2021
f37b1f6
TST: only scan pysatMissions for flake8
jklenzing Aug 5, 2021
a43fcfd
Apply suggestions from code review
jklenzing Aug 6, 2021
15dc5e2
ENH: adjust default kwargs
jklenzing Aug 6, 2021
8631493
STY: docstrings
jklenzing Aug 6, 2021
868f31c
STY: return in tests
jklenzing Aug 6, 2021
eb4afa4
STY: docstrings
jklenzing Aug 6, 2021
7f76bb5
DOC: add issue numbers to TODO comments
jklenzing Aug 6, 2021
5608d99
Apply suggestions from code review
jklenzing Aug 6, 2021
e5b6dc2
STY: use bstar as kwarg
jklenzing Aug 6, 2021
cabc35e
DOC: update definitions
jklenzing Aug 6, 2021
b295776
BUG: bstar in tests
jklenzing Aug 6, 2021
ee93307
STY: update metadata
jklenzing Aug 6, 2021
4a93012
ENH: add spherical coords
jklenzing Aug 6, 2021
1f23230
TST: use pip install for geospacepy
jklenzing Aug 6, 2021
4067e4a
Merge branch 'enh/sgp4' into enh/geospacepy
jklenzing Aug 6, 2021
b1e3792
BUG: update test parameters
jklenzing Aug 6, 2021
110f565
ENH: option to output single orbit
jklenzing Aug 6, 2021
3b9b771
Apply suggestions from code review
jklenzing Aug 9, 2021
f268a51
DOC: add note and example for tests
jklenzing Aug 9, 2021
ff87c21
Merge branch 'sty/docstrings' of https://github.com/pysat/pysatMissio…
jklenzing Aug 9, 2021
7a74b18
DOC: Improve metadata
jklenzing Aug 11, 2021
b2889ab
STY: import order
jklenzing Aug 11, 2021
6081e9f
DOC: TODO statements
jklenzing Aug 11, 2021
e652023
STY: whitespace
jklenzing Aug 11, 2021
445ecb9
STY: class declaration
jklenzing Aug 11, 2021
f12f004
TST: add hacking to tests
jklenzing Aug 11, 2021
f649e72
Update pysatMissions/tests/test_methods_spacecraft.py
jklenzing Aug 11, 2021
df2b6a2
Merge pull request #62 from pysat/sty/docstrings
jklenzing Aug 11, 2021
ba00757
STY: typo
jklenzing Aug 11, 2021
8cd3bf5
Merge branch 'develop' into enh/sgp4
jklenzing Aug 11, 2021
9bf9798
Merge branch 'enh/sgp4' into enh/geospacepy
jklenzing Aug 11, 2021
93e1b20
DOC: add docstrings
jklenzing Aug 11, 2021
bfc9e2f
Merge branch 'enh/sgp4' into enh/geospacepy
jklenzing Aug 11, 2021
8237bda
STY: new standards
jklenzing Aug 11, 2021
f26d346
BUG: typo
jklenzing Aug 11, 2021
4fbae33
BUG: changing tests
jklenzing Aug 11, 2021
64dceab
Merge branch 'enh/sgp4' into enh/geospacepy
jklenzing Aug 11, 2021
bf1404f
BUG: wrong variable name
jklenzing Aug 11, 2021
c6c5503
STY: import order
jklenzing Aug 13, 2021
a6121b4
Merge pull request #60 from pysat/enh/sgp4
jklenzing Aug 16, 2021
06607cd
TST: adjust codeclimate
jklenzing Sep 1, 2021
d099aa9
STY: streamline tests
jklenzing Sep 1, 2021
acebfa8
STY: simplify methods
jklenzing Sep 1, 2021
41bd2a9
STY: reduce duplication
jklenzing Sep 1, 2021
6f736f8
STY: remove duplicate code
jklenzing Sep 1, 2021
c755f62
DOC: update changelog
jklenzing Sep 1, 2021
7c0f6f0
STY: simplify error handling
jklenzing Sep 1, 2021
5db9b77
STY: remove unused code
jklenzing Sep 1, 2021
ccae8b8
STY: remove endpoint test
jklenzing Sep 1, 2021
b78117b
DOC: update docstrings
jklenzing Oct 29, 2021
e30e101
TST: test for options
jklenzing Oct 29, 2021
0fa7053
Merge pull request #66 from pysat/enh/geospacepy
jklenzing Oct 29, 2021
cf120f2
Update pysatMissions/tests/test_methods_magcoord.py
jklenzing Dec 23, 2021
62110ad
DEP: deprecate missions_ephem
jklenzing Dec 23, 2021
5450fc2
TST: test DeprecationWarning
jklenzing Dec 23, 2021
413d449
DOC: update changelog
jklenzing Dec 23, 2021
3e250e4
BUG: copy function from unreleased pysat
jklenzing Dec 23, 2021
88a2c7e
BUG: use consistent epoch
jklenzing Dec 23, 2021
6655f42
TST: test for consistency between days
jklenzing Dec 23, 2021
6b62c1b
TST: add parametrize
jklenzing Dec 23, 2021
7af5d65
STY: simplify
jklenzing Dec 23, 2021
f1a41c3
TST: clean up workflow / nep29
jklenzing Dec 23, 2021
cb77eda
STY: update numpy test versions
jklenzing Dec 23, 2021
915dd26
STY: numpy install order
jklenzing Dec 23, 2021
27fb149
MAINT: use numpy 1.20
jklenzing Dec 23, 2021
638f36d
DOC: update changelog
jklenzing Dec 23, 2021
e099ac9
DOC: improve comments
jklenzing Dec 23, 2021
8e8bf2c
Update requirements.txt
jklenzing Jan 3, 2022
27056a0
Update main.yml
jklenzing Jan 3, 2022
c5ea381
STY: update function name
jklenzing Jan 4, 2022
80ec480
MAINT: update ommbv calls
jklenzing Jan 4, 2022
ad45a25
MAINT: version limit for OMMBV
jklenzing Jan 4, 2022
e42cd37
TST: manual install of apexpy
jklenzing Jan 5, 2022
baffa20
BUG: deprecation ommbv
jklenzing Jan 5, 2022
ed83f02
MAINT: drop nep29
jklenzing Jan 5, 2022
b652ce7
Apply suggestions from code review
jklenzing Jan 5, 2022
3a4c23d
Update pysatMissions/methods/spacecraft.py
jklenzing Jan 5, 2022
abfb538
MAINT: update ommbv syntax
jklenzing Jan 5, 2022
38b6b88
Apply suggestions from code review
jklenzing Jan 5, 2022
7fd7b65
STY: tabs
jklenzing Jan 5, 2022
ccd0ddf
BUG: ommbv syntax
jklenzing Jan 5, 2022
563cccb
MAINT: ommbv syntax
jklenzing Jan 5, 2022
2f68d00
DOC: update changelog
jklenzing Jan 5, 2022
12b03be
Merge pull request #74 from pysat/jklenzing-patch-1
jklenzing Jan 7, 2022
416142f
Update CHANGELOG.md
jklenzing Jan 14, 2022
48e6c1c
Update pysatMissions/instruments/missions_sgp4.py
jklenzing Jan 21, 2022
8dc1959
Merge pull request #68 from pysat/tst/codeclimate
jklenzing Jan 21, 2022
bded865
Merge branch 'develop' into bug/sgp4_epoch
jklenzing Jan 21, 2022
5bbf05d
Merge pull request #72 from pysat/bug/sgp4_epoch
jklenzing Jan 21, 2022
98b370c
Merge branch 'develop' into dep/ephem
jklenzing Jan 21, 2022
b293568
Merge pull request #71 from pysat/dep/ephem
jklenzing Jan 26, 2022
b66415a
DOC: update version
jklenzing Feb 1, 2022
537fe57
MAINT: update hacking usage
jklenzing Feb 1, 2022
ffea78e
DOC: update package metadata
jklenzing Feb 1, 2022
46180c0
DOC: temp release date
jklenzing Feb 1, 2022
0c080b7
DOC: Update stoneback affil
jklenzing Feb 1, 2022
b3da01b
DOC: update ommbv versions
jklenzing Feb 1, 2022
13dc7a2
Apply suggestions from code review
jklenzing Feb 16, 2022
f2510dc
BUG: lowercase strings
jklenzing Feb 16, 2022
7034137
DOC: update comments about pyglow
jklenzing Mar 16, 2022
228bbb5
STY: update tests
jklenzing Apr 21, 2022
c63ebe2
DOC: update docstring
jklenzing Apr 21, 2022
cb594cb
BUG: earth mass
jklenzing Apr 21, 2022
48bf303
BUG: update test criteria
jklenzing Apr 21, 2022
1786852
Merge pull request #80 from pysat/bug/sgp4
jklenzing Apr 22, 2022
639f26b
Apply suggestions from code review
jklenzing Apr 29, 2022
ed1d15a
DOC: add post-installation discussion
jklenzing Apr 29, 2022
58ef75d
Update references.rst
jklenzing Apr 29, 2022
2795b68
Update CONTRIBUTING.md
jklenzing Apr 29, 2022
5f25f58
Update CONTRIBUTING.md
jklenzing Apr 29, 2022
060881a
Update conf.py
jklenzing Apr 29, 2022
3245983
Update conf.py
jklenzing Apr 29, 2022
87a563e
DOC: update metadat
jklenzing May 2, 2022
7944555
BUG: readthedocs install
jklenzing May 2, 2022
afd1559
Apply suggestions from code review
jklenzing May 2, 2022
161c047
STY: apply code review
jklenzing May 2, 2022
153ad13
BUG: add all requirements
jklenzing May 2, 2022
52e29a8
BUG: update standards
jklenzing May 2, 2022
49e4ff6
BUG: revenge of the TLE
jklenzing May 2, 2022
fcf57b8
DOC: update contributing info
jklenzing May 2, 2022
22dd53a
BUG: readthedocs
jklenzing May 2, 2022
40ab1ea
DOC: update contributing
jklenzing May 4, 2022
f39977e
DOC: comments
jklenzing May 6, 2022
6189f81
DOC: update changelog
jklenzing May 6, 2022
cc48b90
Merge pull request #83 from pysat/bug/fortran
jklenzing May 9, 2022
ebcec36
DOC: update tutorial
jklenzing May 13, 2022
bf49cdd
DOC: add methods api
jklenzing May 13, 2022
4671c2f
BUG: update doc
jklenzing May 13, 2022
0ce8c33
DOC: add release date
jklenzing May 13, 2022
b221653
DOC: update reqs
jklenzing May 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
plugins:
radon:
enabled: true
pep8:
enabled: true
sonar-python:
enabled: true
ratings:
paths:
- "**.py"
exclude_paths:
- ".github/**/*"
- "pysatMissions/tests/**/*"
- "docs/**/*"
- "setup.py"
- ".*"
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,35 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest]
numpy_ver: ["latest"]

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

- name: Install requirements for testing setup
run: |
python -m pip install --upgrade pip
pip install -r test_requirements.txt

- name: Install dependencies
run: |
pip install -r requirements.txt
# Manual install of OMMBV
pip install --no-binary :OMMBV: OMMBV

- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"

- name: Test PEP8 compliance
run: flake8 . --count --select=E,F,W --show-source --statistics
run: flake8 . --count --select=D,E,F,H,W --show-source --statistics

- name: Evaluate complexity
run: flake8 . --count --exit-zero --max-complexity=10 --statistics
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"orcid": "0000-0001-8321-6074"
},
{
"affiliation": "The University of Texas at Dallas",
"affiliation": "Stoneris",
jklenzing marked this conversation as resolved.
Show resolved Hide resolved
"name": "Stoneback, Russell",
"orcid": "0000-0001-7216-4336"
},
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [0.3.0] - 2022-05-13
* Add Keplerian orbital inputs into missions_sgp4
* Update sgp4 interface to use new syntax for initialization from TLEs
* Include conversions to geodetic latitude / longitude / altitude for sgp4
* Improve metadata generation in missions_sgp4
* Update syntax to be compliant with OMMBV 1.0
* Documentation
* Improve docstrings throughout
* Added bypass for apexpy for readthedocs build
* Deprecations
* Deprecated missions_ephem, as pyephem will no longer be updated
* Testing
* Add style check for docstrings
* Added checks for deprecation warnings
* Improve checks in codeclimate

## [0.2.2] - 2021-06-18
* Migrate pyglow interface to pysatIncubator
* Style updates for consistency with pysat 3.0
Expand Down
138 changes: 79 additions & 59 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ Contributing
Bug reports, feature suggestions and other contributions are greatly
appreciated! pysatMissions is a community-driven project and welcomes both feedback and contributions.

Come join us on Slack! An invitation to the pysat workspace is available
in the 'About' section of the
[pysat GitHub Repository.](https://github.com/pysat/pysat) Development meetings
are generally held fortnightly.

Short version
-------------

* Submit bug reports and feature requests at `GitHub <https://github.com/pysat/pysatMissions/issues>`_
* Submit bug reports and feature requests at [GitHub](https://github.com/pysat/pysatMissions/issues)
* Make pull requests to the ``develop`` branch

Bug reports
-----------

When `reporting a bug <https://github.com/pysat/pysatMissions/issues>`_ please
When [reporting a bug](https://github.com/pysat/pysatMissions/issues) please
include:

* Your operating system name and version
Expand All @@ -24,7 +29,7 @@ Feature requests and feedback
-----------------------------

The best way to send feedback is to file an issue at
`GitHub <https://github.com/pysat/pysatMissions/issues>`_.
[GitHub](https://github.com/pysat/pysatMissions/issues).

If you are proposing a feature:

Expand All @@ -38,14 +43,17 @@ Development

To set up `pysatMissions` for local development:

1. `Fork pysat on GitHub <https://github.com/pysat/pysatMissions/fork>`_.
2. Clone your fork locally::

git clone git@github.com:your_name_here/pysatMissions.git
1. [Fork pysat on GitHub](https://github.com/pysat/pysatMissions/fork).

3. Create a branch for local development::
3. Clone your fork locally:
```
git clone git@github.com:your_name_here/pysatMissions.git
```

git checkout -b name-of-your-bugfix-or-feature
3. Create a branch for local development:
```
git checkout -b name-of-your-bugfix-or-feature
```

Now you can make your changes locally. Tests for new instruments are
performed automatically. Tests for custom functions should be added to
Expand All @@ -55,19 +63,31 @@ To set up `pysatMissions` for local development:
``test_``.

4. When you're done making changes, run all the checks to ensure that nothing
is broken on your local system::

pytest -vs
is broken on your local system:
```
pytest -vs
```

5. Update/add documentation (in ``docs``), if relevant

5. Commit your changes and push your branch to GitHub::
6. Add your name to the .zenodo.json file as an author

7. Commit your changes:
```
git add .
git commit -m "AAA: Brief description of your changes"
```
Where AAA is a standard shorthand for the type of change (eg, BUG or DOC).
`pysat` follows the [numpy development workflow](https://numpy.org/doc/stable/dev/development_workflow.html),
see the discussion there for a full list of this shorthand notation.

git add .
git commit -m "Brief description of your changes"
git push origin name-of-your-bugfix-or-feature
8. Once you are happy with the local changes, push to Github:
```
git push origin name-of-your-bugfix-or-feature
```
Note that each push will trigger the Continuous Integration workflow.

6. Submit a pull request through the GitHub website. Pull requests should be
9. Submit a pull request through the GitHub website. Pull requests should be
made to the ``develop`` branch.

Pull Request Guidelines
Expand All @@ -81,45 +101,45 @@ For merging, you should:
1. Include an example for use
2. Add a note to ``CHANGELOG.md`` about the changes
3. Ensure that all checks passed (current checks include GitHub Actions
and Coveralls) [1]_

.. [1] If you don't have all the necessary Python versions available locally or
have trouble building all the testing environments, you can rely on
GitHub Actions to run the tests for each change you add in the pull
request. Because testing here will delay tests by other developers,
please ensure that the code passes all tests on your local system first.

Project Style Guidelines
^^^^^^^^^^^^^^^^^^^^^^^^

In general, pysat follows PEP8 and numpydoc guidelines. Pytest runs the unit
and integration tests, flake8 checks for style, and sphinx-build performs
documentation tests. However, there are certain additional style elements that
have been settled on to ensure the project maintains a consistent coding style.
These include:

* Line breaks should occur before a binary operator (ignoring flake8 W503)
* Combine long strings using `join`
* Preferably break long lines on open parentheses rather than using `\`
* Use no more than 80 characters per line
* Avoid using Instrument class key attribute names as unrelated variable names:
`platform`, `name`, `tag`, and `inst_id`
* The pysat logger is imported into each sub-module and provides status updates
at the info and warning levels (as appropriate)
* Several dependent packages have common nicknames, including:
* `import datetime as dt`
* `import numpy as np`
* `import pandas as pds`
* `import xarray as xr`
* All classes should have `__repr__` and `__str__` functions
* Docstrings use `Note` instead of `Notes`
* Try to avoid creating a try/except statement where except passes
* Use setup and teardown in test classes
* Use pytest parametrize in test classes when appropriate
* Provide testing class methods with informative failure statements and
descriptive, one-line docstrings
* Block and inline comments should use proper English grammar and punctuation
with the exception of single sentences in a block, which may then omit the
final period
* When casting is necessary, use `np.int64` and `np.float64` to ensure operating
system agnosticism
and Coveralls)

If you don't have all the necessary Python versions available locally or
have trouble building all the testing environments, you can rely on
the project's Continuous Integration (CI) service to run the tests for each change you add in the pull
request. Because testing here will delay tests by other developers,
please ensure that the code passes all tests on your local system first.

Project Style Guidelines
^^^^^^^^^^^^^^^^^^^^^^^^

In general, pysat follows PEP8 and numpydoc guidelines. Pytest runs the unit
and integration tests, flake8 checks for style, and sphinx-build performs
documentation tests. However, there are certain additional style elements that
have been settled on to ensure the project maintains a consistent coding style.
These include:

* Line breaks should occur before a binary operator (ignoring flake8 W503)
* Combine long strings using `join`
* Preferably break long lines on open parentheses rather than using `\`
* Use no more than 80 characters per line
* Avoid using Instrument class key attribute names as unrelated variable names:
`platform`, `name`, `tag`, and `inst_id`
* The pysat logger is imported into each sub-module and provides status updates
at the info and warning levels (as appropriate)
* Several dependent packages have common nicknames, including:
* `import datetime as dt`
* `import numpy as np`
* `import pandas as pds`
* `import xarray as xr`
* All classes should have `__repr__` and `__str__` functions
* Docstrings use `Note` instead of `Notes`
* Try to avoid creating a try/except statement where except passes
* Use setup and teardown in test classes
* Use pytest parametrize in test classes when appropriate
* Provide testing class methods with informative failure statements and
descriptive, one-line docstrings
* Block and inline comments should use proper English grammar and punctuation
with the exception of single sentences in a block, which may then omit the
final period
* When casting is necessary, use `np.int64` and `np.float64` to ensure operating
system agnosticism
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pysatMissions allows users to run build simulated satellites for Two-Line Elemen
Main Features
-------------
- Simulate satellite orbits from TLEs and add data from empirical models
- Import ionosphere and thermosphere model values through pyglow
- Import magnetic coordinates through apexpy and aacgmv2
- Import geomagnetic basis vectors through OMMBV

Expand All @@ -31,14 +30,14 @@ Documentation

pysatMissions uses common Python modules, as well as modules developed by
and for the Space Physics community. This module officially supports
Python 3.7+.
Python 3.8+.

| Common modules | Community modules |
| -------------- | ----------------- |
| numpy | aacgmv2 |
| pandas | apexpy |
| pyEphem | OMMBV |
| sgp4 | pysat>=3.0 |
| pyEphem | OMMBV>=1.0 |
| sgp4>=2.7 | pysat>=3.0 |


One way to install is through pip. Just type
Expand Down
24 changes: 15 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# -*- coding: utf-8 -*-
#
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the right place, closest I could get.

the methods area doesn't have an API in the docs, pysatMissions.methods.magcoords and pysatMissions.methods.satellite. Similarly, pysatMissions.instruments.methods.orbits

# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# https://www.sphinx-doc.org/en/master/config
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the right place.

In tutorials, you currently have

import pysat
from pysatMissions.methods import magcoord

inst = pysat.Instrument(platform='pysat', name='testing')
inst.custom_attach(magcoord.add_aacgm_coordinates,
                   kwargs={'glat_label': 'latitude',
                           'glong_label': 'longitude',
                           'alt_label': 'altitude'})

recommend using the existing sgp4 instrument defined above and switching to

import pysat
from pysatMissions.methods import magcoord

sgp4 = pysat.Instrument(inst_module=missions_sgp4, num_samples=3600)
sgp4.custom_attach(magcoord.add_aacgm_coordinates,
                   kwargs={'glat_label': 'latitude',
                           'glong_label': 'longitude',
                           'alt_label': 'geod_altitude'})
sgp4.load(2019, 1)

No warnings are raised about unable to perform conversion and shows how to apply to the orbit simulator.


"""Configuration file for the Sphinx documentation builder.

Note
----
For a full list see the documentation:
https://www.sphinx-doc.org/en/master/config

"""
jklenzing marked this conversation as resolved.
Show resolved Hide resolved

# -- Path setup --------------------------------------------------------------

Expand All @@ -22,8 +25,8 @@
project = 'pysatMissions'
title = '{:s} Documentation'.format(project)
zenodo = json.loads(open('../.zenodo.json').read())
author = ', '.join([x['name'] for x in zenodo['creators']])
copyright = ', '.join(['2021', author])
author = ', '.join([creator['name'] for creator in zenodo['creators']])
copyright = ', '.join(['2022', author])
description = 'Tools for generating simulated instruments in pysat.'

# The short X.Y version
Expand Down Expand Up @@ -52,11 +55,14 @@
'sphinx.ext.imgmath',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx.ext.githubpages',
'sphinx.ext.autosectionlabel',
'numpydoc',
'IPython.sphinxext.ipython_console_highlighting',
'm2r2']

numpydoc_show_class_members = False
autosectionlabel_prefix_document = True
autosectionlabel_maxdepth = 3

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ as well as apply geomagnetic field models to existing pysat instruments.
installation.rst
citing.rst
supported_instruments.rst
methods.rst
tutorial.rst
references.rst
develop_guide.rst
Expand Down
29 changes: 27 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Python 3.7+ and pysat 3.0.0+.
================ ==================
numpy aacgmv2
pandas apexpy
pyEphem OMMBV
sgp4 pysat>=3.0
pyEphem OMMBV>=1.0
sgp4>=2.7 pysat>=3.0
================ ==================


jklenzing marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -55,3 +55,28 @@ Python 3.7+ and pysat 3.0.0+.


python setup.py develop --user


.. _post-install:

Post Installation
-----------------

After installation, you may register the :py:mod:`pysatMissions`
:py:class:`Instrument` sub-modules with pysat. If this is your first time using
pysat, check out the `quickstart guide
<https://pysat.readthedocs.io/en/latest/quickstart.html>`_ for pysat. Once pysat
is set up, you may choose to register the the :py:mod:`pysatMissions`
:py:class:`Instruments` sub-modules by:

.. code:: python


import pysat
import pysatMissions

pysat.utils.registry.register_by_module(pysatMissions.instruments)

You may then use the pysat :py:attr:`platform` and :py:attr:`name` keywords to
initialize the model :py:class:`Instrument` instead of the
:py:attr:`inst_module` keyword argument.
Loading