Skip to content

Commit

Permalink
Support for Python 3.9, added ci.yml for Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Jul 29, 2021
1 parent ac40acf commit dd564eb
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 6 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov cython
pip install -r requirements.txt
pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run pytest
run: |
make test
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- 3.6
- 3.7
- 3.8
- 3.9

install:
- pip install -e .
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.. image:: https://img.shields.io/pypi/pyversions/diskmap
:target: https://pypi.python.org/pypi/diskmap

.. image:: https://img.shields.io/travis/tomasstolker/diskmap
:target: https://travis-ci.com/tomasstolker/diskmap
.. image:: https://github.com/tomasstolker/diskmap/workflows/CI/badge.svg?branch=master
:target: https://github.com/tomasstolker/diskmap/actions

.. image:: https://img.shields.io/readthedocs/diskmap
:target: http://diskmap.readthedocs.io
Expand Down
2 changes: 1 addition & 1 deletion diskmap/diskmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self,
self.image = np.nan_to_num(self.image)

if self.image.ndim == 3:
warn.warnings('The FITS file contains a 3D data cube so using the first image.')
warnings.warn('The FITS file contains a 3D data cube so using the first image.')

self.image = self.image[0, ]

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------
# -- Extension configuration -------------------------------------------------
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installation
============

*diskmap* is compatible with Python 3.6/3.7/3.8 and available through `PyPI <https://pypi.org/project/diskmap/>`_ and `Github <https://github.com/tomasstolker/diskmap>`_.
*diskmap* is compatible with Python 3.6/3.7/3.8/3.9 and available through `PyPI <https://pypi.org/project/diskmap/>`_ and `Github <https://github.com/tomasstolker/diskmap>`_.

Installation from PyPI
----------------------
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: notebook
channels:
- conda-forge
dependencies:
- python=3.7
- python=3.8
- pip
- ipython=7.10
- pip:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)

0 comments on commit dd564eb

Please sign in to comment.