diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..56c76e8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: ["**"] + pull_request: + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install coverage codecov + + - name: Run tests with coverage (unittest discovery) + run: | + coverage run -m unittest discover + coverage xml -o coverage.xml + + - name: Upload coverage to Codecov + if: | + github.event_name == 'push' || + (github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository) + uses: codecov/codecov-action@v4 + with: + files: coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..fa3cd0c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,70 @@ +name: Publish + +on: + push: + branches: ["main", "master"] + tags: + - "v*" + +jobs: + build: + name: Build distributions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build backend + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build sdist and wheel + run: | + python -m build + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/* + + publish-testpypi: + name: Publish to TestPyPI (on main/master pushes) + if: github.ref_type == 'branch' && (github.ref_name == 'main' || github.ref_name == 'master') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist + + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@v1.10.1 + with: + packages-dir: dist + repository-url: https://test.pypi.org/legacy/ + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + + publish-pypi: + name: Publish to PyPI (on version tag) + if: startsWith(github.ref, 'refs/tags/v') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@v1.10.1 + with: + packages-dir: dist + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 923cafb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: python - -python: - - "3.6" - -install: - - pip install boto3 - - pip install codecov - - pip install coverage - - pip install pytz - -script: - - coverage run -m unittest discover - -after_success: - - codecov \ No newline at end of file diff --git a/README.md b/README.md index b191f81..b83835b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -[![Build Status](https://travis-ci.org/aarande/nexradaws.svg?branch=master)](https://travis-ci.org/aarande/nexradaws) [![codecov](https://codecov.io/gh/aarande/nexradaws/branch/master/graph/badge.svg)](https://codecov.io/gh/aarande/nexradaws) [![Documentation Status](https://readthedocs.org/projects/nexradaws/badge/?version=latest)](http://nexradaws.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/nexradaws/badge/?version=devel)](http://nexradaws.readthedocs.io/en/devel/?badge=devel) +[![CI](https://github.com/aarande/nexradaws/actions/workflows/ci.yml/badge.svg)](https://github.com/aarande/nexradaws/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/aarande/nexradaws/branch/master/graph/badge.svg)](https://codecov.io/gh/aarande/nexradaws) [![Documentation Status](https://readthedocs.org/projects/nexradaws/badge/?version=latest)](http://nexradaws.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/nexradaws/badge/?version=devel)](http://nexradaws.readthedocs.io/en/devel/?badge=devel) # nexradaws This module is designed to allow you to query and download Nexrad radar files from Amazon Web Services S3 Storage. The real-time feed and full historical archive of original resolution (Level II) NEXRAD data, from June 1991 to present, is now freely available on Amazon S3 for anyone to use. More information can be found here https://aws.amazon.com/public-datasets/nexrad/. -nexradaws supports Python 3.6+. +nexradaws supports Python 3.8+. Github - https://github.com/aarande/nexradaws diff --git a/docker_devel/2.7/Dockerfile b/docker_devel/2.7/Dockerfile deleted file mode 100644 index f3e6bd6..0000000 --- a/docker_devel/2.7/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM continuumio/miniconda3 - -# Set the ENTRYPOINT to use bash -# (this is also where you’d set SHELL, -# if your version of docker supports this) -ENTRYPOINT [ "/bin/bash”, “-c” ] - -EXPOSE 5000 - -# Conda supports delegating to pip to install dependencies -# that aren’t available in anaconda or need to be compiled -# for other reasons. In our case, we need psycopg compiled -# with SSL support. These commands install prereqs necessary -# to build psycopg. -RUN apt-get update && apt-get install -y \ - libpq-dev \ - build-essential \ -&& rm -rf /var/lib/apt/lists/* - - -RUN mkdir /app - - -ADD environment.yml /tmp/environment.yml -WORKDIR /tmp -RUN ["conda","env","create", "--file", "environment.yml"] - -WORKDIR /app -COPY . /app - -# We set ENTRYPOINT, so while we still use exec mode, we don’t -# explicitly call /bin/bash -CMD ["source activate nexradaws"] diff --git a/docker_devel/2.7/docker-compose.dev.yml b/docker_devel/2.7/docker-compose.dev.yml deleted file mode 100644 index df47bc9..0000000 --- a/docker_devel/2.7/docker-compose.dev.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '2' - -services: - app: - container_name: nexradaws2.7 - build: . - image: aarande/nexradaws:2.7 - volumes: - - .:/app diff --git a/docker_devel/2.7/environment.yml b/docker_devel/2.7/environment.yml deleted file mode 100644 index 6e7aefd..0000000 --- a/docker_devel/2.7/environment.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: nexradaws -channels: - - conda-forge -dependencies: - - python==2.7 - - sphinx>=1.4 - - pandoc - - nbconvert - - ipykernel - - boto3 - - arm_pyart - - basemap - - pytz - - six - - pip: - - nbsphinx \ No newline at end of file diff --git a/docker_devel/2.7/requirements_devel.txt b/docker_devel/2.7/requirements_devel.txt deleted file mode 100644 index 09dbdeb..0000000 --- a/docker_devel/2.7/requirements_devel.txt +++ /dev/null @@ -1,5 +0,0 @@ -boto3 -coverage -six -pytz -sphinx \ No newline at end of file diff --git a/docker_devel/3.6/Dockerfile b/docker_devel/3.6/Dockerfile deleted file mode 100644 index f3e6bd6..0000000 --- a/docker_devel/3.6/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM continuumio/miniconda3 - -# Set the ENTRYPOINT to use bash -# (this is also where you’d set SHELL, -# if your version of docker supports this) -ENTRYPOINT [ "/bin/bash”, “-c” ] - -EXPOSE 5000 - -# Conda supports delegating to pip to install dependencies -# that aren’t available in anaconda or need to be compiled -# for other reasons. In our case, we need psycopg compiled -# with SSL support. These commands install prereqs necessary -# to build psycopg. -RUN apt-get update && apt-get install -y \ - libpq-dev \ - build-essential \ -&& rm -rf /var/lib/apt/lists/* - - -RUN mkdir /app - - -ADD environment.yml /tmp/environment.yml -WORKDIR /tmp -RUN ["conda","env","create", "--file", "environment.yml"] - -WORKDIR /app -COPY . /app - -# We set ENTRYPOINT, so while we still use exec mode, we don’t -# explicitly call /bin/bash -CMD ["source activate nexradaws"] diff --git a/docker_devel/3.6/docker-compose.dev.yml b/docker_devel/3.6/docker-compose.dev.yml deleted file mode 100644 index 03952e4..0000000 --- a/docker_devel/3.6/docker-compose.dev.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '2' - -services: - app: - container_name: nexradaws3.6 - build: . - image: aarande/nexradaws:3.6 - volumes: - - .:/app diff --git a/docker_devel/3.6/environment.yml b/docker_devel/3.6/environment.yml deleted file mode 100644 index f61e283..0000000 --- a/docker_devel/3.6/environment.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: nexradaws -channels: - - conda-forge -dependencies: - - python==3.6 - - sphinx>=1.4 - - pandoc - - nbconvert - - ipykernel - - boto3 - - arm_pyart - - basemap - - pytz - - pip: - - nbsphinx \ No newline at end of file diff --git a/docker_devel/3.6/requirements_devel.txt b/docker_devel/3.6/requirements_devel.txt deleted file mode 100644 index d65d53f..0000000 --- a/docker_devel/3.6/requirements_devel.txt +++ /dev/null @@ -1,4 +0,0 @@ -boto3 -coverage -pytz -sphinx \ No newline at end of file diff --git a/docs/source/readthedocs-environment.yml b/docs/source/readthedocs-environment.yml index f3448b3..2b051eb 100644 --- a/docs/source/readthedocs-environment.yml +++ b/docs/source/readthedocs-environment.yml @@ -1,7 +1,8 @@ channels: - conda-forge dependencies: - - python==3.6 + - python==3.8 + - pip - sphinx>=1.4 - pandoc - nbconvert @@ -11,4 +12,5 @@ dependencies: - basemap - pytz - pip: + - pip - nbsphinx \ No newline at end of file diff --git a/setup.py b/setup.py index feca775..3e8aa72 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ If pyart is installed nexradaws allows you to quickly get pyart objects of downloaded files. -nexradaws supports Python 3.6+. +nexradaws supports Python 3.8+. Github - https://github.com/aarande/nexradaws @@ -43,6 +43,7 @@ keywords='weather,radar,nexrad,aws,amazon', download_url='https://github.com/aarande/nexradaws/archive/2.0.0.tar.gz', install_requires=['boto3','pytz'], + python_requires='>=3.8', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', @@ -50,6 +51,10 @@ 'Topic :: Scientific/Engineering :: Atmospheric Science', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], )