Skip to content

Commit

Permalink
docs: don't display error and warning in stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
12rambau committed Jul 4, 2022
1 parent a16e889 commit 9c319b0
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
text = Path("warnings.txt").read_text().strip()
print("\n=== Sphinx Warnings ===\n\n" + text) # Print just for reference so we can look at the logs
warnings = [ii for ii in text.split("\n")]
expected = ["transition", "CHANGELOG.md", "ipykernel", "ClientV1DeprecationWarning"]
expected = ["transition", "CHANGELOG.md"]
unexpected = [ii for ii in text.split("\n") if all(i not in ii for i in expected)]
assert len(unexpected) == 0
Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ In the following example we create a fake file on the fly and use it to display

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
from pathlib import Path
Expand Down
9 changes: 8 additions & 1 deletion docs/source/widgets/alert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Any argument from the original :code:`Alert` ipyvuetify class can be used to com

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down Expand Up @@ -41,6 +42,7 @@ Update the Alert message with a progress bar

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -58,7 +60,8 @@ Add a message in the alert by replacing all the existing one.

.. jupyter-execute::
:raises:

:stderr:

from sepal_ui import sepalwidgets as sw

# correct colors for the documentation
Expand All @@ -79,6 +82,7 @@ Add a message in the alert by replacing all the existing one and add a timestamp

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -100,6 +104,7 @@ Append a message in a new parragraph, with or without :code:`Divider`.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -123,6 +128,7 @@ Remove the last msg printed in the Alert widget.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -149,6 +155,7 @@ If not return :code:`False` and display an error message else return :code:`True

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The :code:`drawerItem` will be linked to the app tile and they will be able to c

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
from sepal_ui import aoi
Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/asset_select.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Any argument from the original :code:`Combobox` ipyvuetify class can be used to

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
2 changes: 2 additions & 0 deletions docs/source/widgets/btn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The default color is set to "primary".

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -31,6 +32,7 @@ Btn can be used to launch function on any Javascript event such as "click".

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
2 changes: 2 additions & 0 deletions docs/source/widgets/clip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Any argument from the original :code:`TextField` ipyvuetify class can be used to

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -28,6 +29,7 @@ You can also dynamically change the :code:`v_model` value.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/date_picker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Any argument from the original :code:`Layout` ipyvuetify class can be used to co

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/disclaimer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ In the following example we create a fake file on the fly and use it to display

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
from pathlib import Path
Expand Down
2 changes: 2 additions & 0 deletions docs/source/widgets/download_btn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The default color is set to "success". if no URL is set the button is disabled.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -28,6 +29,7 @@ the linked URL can be dynamically set with the :code:`set_url` method.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
3 changes: 3 additions & 0 deletions docs/source/widgets/file_input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Any argument from the original :code:`Layout` ipyvuetify class can be used to co

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -32,6 +33,7 @@ Manually select a file from it's path. No verification on the extension is perfo

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
from pathlib import Path
Expand All @@ -56,6 +58,7 @@ Clear the File selection and move to the root folder if something was selected.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/load_table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Any argument from the original :code:`Layout` ipyvuetify class can be used to co

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
2 changes: 2 additions & 0 deletions docs/source/widgets/markdown.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Overview

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down Expand Up @@ -51,6 +52,7 @@ Then In your notebook you can call the key in a markdown widget and display it a

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Any argument from the original :code:`TextField` ipyvuetify class can be used to

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/password.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Any argument from the original :code:`TextField` ipyvuetify class can be used to

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/planet_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This component is linked with its planet model and can be accessed as a paramete

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui.planetapi import PlanetView

Expand Down
4 changes: 4 additions & 0 deletions docs/source/widgets/sepal_widget.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Overview

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand Down Expand Up @@ -37,6 +38,7 @@ Hide the component by changing its class.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand Down Expand Up @@ -69,6 +71,7 @@ Show the component by changing its class.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand Down Expand Up @@ -101,6 +104,7 @@ remove the :code:`v_model` of the component and replace it by :code:`None`.

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand Down
2 changes: 2 additions & 0 deletions docs/source/widgets/statebar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ any argument from the original :code:`SystemBar` ipyvuetify class can be used to

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand All @@ -31,6 +32,7 @@ State bar can be stopped using the following code. The :code:`msg` can be change

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/stateicon.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ StateIcon

.. jupyter-execute::
:raises:
:stderr:

import ipyvuetify as v
from traitlets import Unicode
Expand Down
6 changes: 6 additions & 0 deletions docs/source/widgets/tile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Any argument from the original :code:`Card` ipyvuetify class can be used to comp

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand Down Expand Up @@ -41,6 +42,7 @@ Prepare the tile to be used as a nested component in a tile. The elevation will

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand All @@ -66,6 +68,7 @@ Replace the current content of the tile with the provided inputs. it will keep t

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand All @@ -91,6 +94,7 @@ Replace the current title and activate it. If no title is provided, the title is

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand All @@ -116,6 +120,7 @@ Return the current title of the tile

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand All @@ -141,6 +146,7 @@ Display only the widgets that are part of the input_list. the widget_list is the

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw
import ipyvuetify as v
Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/tile_reclassify.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ It inherits from the :code:`SepalWidget` class. Any argument from the original :

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import reclassify as rec

Expand Down
2 changes: 2 additions & 0 deletions docs/source/widgets/tooltip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Remember that, even though the widget is wrapped by the tooltip, the widget meth

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down Expand Up @@ -45,6 +46,7 @@ The external :code:`Tooltip` is a custom widget to provide easy to use tooltip i

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down
1 change: 1 addition & 0 deletions docs/source/widgets/vector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Any argument from the original :code:`Layout` ipyvuetify class can be used to co

.. jupyter-execute::
:raises:
:stderr:

from sepal_ui import sepalwidgets as sw

Expand Down

1 comment on commit 9c319b0

@12rambau
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix #519

Please sign in to comment.