Skip to content

Commit

Permalink
Merge 915596c into fd3de78
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed Nov 10, 2022
2 parents fd3de78 + 915596c commit 22a85fa
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 120 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ jobs:

name: Documentation tests
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test_requirements.txt
- name: Install with dependencies
run: pip install .[doc]

- name: Check documentation build
run: sphinx-build -E -b html docs dist/docs
Expand Down
48 changes: 33 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,49 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
numpy_ver: ["latest"]
include:
- python-version: "3.8"
numpy_ver: "1.20"
os: "ubuntu-latest"

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

- name: Install requirements for testing setup
- name: Install with NEP29 dependencies
if: ${{ matrix.numpy_ver != 'latest'}}
run: |
python -m pip install --upgrade pip
pip install -r test_requirements.txt
pip install --no-binary :numpy: numpy==${{ matrix.numpy_ver }}
# Force install version compatible with NEP29
pip install "pandas<1.5"
pip install --upgrade-strategy only-if-needed .[test]
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install aacgmv2 --no-binary==aacgmv2
pip install apexpy --no-binary==apexpy
pip install OMMBV --no-binary==OMMBV
- name: Install with standard dependencies
if: ${{ matrix.numpy_ver == 'latest'}}
run: pip install .[test]

- name: Install aacgmv2
# Optional package, continue with tests if install fails
continue-on-error: true
run: pip install aacgmv2 --no-binary==aacgmv2

- name: Install apexpy
# Optional package, continue with tests if install fails
continue-on-error: true
run: pip install apexpy --no-binary==apexpy

- name: Install OMMBV
# Optional package, continue with tests if install fails
continue-on-error: true
run: pip install OMMBV --no-binary==OMMBV

- name: Set up pysat
run: |
Expand All @@ -48,8 +67,7 @@ jobs:
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

- name: Test with pytest
run: |
pytest --cov=pysatMissions/
run: pytest

- name: Publish results to coveralls
env:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## [0.X.X] - 2022-XX-XX
* Maintenance
* Update pytest syntax
* Use pyproject.toml to handle metadata / installation

## [0.3.3] - 2022-09-06
* Documentation Updates
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ a local install use the "--user" flag after "install".

```
cd pysatMissions/
python setup.py install
pip install .
```

Note: pre-1.0.0 version
Expand Down
12 changes: 6 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
#
import json
import os
from pyproject_parser import PyProject
import sys
sys.path.insert(0, os.path.abspath('..'))

# -- Project information -----------------------------------------------------

info = PyProject.load("../pyproject.toml")

project = 'pysatMissions'
title = '{:s} Documentation'.format(project)
zenodo = json.loads(open('../.zenodo.json').read())
author = ', '.join([creator['name'] for creator in zenodo['creators']])
copyright = ', '.join(['2022', author])
description = 'Tools for generating simulated instruments in pysat.'
description = info.project['description']

# The short X.Y version
module_dir = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0]
version_file = os.path.join(module_dir, project, 'version.txt')
with open(version_file, 'r') as fin:
version = fin.read().strip()
version = info.project['version'].base_version

# The full version, including alpha/beta/rc tags.
release = '{:s}-alpha'.format(version)
Expand Down Expand Up @@ -81,7 +81,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
10 changes: 5 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Python 3.8+ and pysat 3.0.4+.
================ =================== ==================


Installation Options
--------------------
Installation Options
--------------------

1. Clone the git repository
::
Expand All @@ -43,17 +43,17 @@ Python 3.8+ and pysat 3.0.4+.
A. Install on the system (root privileges required)::


sudo python setup.py install
sudo pip install .

B. Install at the user level::


python setup.py install --user
pip install --user .

C. Install with the intent to develop locally::


python setup.py develop --user
pip install -e --user .


