Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 5 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
command: |
apt update
apt-get update --yes && apt-get upgrade --yes
apt-get install --yes wget
apt-get install --yes git wget
# download and install miniconda3
mkdir -p ${HOME}/tools
cd ${HOME}/tools
Expand All @@ -45,23 +45,21 @@ jobs:
${HOME}/tools/miniconda3/bin/conda init bash
${HOME}/tools/miniconda3/bin/conda config --add channels conda-forge
${HOME}/tools/miniconda3/bin/conda install -c conda-forge --yes mamba
# modify/export env var PATH to BASH_ENV to be shared across run steps
echo 'export PATH=${CONDA_PREFIX}/bin:${PATH}' >> ${BASH_ENV}

- run:
name: Installing PyAPS
no_output_timeout: 10m
command: |
export PYTHONUNBUFFERED=1
# setup environment variable
export PATH=${CONDA_PREFIX}/bin:${PATH}
# install dependencies
source activate root
mamba install --verbose --yes fortran-compiler --file ${HOME}/tools/PyAPS/requirements.txt
mamba install --verbose --yes --file ${HOME}/tools/PyAPS/requirements.txt
python -m pip install ${HOME}/tools/PyAPS

- run:
name: Test the Installation
command: |
# setup environment variables
export PATH=${CONDA_PREFIX}/bin:${PATH}
# run tests
python ${HOME}/tools/PyAPS/tests/test_calc.py

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Language](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/)
[![Language](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
[![CircleCI](https://img.shields.io/circleci/build/github/insarlab/PyAPS.svg?logo=circleci&label=test)](https://circleci.com/gh/insarlab/PyAPS)
[![Version](https://img.shields.io/github/v/release/insarlab/PyAPS?color=green)](https://github.com/insarlab/PyAPS/releases)
[![License](https://img.shields.io/badge/license-GPLv3+-yellow.svg)](https://github.com/insarlab/PyAPS/blob/main/LICENSE)
Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm[toml]", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "pyaps3"
description = "Python based Atmospheric Phase Screen estimation"
authors = [
{name="Romain Jolivet", email="insar@geologie.ens.fr"},
{name="Angelique Benoit"},
]
readme = "README.md"
requires-python = ">=3.8"
keywords = ["InSAR", "troposphere", "geodesy", "geophysics", "ERA5"]
license = {text = "GPL-3.0-or-later"}
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"cdsapi",
"matplotlib",
"numpy",
"pygrib",
"scipy",
"urllib3",
#"netcdf4", # for MERRA, which is currently not supported
#"pyhdf", # for MERRA, which is currently not supported
]
dynamic = ["version"]

[project.urls]
"Homepage" = "https://github.com/insarlab/PyAPS"
"Bug Tracker" = "https://github.com/insarlab/PyAPS/issues"

[tool.setuptools]
include-package-data = true
zip-safe = false

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
pysolid = ["*.cfg"]

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "no-local-version"
7 changes: 6 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# for running
cdsapi
matplotlib
numpy
Expand All @@ -6,4 +7,8 @@ scipy
urllib3
#netcdf4 #for MERRA, which is currently not supported
#pyhdf #for MERRA, which is currently not supported

# for packaging and installation
pip
setuptools
setuptools_scm
wheel
70 changes: 0 additions & 70 deletions setup.py

This file was deleted.

20 changes: 15 additions & 5 deletions src/pyaps3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
'''
PyAPS module to compute InSAR phase delay maps from weather models.

Written by Romain Jolivet <rjolivet@gps.caltech.edu> and Piyush Agram <piyush@gps.caltech.edu>. The original Fortran package was written by Romain Jolivet and the Python version including support for different models was written by Piyush Agram.
Written by Romain Jolivet <rjolivet@gps.caltech.edu> and Piyush Agram <piyush@gps.caltech.edu>.
The original Fortran package was written by Romain Jolivet and the Python version including
support for different models was written by Piyush Agram.

.. note::
Details of the python module can be obtained `here. <http://code.google.com/p/pyaps>`_
Details of the python module can be obtained `here. <http://code.google.com/p/pyaps>`
'''

__all__ = ['autoget','objects']
# get version info [requires python >=3.8]
from importlib.metadata import PackageNotFoundError, version
try:
__version__ = version(__name__)
except PackageNotFoundError:
print('package is not installed!\n'
'Please follow the installation instructions in the README.md.\n'
'Or, to just get the version number, use:\n'
' python -m setuptools_scm')

# top-level functions
from pyaps3.objects import PyAPS
from pyaps3.autoget import ECMWFdload, MERRAdload, NARRdload

# get version info
from pyaps3.version import release_version as __version__
__all__ = ['__version__', 'PyAPS', 'ECMWFdload', 'MERRAdload', 'NARRdload']

############################################################
# Program is part of PyAPS #
Expand Down
21 changes: 0 additions & 21 deletions src/pyaps3/version.py

This file was deleted.