Skip to content

Commit

Permalink
Fixing deployment (deepchecks#861)
Browse files Browse the repository at this point in the history
* Fixing deployment

* replaced SEMANTIC_VERSIONING_RE with PYTHON_VERSIONING_RE

* Documentation fixes (refactoring) (deepchecks#876)

* docs refactoring

* code-style fixes

Co-authored-by: Yurii Romanyshyn <[email protected]>
Co-authored-by: Yurii Romanyshyn <[email protected]>
  • Loading branch information
3 people authored Feb 16, 2022
1 parent 0ffe328 commit fbd8e46
Show file tree
Hide file tree
Showing 26 changed files with 234 additions and 232 deletions.
1 change: 1 addition & 0 deletions .licenserc_fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ header:
- '.github/ISSUE_TEMPLATE/'
- '.github/pull_request_template.md'
- 'deepchecks/base/resources'
- 'DESCRIPTION.rst'
comment: on-failure

dependency:
Expand Down
15 changes: 0 additions & 15 deletions DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
.. raw:: html

<!--
~ ----------------------------------------------------------------------------
~ Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)
~
~ This file is part of Deepchecks.
~ Deepchecks is distributed under the terms of the GNU Affero General
~ Public License (version 3 or later).
~ You should have received a copy of the GNU Affero General Public License
~ along with Deepchecks. If not, see <http://www.gnu.org/licenses/>.
~ ----------------------------------------------------------------------------
~
-->


|build| |Documentation Status| |pkgVersion| |pyVersions|
|Maintainability| |Coverage Status|
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.2
0.5.0.dev0
5 changes: 5 additions & 0 deletions deepchecks/tabular/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@
# ----------------------------------------------------------------------------
#
"""Module for working with pre-built datasets."""
from . import classification
from . import regression


__all__ = ['classification', 'regression']
5 changes: 5 additions & 0 deletions deepchecks/tabular/datasets/classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@
# ----------------------------------------------------------------------------
#
"""Module for working with pre-built classification datasets."""
from . import breast_cancer
from . import iris
from . import phishing

__all__ = ['breast_cancer', 'iris', 'phishing']
3 changes: 3 additions & 0 deletions deepchecks/tabular/datasets/regression/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
# ----------------------------------------------------------------------------
#
"""Module for working with pre-built regression datasets."""
from . import avocado

__all__ = ['avocado']
2 changes: 2 additions & 0 deletions deepchecks/vision/checks/performance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
#
"""Module containing the performance check in the vision package."""
from .class_performance import ClassPerformance
from .robustness_report import RobustnessReport

__all__ = [
"ClassPerformance",
"RobustnessReport"
]
4 changes: 4 additions & 0 deletions deepchecks/vision/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
# ----------------------------------------------------------------------------
#
"""Module containing datasets and models for vision tasks."""
from . import classification
from . import detection

__all__ = ['classification', 'detection']
7 changes: 2 additions & 5 deletions deepchecks/vision/datasets/classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
# ----------------------------------------------------------------------------
#
"""Module for classification datasets and models."""
import pathlib
from . import mnist


__all__ = ["MODELS_DIR"]


MODELS_DIR = pathlib.Path(__file__).absolute().parent / "models"
__all__ = ["mnist"]
3 changes: 2 additions & 1 deletion deepchecks/vision/datasets/classification/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
from deepchecks.vision.utils import ImageFormatter
from deepchecks.vision.utils.classification_formatters import ClassificationLabelFormatter
from deepchecks.vision.dataset import VisionData
from . import MODELS_DIR


__all__ = ['load_dataset', 'load_model', 'MNistNet', 'MNIST', 'mnist_image_formatter']


MODELS_DIR = pathlib.Path(__file__).absolute().parent / 'models'

LOGGER = logging.getLogger(__name__)
MODULE_DIR = pathlib.Path(__file__).absolute().parent
DATA_PATH = MODULE_DIR / 'MNIST'
Expand Down
4 changes: 4 additions & 0 deletions deepchecks/vision/datasets/detection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
# ----------------------------------------------------------------------------
#
"""Module for detection datasets and models."""
from . import coco
from . import yolo_to_coco

__all__ = ["coco", "yolo_to_coco"]
24 changes: 12 additions & 12 deletions docs/source/_templates/autosummary/check-module.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{% extends "autosummary/module.rst" %}

{% block header %}
{{ name | escape | title | underline }}
{{ name | escape | underline }}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}
{% block members %}
{% if members %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:template: autosummary/check.rst
:toctree:
{% for item in classes %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock classes %}
.. autosummary::
:template: autosummary/check.rst
:toctree:
{% for item in members %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock members %}
9 changes: 7 additions & 2 deletions docs/source/_templates/autosummary/check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
{% block footer %}

{% set splitname = fullname.split('.') %}
{% set checkname = splitname[-3:-1] %}

{# checktype = distribution|integrity|methodology... #}
{% set checktype = splitname[-3:-1][1] %}

{# submoduletype = tabular|vision... #}
{% set submoduletype = splitname[1] %}

Example
~~~~~~~
Expand All @@ -12,6 +17,6 @@ Example
:name: rst-gallery
:glob:

{{objname}} Example Notebook </examples/checks/{{ checkname[1] }}/{{ to_snake_case(objname).lower() }}>
{{objname}} Example Notebook </examples/{{ submoduletype }}/checks/{{ checktype }}/{{ to_snake_case(objname).lower() }}>

{% endblock %}
119 changes: 68 additions & 51 deletions docs/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,74 @@
{% block content %}
.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module Attributes

.. autosummary::
:toctree:

{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock attributes %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:

{% for item in functions %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock functions %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:

{% for item in classes %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock classes %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:

{% for item in exceptions %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock exceptions %}
.. currentmodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module Attributes

.. autosummary::
:toctree:

{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock attributes %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:

{% for item in functions %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock functions %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:

{% for item in classes %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock classes %}


{% block members %}
{% if members|length != 0 and exceptions|length == 0 and classes|length == 0 and functions|length == 0 and attributes|length == 0 %}
.. rubric:: {{ _('Members') }}

.. autosummary::
:toctree:

{% for item in members %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock members %}


{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:

{% for item in exceptions %}
{{ item }}
{% endfor %}
{% endif %}
{% endblock exceptions %}

{% block modules %}
{% if modules %}
Expand Down
20 changes: 13 additions & 7 deletions docs/source/api/core.rst → docs/source/api/deepchecks.core.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
Core
====
deepchecks.core
===============

.. py:module:: deepchecks.core
.. automodule:: deepchecks.core

.. currentmodule:: deepchecks.core

.. rubric:: Modules and Classes
.. rubric:: Modules

.. autosummary::
:recursive:
:caption: Modules
:toctree: generated

errors

.. rubric:: Classes

.. autosummary::
:caption: Classes
:toctree: generated

BaseCheck
Expand All @@ -20,6 +28,4 @@ Core
ConditionResult
ConditionCategory
BaseSuite
SuiteResult

errors
SuiteResult
18 changes: 18 additions & 0 deletions docs/source/api/deepchecks.tabular.checks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
checks
======

.. automodule:: deepchecks.tabular.checks

.. currentmodule:: deepchecks.tabular.checks

.. rubric:: Modules

.. autosummary::
:toctree: generated
:template: autosummary/check-module.rst

distribution
integrity
methodology
overview
performance
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
Tabular
=======

.. py:module:: deepchecks.tabular
deepchecks.tabular
==================

.. automodule:: deepchecks.tabular

.. currentmodule:: deepchecks.tabular

.. rubric:: Modules and Classes
.. rubric:: Modules

.. autosummary::
:recursive:
:toctree: generated
:caption: Modules

checks
suites
datasets

.. rubric:: Classes

.. autosummary::
:toctree: generated
:caption: Classes

Dataset
Context
Check
SingleDatasetBaseCheck
TrainTestBaseCheck
ModelOnlyBaseCheck
Suite
SingleDatasetCheck
TrainTestCheck
ModelOnlyCheck
ModelComparisonContext
ModelComparisonCheck
ModelComparisonSuite


ModelComparisonSuite
Loading

0 comments on commit fbd8e46

Please sign in to comment.