.. _post-install:
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ geospacepy
numpy
OMMBV>=1.0
pandas
pyproject_parser
pysat>=3.0
pyEphem
sgp4>=2.7
85 changes: 85 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
[build-system]
requires = ["setuptools", "pip >= 10"]
build-backend = "setuptools.build_meta"

[project]
name = "pysatMissions"
version = "0.3.4"
description = "Mission Planning toolkit for pysat"
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE"}
authors = [
{name = "Jeff Klenzing", email = "pysat.developers@gmail.com"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows"
]
keywords = [
"pysat",
"ionosphere",
"cubesat",
"satellite",
"ephemeris",
"orbit",
"mission-planning"
]
dependencies = [
"geospacepy",
"numpy",
"pandas",
"pysat >= 3.0.4",
"pyEphem",
"sgp4 >= 2.7"
]

[project.optional-dependencies]
aacgmv2 = ["aacgmv2"]
apexpy = ["apexpy"]
OMMBV = ["OMMBV"]
test = [
"coveralls < 3.3",
"flake8",
"flake8-docstrings",
"hacking >= 1.0",
"pytest",
"pytest-cov",
"pytest-ordering"
]
doc = [
"extras_require",
"ipython",
"m2r2",
"numpydoc",
"pyproject_parser",
"sphinx",
"sphinx_rtd_theme"
]

[project.urls]
Documentation = "https://pysatmissions.readthedocs.io/en/latest/"
Source = "https://github.com/pysat/pysatMissions"

[tool.pytest.ini_options]
addopts = "--cov=pysatMissions"
markers = [
"all_inst",
"download",
"no_download",
"load_options",
"first",
"second"
]
6 changes: 2 additions & 4 deletions pysatMissions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"""

import os
import pkg_resources

from pysatMissions import instruments
from pysatMissions import methods
Expand All @@ -20,6 +20,4 @@
__all__ = ['instruments', 'methods', 'utils']

# set version
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'version.txt')) as version_file:
__version__ = version_file.read().strip()
__version__ = pkg_resources.get_distribution('pysatMissions').version
1 change: 0 additions & 1 deletion pysatMissions/version.txt

This file was deleted.

6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

65 changes: 1 addition & 64 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,71 +1,8 @@
[metadata]
name = pysatMissions
version = file: pysatMissions/version.txt
url = https://github.com/pysat/pysatMissions
author = Jeff Klenzing, Russell Stoneback
author_email = pysat.developers@gmail.com
description = 'Mission Planning toolkit for pysat'
keywords =
pysat
ionosphere
cubesat
satellite
ephemeris
orbit
mission-planning
classifiers =
Development Status :: 3 - Alpha
Topic :: Scientific/Engineering :: Physics
Topic :: Scientific/Engineering :: Atmospheric Science
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Natural Language :: English
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Operating System :: MacOS :: MacOS X
Operating System :: POSIX :: Linux
Operating System :: Microsoft :: Windows
license_file = LICENSE
long_description = file: README.md
long_description_content_type = text/markdown

[options]
python_requires = >= 3.5
setup_requires =
setuptools >= 38.6
pip >= 10
include_package_data = True
zip_safe = False
packages = find:
install_requires =
geospacepy
numpy
pandas
pysat
pyEphem
sgp4

[options.extras_require]
aacgmv2 = aacgmv2
apexpy = apexpy
OMMBV = OMMBV


[coverage:report]
[coverage.report]

[flake8]
max-line-length = 90
ignore =
D200
D202
W503

[tool:pytest]
markers =
all_inst: tests all instruments
download: tests for downloadable instruments
no_download: tests for instruments without download support
load_options: tests for instruments with additional options
first: first tests to run
second: second tests to run
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from setuptools import setup

# package metadata stored in setup.cfg
# package metadata stored in pyproject.toml
# tool configurations stored in setup.cfg

setup()
10 changes: 0 additions & 10 deletions test_requirements.txt

This file was deleted.

0 comments on commit 22a85fa

Please sign in to comment.