Skip to content

Commit

Permalink
Remove linting workflow in favor of pre-commit.ci (#120)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
andersy005 and pre-commit-ci[bot] committed Jan 13, 2022
1 parent 91de1cb commit 9061eb6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 36 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/linting.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# POP-tools: Tools to support analysis of POP2-CESM model solutions with xarray

| CI | [![GitHub Workflow Status][github-ci-badge]][github-ci-link] [![GitHub Workflow Status][github-lint-badge]][github-lint-link] [![Code Coverage Status][codecov-badge]][codecov-link] |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| **Docs** | [![Documentation Status][rtd-badge]][rtd-link] |
| **Package** | [![Conda][conda-badge]][conda-link] [![PyPI][pypi-badge]][pypi-link] |
| **License** | [![License][license-badge]][repo-link] |
| CI | [![GitHub Workflow Status][github-ci-badge]][github-ci-link] [![Code Coverage Status][codecov-badge]][codecov-link] |
| :---------- | :-----------------------------------------------------------------------------------------------------------------: |
| **Docs** | [![Documentation Status][rtd-badge]][rtd-link] |
| **Package** | [![Conda][conda-badge]][conda-link] [![PyPI][pypi-badge]][pypi-link] |
| **License** | [![License][license-badge]][repo-link] |

## Installation

Expand All @@ -23,9 +23,7 @@ conda install -c conda-forge pop-tools
See [documentation](https://pop-tools.readthedocs.io) for more information.

[github-ci-badge]: https://img.shields.io/github/workflow/status/NCAR/pop-tools/CI?label=CI&logo=github&style=for-the-badge
[github-lint-badge]: https://img.shields.io/github/workflow/status/NCAR/pop-tools/linting?label=linting&logo=github&style=for-the-badge
[github-ci-link]: https://github.com/NCAR/pop-tools/actions?query=workflow%3ACI
[github-lint-link]: https://github.com/NCAR/pop-tools/actions?query=workflow%3Alinting
[codecov-badge]: https://img.shields.io/codecov/c/github/NCAR/pop-tools.svg?logo=codecov&style=for-the-badge
[codecov-link]: https://codecov.io/gh/NCAR/pop-tools
[rtd-badge]: https://img.shields.io/readthedocs/pop-tools/latest.svg?style=for-the-badge
Expand Down
13 changes: 6 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import datetime
import inspect
Expand Down Expand Up @@ -109,9 +108,9 @@

# General information about the project.
current_year = datetime.datetime.now().year
project = u'pop-tools'
copyright = u'2018-{}, University Corporation for Atmospheric Research'.format(current_year)
author = u'pop-tools developers'
project = 'pop-tools'
copyright = f'2018-{current_year}, University Corporation for Atmospheric Research'
author = 'pop-tools developers'

# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
Expand Down Expand Up @@ -221,14 +220,14 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [(master_doc, 'pop-tools.tex', u'POP-tools Documentation', author, 'manual')]
latex_documents = [(master_doc, 'pop-tools.tex', 'POP-tools Documentation', author, 'manual')]


# -- Options for manual page output ------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, 'pop-tools', u'POP-tools Documentation', [author], 1)]
man_pages = [(master_doc, 'pop-tools', 'POP-tools Documentation', [author], 1)]


# -- Options for Texinfo output ----------------------------------------
Expand All @@ -240,7 +239,7 @@
(
master_doc,
'POP-tools',
u'POP-tools Documentation',
'POP-tools Documentation',
author,
'POP-tools',
'One line description of project.',
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test = pytest

[tool:pytest]
console_output_style = count
addopts = -n auto --cov=./ --cov-report=xml --verbose
addopts = --cov=./ --cov-report=xml --verbose

[isort]
known_first_party=pop_tools
Expand Down
10 changes: 4 additions & 6 deletions tests/test_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_lateral_fill_3D():
field = ds.KMT.copy() * 1.0
field = field.where(ds.KMT > 0)
field.values[20:40, 80:] = np.nan
da_in = xr.DataArray(np.ones((3)), dims=('z_t')) * field
da_in = xr.DataArray(np.ones(3), dims=('z_t')) * field
attrs = {'long_name': 'test field', 'units': 'none'}
da_in.attrs = attrs

Expand All @@ -114,9 +114,7 @@ def test_lateral_fill_4D():
field = field.where(ds.KMT > 0)
field.values[20:40, 80:] = np.nan

da_in = (
xr.DataArray(np.ones((3)), dims=('time')) * xr.DataArray(np.ones((5)), dims=('z_t')) * field
)
da_in = xr.DataArray(np.ones(3), dims=('time')) * xr.DataArray(np.ones(5), dims=('z_t')) * field

attrs = {'long_name': 'test field', 'units': 'none'}
da_in.attrs = attrs
Expand All @@ -140,8 +138,8 @@ def test_lateral_fill_4D_3Dmask():
field.values[20:40, 80:] = np.nan

da_in = (
xr.DataArray(np.ones((3)), dims=('time'))
* xr.DataArray(np.ones((len(ds.z_t))), dims=('z_t'))
xr.DataArray(np.ones(3), dims=('time'))
* xr.DataArray(np.ones(len(ds.z_t)), dims=('z_t'))
* field
)

Expand Down

0 comments on commit 9061eb6

Please sign in to comment.