Skip to content

Commit

Permalink
Merge pull request #16 from sfinkens/release
Browse files Browse the repository at this point in the history
Enable CI & Deployment
  • Loading branch information
sfinkens authored Jul 15, 2020
2 parents a3f2008 + d0dd54a commit 928e334
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
linters:
flake8:
python: 3
config: setup.cfg
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: python
env:
global:
- PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
- NUMPY_VERSION=stable
- MAIN_CMD='python setup.py'
- CONDA_DEPENDENCIES='netcdf4 hdf5 coveralls coverage pytest pytest-cov'
- PIP_DEPENDENCIES=''
- SETUP_XVFB=False
- EVENT_TYPE='push pull_request'
- SETUP_CMD='test'
- CONDA_CHANNELS='conda-forge'
- CONDA_CHANNEL_PRIORITY="strict"
matrix:
include:
- env: PYTHON_VERSION=3.6
os: linux
- env: PYTHON_VERSION=3.7
os: linux
- env: PYTHON_VERSION=3.8
os: linux
install:
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
- pip install -e .
script:
- pytest --cov=pygac_fdr pygac_fdr/tests
after_success:
- if [[ $PYTHON_VERSION == 3.7 ]]; then coveralls; fi
deploy:
matrix:
- provider: pypi
user: sfinkens
password:
secure: MlHWi5HGZOU2rHJ9dcKqPVGIZgQVpW+T36x1Xplh0WvNsTqDUBP4HZlfFCUiFPdupKfZpMJu1ZlaPJyX8WP9ii5pdNpwsmiRZy4TcydDs8//2x53AJT27StgfSGVKnTZc1rk8M1MA1s4/o85FDJ6SgvXOeWQvs7e0z5GTBUVnCXg7YK0WLgUf8KNHtVwDkFjW1JaUutnCL/6aUpgQ+Pr1/bwM/NT4ZmDlRiv/TjqcXVKDysUt3/Oa1+9WHi1mnfuqyY3u9mMQjxqgEhDc57s5S4kItBi3d5M3dzR7vz4exss5isIEEnVIAYZ+nBv4hMOaYQHEpTPoggGsLNHEa2Pkx79SKHF96M5WoLO6vc+J+RCTUbRkL+yr9ZSbGQN1chPHsRIKAfLtlgrwXDmDwPWnSmzQ0jL8PPNvpr+oyxb9iVjEA3ZSTBz0FnEfbwZP6g/gmMbGi2eJr+7iUTlQ3ipDpi+JIvKgvIO+poTMh1GcNyzqXREFqojTakBEW9y82IUrJmxzDIwtnWoO1H/Aegl/JvTokFdEq1O8bCFIqyPsRoHgOatJqEXzrJRuXBJ09lJaCwDHh1P9rbW7tNsKuYTHVVyMqbcytRjZWBEHvjtHyNCSDyAxMJz02pJw7qaADO7e/Yv788naVKnXyI0I/GMqsX63MIL5qba0zQw0QvgtBA=
distributions: sdist
skip_existing: true
on:
tags: true
repo: pytroll/pygac-fdr
14 changes: 14 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Project Contributors

The following people have made contributions to this project:

<!--- Use your GitHub account or any other personal reference URL --->
<!--- If you wish to not use your real name, please use your github username --->
<!--- The list should be alphabetical by last name if possible, with github usernames at the bottom --->

- M. D.-B.
- [Stephan Finkensieper (sfinkens)](https://github.com/sfinkens)
- [Mike Grant (mikeggrant-eumetsat)](https://github.com/mikeggrant-eumetsat)
- [Carlos Horn (carloshorn)](https://github.com/carloshorn)
- [Martin Raspaud (mraspaud)](https://github.com/mraspaud)
- [Oliver Sus (oliversus)](https://github.com/oliversus)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# pygac-fdr
Python package for creating a Fundamental Data Record (FDR) of AVHRR GAC data using pygac

[![Build](https://travis-ci.com/pytroll/pygac-fdr.svg?branch=master)](https://travis-ci.com/github/pytroll/pygac-fdr?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/pytroll/pygac-fdr/badge.svg?branch=master)](https://coveralls.io/github/pytroll/pygac-fdr?branch=master)
[![PyPI version](https://badge.fury.io/py/pygac-fdr.svg)](https://badge.fury.io/py/pygac-fdr)

Installation
============

Expand Down
2 changes: 1 addition & 1 deletion pygac_fdr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
# If the wheels of netCDF4 (used by this module) and h5py (imported by pygac) are incompatible,
# segfaults or runtime errors like "NetCDF: HDF error" might occur. Prevent this by importing
# netCDF4 first.
import netCDF4
import netCDF4 # noqa: F401
except ImportError:
pass
4 changes: 3 additions & 1 deletion pygac_fdr/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License along with
# pygac-fdr. If not, see <http://www.gnu.org/licenses/>.

"""Config file parsing."""

import yaml


Expand All @@ -28,4 +30,4 @@ def read_config(filename):
if required not in config or config[required] is None:
config[required] = {}

return config
return config
20 changes: 20 additions & 0 deletions pygac_fdr/metadata.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 pygac-fdr developers
#
# This file is part of pygac-fdr.
#
# pygac-fdr is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# pygac-fdr is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# pygac-fdr. If not, see <http://www.gnu.org/licenses/>.

"""Collect and complement L1C metadata."""

from datetime import datetime
from enum import IntEnum
import logging
Expand Down
17 changes: 17 additions & 0 deletions pygac_fdr/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 pygac-fdr developers
#
# This file is part of pygac-fdr.
#
# pygac-fdr is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# pygac-fdr is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# pygac-fdr. If not, see <http://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion pygac_fdr/tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_mda(self, multi_platform=False):
'global_quality_flag': QualityFlags.OK,
'global_quality_flag_exp': QualityFlags.OK}
]

# Add exact copy with another platform
if multi_platform:
noaa17 = [rec.copy() for rec in mda]
Expand Down
2 changes: 2 additions & 0 deletions pygac_fdr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License along with
# pygac-fdr. If not, see <http://www.gnu.org/licenses/>.

"""Miscellaneous utilities."""

import logging

_is_logging_on = False
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,27 @@


if __name__ == '__main__':
requires = ['setuptools_scm', 'numpy', 'netCDF4', 'pygac >=1.3.1', 'satpy >=0.21.0', 'pyyaml']
test_requires = ['pytest']
requires = ['setuptools_scm', 'numpy', 'xarray >=0.15.1', 'pandas >=1.0.3', 'netCDF4',
'h5py', 'pygac >=1.3.1', 'satpy >=0.21.0', 'pyyaml']
README = open('README.md', 'r').read()
setup(name='pygac-fdr',
description='Python package for creating a Fundamental Data Record (FDR) of AVHRR GAC '
'data using pygac',
long_description=README,
long_description_content_type='text/markdown',
classifiers=["Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 " +
"or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering"],
author='The Pytroll Team',
author_email='pytroll@googlegroups.com',
url="https://github.com/pytroll/pygac-fdr",
packages=find_packages(),
scripts=[os.path.join('bin', item) for item in os.listdir('bin')],
use_scm_version=True,
install_requires=requires,
tests_require=test_requires,
python_requires='>=3.6',
)

0 comments on commit 928e334

Please sign in to comment.