From c8fc987eacfae43609ac5ef1e631b6940167f6e0 Mon Sep 17 00:00:00 2001 From: ubermag-bot Date: Mon, 27 Sep 2021 14:43:28 +0000 Subject: [PATCH 1/3] Update from https://github.com/ubermag/devtools/commit/e471393434e77b1c61087d17368093b6bae94893 --- .gitignore | 4 ++-- Makefile | 2 +- README.md | 2 +- pyproject.toml | 2 +- setup.py | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ca27393..40f0135 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,8 @@ .#* *# .DS_Store -docs/ipynb/* -!docs/ipynb/*.ipynb +docs/* +!docs/*.ipynb docs/_build .cache .coverage diff --git a/Makefile b/Makefile index fb866ed..2746770 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PROJECT=micromagnetictests -IPYNBPATH=docs/ipynb/*.ipynb +IPYNBPATH=docs/*.ipynb PYTHON?=python test-unittests: diff --git a/README.md b/README.md index a093c0b..25a46d1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ | Coverage | [![codecov](https://codecov.io/gh/ubermag/micromagnetictests/branch/master/graph/badge.svg?token=hcK4fofmrL)](https://codecov.io/gh/ubermag/micromagnetictests) | | Documentation | [![Documentation](https://img.shields.io/badge/Docs-ubermag.github.io-blue)](https://ubermag.github.io/documentation/micromagnetictests.html) | | YouTube | [![YouTube](https://img.shields.io/badge/YouTube-ubermag-blue)](https://www.youtube.com/channel/UC7MSqVQSMFV42R1jAYmKGLg) | -| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ubermag/micromagnetictests/stable?urlpath=lab/tree/docs/ipynb/index.ipynb)| +| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ubermag/micromagnetictests/stable?urlpath=lab/tree/docs/index.ipynb) | | Platforms | [![Platforms](https://anaconda.org/conda-forge/micromagnetictests/badges/platforms.svg)](https://anaconda.org/conda-forge/micromagnetictests) | | Downloads | [![Downloads](https://anaconda.org/conda-forge/micromagnetictests/badges/downloads.svg)](https://anaconda.org/conda-forge/micromagnetictests) | | License | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) | diff --git a/pyproject.toml b/pyproject.toml index d4b2a6a..1ac4d11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,4 +61,4 @@ about = """ """ [tool.coverage.run] -omit = ["micromagnetictests/tests/*", "micromagnetictests/calculatortests/*"] +omit = ["micromagnetictests/tests/*"] diff --git a/setup.py b/setup.py index b58b162..0839ce2 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ # This content is needed for editable install via pip. import setuptools setuptools.setup() + From dfb4a3c723abb9f21fc992a9881d784366978e68 Mon Sep 17 00:00:00 2001 From: Martin Lang Date: Mon, 27 Sep 2021 16:57:28 +0200 Subject: [PATCH 2/3] Move documentation --- .readthedocs.yml | 8 -- docs/Makefile | 20 ----- docs/_templates/class-template.rst | 41 ---------- docs/_templates/module-template.rst | 53 ------------- docs/conf.py | 78 ------------------- docs/{ipynb => }/index.ipynb | 0 docs/index.rst | 14 ---- .../installation-testing-update.ipynb | 0 docs/{ipynb => }/other.ipynb | 0 docs/requirements.txt | 3 - docs/{ipynb => }/usage.ipynb | 0 setup.py | 1 - 12 files changed, 218 deletions(-) delete mode 100644 .readthedocs.yml delete mode 100644 docs/Makefile delete mode 100644 docs/_templates/class-template.rst delete mode 100644 docs/_templates/module-template.rst delete mode 100644 docs/conf.py rename docs/{ipynb => }/index.ipynb (100%) delete mode 100644 docs/index.rst rename docs/{ipynb => }/installation-testing-update.ipynb (100%) rename docs/{ipynb => }/other.ipynb (100%) delete mode 100644 docs/requirements.txt rename docs/{ipynb => }/usage.ipynb (100%) diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index a458a7f..0000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: 2 - -python: - version: 3.8 - install: - - requirements: docs/requirements.txt - - method: pip - path: . diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d4bb2cb..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_templates/class-template.rst b/docs/_templates/class-template.rst deleted file mode 100644 index b33aeaa..0000000 --- a/docs/_templates/class-template.rst +++ /dev/null @@ -1,41 +0,0 @@ -{{ objname | escape | underline }} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - :members: - :special-members: - - .. raw:: html - -
- - {% block methods %} - {% if methods %} - .. rubric:: {{ ('Methods') }} - - .. autosummary:: - :nosignatures: - {% for item in all_methods %} - {% if not item.startswith('_') or - (item.startswith('__') and item not in excluded_members) %} - ~{{ name }}.{{ item }} - {% endif %} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block attributes %} - {% if attributes %} - .. rubric:: {{ ('Properties') }} - - .. autosummary:: - {% for item in attributes %} - ~{{ name }}.{{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - .. raw:: html - -
diff --git a/docs/_templates/module-template.rst b/docs/_templates/module-template.rst deleted file mode 100644 index 424e489..0000000 --- a/docs/_templates/module-template.rst +++ /dev/null @@ -1,53 +0,0 @@ -{{ fullname | escape | underline}} - -.. automodule:: {{ fullname }} - {% block attributes %} - {% if attributes %} - .. rubric:: Module attributes - - .. autosummary:: - :toctree: - {% for item in attributes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: {{ ('Classes') }} - - .. autosummary:: - :toctree: - :template: class-template.rst - :nosignatures: - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block functions %} - {% if functions %} - .. rubric:: {{ ('Functions') }} - - .. autosummary:: - :toctree: - :nosignatures: - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: {{ ('Exceptions') }} - - .. autosummary:: - :toctree: - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 49ea4d4..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,78 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- Project information ----------------------------------------------------- - -project = 'micromagnetictests' -copyright = '2021, Marijan Beg and Hans Fangohr' -author = 'Marijan Beg, Martin Lang, and Hans Fangohr' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.napoleon', - 'sphinx.ext.mathjax', - 'nbsphinx', - 'm2r2' -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# 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'] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinx_rtd_theme' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] - -# Custom configuration -autosummary_generate = True -autosummary_imported_members = True -autosummary_context = { - 'excluded_members': ['__radd__', '__rand__', '__rlshift__', '__rmatmul__', - '__rmul__', '__rsub__', '__rtruediv__', '__delattr__', - '__format__', '__ge__', '__getattribute__', '__gt__', - '__init__', '__init_subclass__', '__le__', '__lt__', - '__ne__', '__new__', '__reduce__', '__reduce_ex__', - '__setattr__', '__sizeof__', '__str__', - '__subclasshook__', '__hash__'] -} - -autoclass_content = 'class' -autodoc_inherit_docstrigs = True -autodoc_default_options = { - 'member-order': 'groupwise', - 'exclude-members': '__init__, __weakref__' -} diff --git a/docs/ipynb/index.ipynb b/docs/index.ipynb similarity index 100% rename from docs/ipynb/index.ipynb rename to docs/index.ipynb diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 7464fa9..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -NEW WEBSITE: https://ubermag.github.io -====================================== - -``Micromagnetictests`` is part of the ``ubermag`` metapackage. Recently, the -websites for the different subpackages have been centralised. Please use the new -`documentation `_ -and `API reference `_ in -the future. - -You should be redirected in 5 seconds automatically. - -.. raw:: html - - diff --git a/docs/ipynb/installation-testing-update.ipynb b/docs/installation-testing-update.ipynb similarity index 100% rename from docs/ipynb/installation-testing-update.ipynb rename to docs/installation-testing-update.ipynb diff --git a/docs/ipynb/other.ipynb b/docs/other.ipynb similarity index 100% rename from docs/ipynb/other.ipynb rename to docs/other.ipynb diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index acaacf8..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx>=3.4 -nbsphinx>=0.8 -m2r2>=0.2 diff --git a/docs/ipynb/usage.ipynb b/docs/usage.ipynb similarity index 100% rename from docs/ipynb/usage.ipynb rename to docs/usage.ipynb diff --git a/setup.py b/setup.py index 0839ce2..b58b162 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ # This content is needed for editable install via pip. import setuptools setuptools.setup() - From 126b1f1f845cc1e6ec1b28c4e35c9f2420c3f060 Mon Sep 17 00:00:00 2001 From: Martin Lang Date: Mon, 27 Sep 2021 17:08:31 +0200 Subject: [PATCH 3/3] Correct files to be ignored for coverage --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1ac4d11..d4b2a6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,4 +61,4 @@ about = """ """ [tool.coverage.run] -omit = ["micromagnetictests/tests/*"] +omit = ["micromagnetictests/tests/*", "micromagnetictests/calculatortests/*"]