Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit config #90

Merged
merged 9 commits into from
May 3, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9"]


steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ target/
**/dask-worker-space

# movie and picture files
*.png
*.png
*.mov
*.mp4
*.mp4
*.gif
!docs/examples/*.gif
!docs/examples/*.png
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.1.0"
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

- repo: https://github.com/asottile/pyupgrade
rev: "v2.31.1"
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/PyCQA/isort
rev: "5.10.1"
hooks:
- id: isort

- repo: https://github.com/python/black
rev: "22.3.0"
hooks:
- id: black

- repo: https://github.com/keewis/blackdoc
rev: "v0.3.4"
hooks:
- id: blackdoc

- repo: https://gitlab.com/pycqa/flake8
rev: "3.9.2"
hooks:
- id: flake8
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# xmovie
[![Build Status](https://img.shields.io/github/workflow/status/jbusecke/xmovie/CI?logo=github)](https://github.com/jbusecke/xmovie/actions)
[![Documentation Status](https://readthedocs.org/projects/xmovie/badge/?version=latest)](https://xmovie.readthedocs.io/en/latest/)
[![pre-commit.ci Status](https://results.pre-commit.ci/badge/github/jbusecke/xmovie/master.svg)](https://results.pre-commit.ci/latest/github/jbusecke/xmovie/master)
[![codecov %](https://codecov.io/gh/jbusecke/xmovie/branch/master/graph/badge.svg)](https://codecov.io/gh/jbusecke/xmovie)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/124968397.svg)](https://zenodo.org/badge/latestdoi/124968397)
Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ They have a signature of the type:

.. code-block::

plotfunc(da, fig, timestamp, framedim, **kwargs):
def plotfunc(da, fig, timestamp, framedim, **kwargs):
...

.. autosummary::
Expand Down
12 changes: 3 additions & 9 deletions docs/api/xmovie.Movie.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,17 @@

.. autoclass:: Movie


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~Movie.__init__
~Movie.preview
~Movie.render_single_frame
~Movie.save
~Movie.save_frames_parallel
~Movie.save_frames_serial






2 changes: 1 addition & 1 deletion docs/api/xmovie.presets.basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ xmovie.presets.basic

.. currentmodule:: xmovie.presets

.. autofunction:: basic
.. autofunction:: basic
2 changes: 1 addition & 1 deletion docs/api/xmovie.rotating_globe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ xmovie.rotating\_globe

.. currentmodule:: xmovie

.. autofunction:: rotating_globe
.. autofunction:: rotating_globe
27 changes: 13 additions & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@
# -- Project information -----------------------------------------------------

current_year = datetime.datetime.now().year
project = 'xmovie'
copyright = f'2018\u2013{current_year}, xmovie maintainers'
author = 'Julius Busecke'
project = "xmovie"
copyright = f"2018\u2013{current_year}, xmovie maintainers"
author = "Julius Busecke"

# The short X.Y version
version = ".".join(xmovie.__version__.split(".")[:2])
# The full version, including alpha/beta/rc tags
release = xmovie.__version__



# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -44,9 +43,9 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.extlinks',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.autosectionlabel",
Expand All @@ -59,16 +58,16 @@
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -80,16 +79,16 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"


# -- Extension configuration -------------------------------------------------

autodoc_typehints = "description"
autodoc_default_options ={
autodoc_default_options = {
"members": True,
}

Expand Down Expand Up @@ -123,4 +122,4 @@

# -- Options for HTML output -------------------------------------------------

html_theme = 'sphinx_book_theme'
html_theme = "sphinx_book_theme"
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ If you want to install the latest version from GitHub, simply run
pip install git+https://github.com/jbusecke/xmovie.git

.. note::

If you dont have
`ssh keys set up <https://help.github.com/en/articles/adding-a-new-ssh-key-to-your-github-account>`_,
you can use

.. prompt:: bash

git clone https://github.com/jbusecke/xmovie.git`

and enter your github password.
Expand Down
2 changes: 1 addition & 1 deletion docs/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Documentation
By `zmoon <https://github.com/zmoon>`_.
- Add more readme badges (:pull:`72`).
By `zmoon <https://github.com/zmoon>`_.

Breaking Changes
~~~~~~~~~~~~~~~~
- Removed support for python 3.6 (:pull:`80`).
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool.black]
line-length = 105
10 changes: 9 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ ignore =
[flake8]
max-line-length = 105
select = C,E,F,W,B,B950
ignore = E203, E501, W503
ignore = E203, E402, E501, E731, W503, E265, F811
exclude = xmovie/_version.py

[isort]
profile = black
force_to_top = true
default_section = THIRDPARTY
known_first_party = xmovie
skip =
docs/conf.py


[metadata]
name = xmovie
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

from setuptools import setup


setup(
use_scm_version={
"write_to": "xmovie/_version.py",
Expand Down
1 change: 0 additions & 1 deletion xmovie/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from .core import Movie
from .presets import rotating_globe


try:
from ._version import __version__

Expand Down
Loading