Skip to content

Commit 9f22a53

Browse files
authored
Fix ploty graphs not displaying in documentation (#461)
1 parent 11edf1b commit 9f22a53

12 files changed

+55
-97
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
docs:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- name: Set up Python 3.9
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: 3.9
1717
- name: Build

INSTALL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,4 @@ git checkout -b <your-branch-name>
5757
make install-develp
5858
```
5959

60-
For more details about how to contribute to the project please visit the [Contributing Guide](
61-
CONTRIBUTING.rst).
60+
For more details about how to contribute to the project please visit the [Contributing Guide](https://github.com/sdv-dev/copulas/blob/main/CONTRIBUTING.rst).

docs/conf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
# Add any Sphinx extension module names here, as strings. They can be
3232
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3333
extensions = [
34-
'm2r',
3534
'nbsphinx',
3635
'sphinx.ext.autodoc',
3736
'sphinx.ext.githubpages',
3837
'sphinx.ext.viewcode',
3938
'sphinx.ext.napoleon',
4039
'sphinx.ext.todo',
4140
'sphinx.ext.coverage',
42-
'sphinx.ext.mathjax'
41+
'sphinx.ext.mathjax',
42+
'myst_parser',
4343
]
4444

4545
# Add any paths that contain templates here, relative to this directory.
@@ -78,7 +78,7 @@
7878
#
7979
# This is also used if you do content translation via gettext catalogs.
8080
# Usually you set "language" from the command line for these cases.
81-
language = None
81+
language = 'en'
8282

8383
# List of patterns, relative to source directory, that match files and
8484
# directories to ignore when looking for source files.
@@ -97,7 +97,6 @@
9797
# a list of builtin themes.
9898
#
9999
html_theme = 'sphinx_rtd_theme'
100-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
101100

102101
# Readthedocs additions
103102
html_context = {
@@ -113,7 +112,7 @@
113112
# documentation.
114113
html_theme_options = {
115114
'collapse_navigation': False,
116-
'display_version': False,
115+
'version_selector': False,
117116
}
118117

119118
# Add any paths that contain custom static files (such as style sheets) here,

docs/history.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../HISTORY.md
1+
.. include:: ../HISTORY.md
2+
:parser: myst_parser.sphinx_

docs/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.. mdinclude:: ../README.md
1+
.. include:: ../README.md
2+
:parser: myst_parser.sphinx_
23
:end-line: 48
34

45
.. toctree::
@@ -21,7 +22,7 @@
2122
:caption: Advanced Usage
2223
:maxdepth: 2
2324

24-
tutorials/04_Syntehtic_Data_for_Machine_Learning
25+
tutorials/04_Synthetic_Data_for_Machine_Learning
2526

2627
.. toctree::
2728
:caption: Resources

docs/install.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../INSTALL.md
1+
.. include:: ../INSTALL.md
2+
:parser: myst_parser.sphinx_

pyproject.toml

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -54,61 +54,59 @@ version = {attr = 'copulas.__version__'}
5454

5555
[project.optional-dependencies]
5656
tutorials = [
57-
'markupsafe<=2.0.1',
58-
"scikit-learn>=0.24;python_version<'3.12'",
59-
"scikit-learn>=1.3.1;python_version>='3.12'",
60-
'jupyter>=1.0.0,<2',
57+
'markupsafe >= 2.0.1',
58+
"scikit-learn >= 0.24;python_version<'3.12'",
59+
"scikit-learn >= 1.3.1;python_version >= '3.12'",
60+
'jupyter >= 1.0.0',
6161
]
6262
test = [
6363
'copulas[tutorials]',
64-
'pytest>=6.2.5,<7',
65-
'pytest-cov>=2.6.0,<3',
66-
'pytest-rerunfailures>=10.3,<15',
67-
'rundoc>=0.4.3,<0.5',
68-
'tomli>=2.0.0,<3',
64+
'pytest >= 6.2.5',
65+
'pytest-cov >= 2.6.0',
66+
'pytest-rerunfailures >= 10.3',
67+
'rundoc >= 0.4.3',
68+
'tomli >= 2.0.0',
6969
]
7070
dev = [
7171
'copulas[tutorials, test]',
7272

7373
# general
74-
'pip>=9.0.1',
75-
'build>=1.0.0,<2',
76-
'bump-my-version>=0.18.3,<1',
77-
'watchdog>=1.0.1,<5',
74+
'pip >= 9.0.1',
75+
'build >= 1.0.0',
76+
'bump-my-version >= 0.18.3',
77+
'watchdog >= 1.0.1',
7878

7979
# docs
80-
'm2r>=0.2.0,<0.3',
81-
'nbsphinx>=0.5.0,<0.7',
82-
'Sphinx>=1.7.1,<3',
83-
'sphinx_rtd_theme>=0.2.4,<0.5',
84-
'sphinxcontrib_applehelp<1.0.8',
85-
'sphinxcontrib-devhelp<1.0.6',
86-
'sphinxcontrib-htmlhelp<2.0.5',
87-
'sphinxcontrib_serializinghtml<1.1.10',
88-
'sphinxcontrib_qthelp<1.0.7',
89-
'alabaster<0.7.13',
90-
91-
# Jinja2>=3 makes the sphinx theme fail
92-
"Jinja2>=2,<3;python_version<'3.12'",
93-
"Jinja2>=2,<4;python_version>='3.12'",
80+
'nbsphinx >= 0.9.7, <0.10',
81+
'Sphinx >= 7.4.7, <7.5',
82+
'sphinx_rtd_theme >= 3.0.2, <3.1',
83+
'sphinxcontrib_applehelp >= 2.0.0, <2.1',
84+
'sphinxcontrib-devhelp >= 2.0.0, <2.1',
85+
'sphinxcontrib-htmlhelp >= 2.1.0, <2.2',
86+
'sphinxcontrib_serializinghtml >= 2.0.0, <2.1',
87+
'sphinxcontrib_qthelp >= 2.0.0, <2.1',
88+
'alabaster >= 0.7.16, <0.8',
89+
'lxml-html-clean >= 0.4.1, <0.5',
90+
'Jinja2 >= 3.1.6, <3.2',
91+
'myst_parser >= 3.0.1, <4.1',
9492

9593
# style check
96-
'ruff>=0.3.2,<1',
94+
'ruff >= 0.3.2, <1',
9795

9896
# distribute on PyPI
99-
'twine>=1.10.0,<4',
100-
'wheel>=0.30.0',
97+
'twine >= 1.10.0, <4',
98+
'wheel >= 0.30.0',
10199

102100
# Advanced testing
103-
'coverage>=4.5.1,<6',
104-
'tox>=2.9.1,<4',
101+
'coverage >= 7.7.1, <7.8',
102+
'tox >= 2.9.1,<4',
105103
'invoke',
106104

107105
# Large scale evaluation
108-
'urllib3>=1.20,<1.26',
109-
'tabulate>=0.8.3,<0.9',
110-
'boto3>=1.7.47,<1.10',
111-
'docutils>=0.10,<0.15'
106+
'urllib3 >= 1.26.20, <2.4',
107+
'tabulate >= 0.9.0, <0.10',
108+
'boto3 >= 1.37.18, <1.38',
109+
'docutils >= 0.21.2, <0.22'
112110
]
113111

114112
[tool.isort]

tutorials/00_Quickstart.ipynb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11290,13 +11290,6 @@
1129011290
"source": [
1129111291
"new_samples = new_copula.sample(num_samples)"
1129211292
]
11293-
},
11294-
{
11295-
"cell_type": "code",
11296-
"execution_count": null,
11297-
"metadata": {},
11298-
"outputs": [],
11299-
"source": []
1130011293
}
1130111294
],
1130211295
"metadata": {
@@ -11315,7 +11308,7 @@
1131511308
"name": "python",
1131611309
"nbconvert_exporter": "python",
1131711310
"pygments_lexer": "ipython3",
11318-
"version": "3.11.5"
11311+
"version": "3.9.20"
1131911312
}
1132011313
},
1132111314
"nbformat": 4,

tutorials/01_Introduction_to_Copulas.ipynb

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@
5959
{
6060
"cell_type": "code",
6161
"execution_count": 2,
62-
"metadata": {
63-
"scrolled": false
64-
},
62+
"metadata": {},
6563
"outputs": [
6664
{
6765
"data": {
@@ -77824,20 +77822,6 @@
7782477822
"\n",
7782577823
"compare_2d(df, synthetic)"
7782677824
]
77827-
},
77828-
{
77829-
"cell_type": "code",
77830-
"execution_count": null,
77831-
"metadata": {},
77832-
"outputs": [],
77833-
"source": []
77834-
},
77835-
{
77836-
"cell_type": "code",
77837-
"execution_count": null,
77838-
"metadata": {},
77839-
"outputs": [],
77840-
"source": []
7784177825
}
7784277826
],
7784377827
"metadata": {
@@ -77856,7 +77840,7 @@
7785677840
"name": "python",
7785777841
"nbconvert_exporter": "python",
7785877842
"pygments_lexer": "ipython3",
77859-
"version": "3.11.5"
77843+
"version": "3.9.20"
7786077844
}
7786177845
},
7786277846
"nbformat": 4,

tutorials/02_Univariate_Distributions.ipynb

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14233,9 +14233,7 @@
1423314233
{
1423414234
"cell_type": "code",
1423514235
"execution_count": 24,
14236-
"metadata": {
14237-
"scrolled": false
14238-
},
14236+
"metadata": {},
1423914237
"outputs": [],
1424014238
"source": [
1424114239
"synth_data = pd.DataFrame()\n",
@@ -14386,9 +14384,7 @@
1438614384
{
1438714385
"cell_type": "code",
1438814386
"execution_count": 27,
14389-
"metadata": {
14390-
"scrolled": false
14391-
},
14387+
"metadata": {},
1439214388
"outputs": [
1439314389
{
1439414390
"data": {
@@ -35147,13 +35143,6 @@
3514735143
"\n",
3514835144
"univariate.to_dict()"
3514935145
]
35150-
},
35151-
{
35152-
"cell_type": "code",
35153-
"execution_count": null,
35154-
"metadata": {},
35155-
"outputs": [],
35156-
"source": []
3515735146
}
3515835147
],
3515935148
"metadata": {
@@ -35172,7 +35161,7 @@
3517235161
"name": "python",
3517335162
"nbconvert_exporter": "python",
3517435163
"pygments_lexer": "ipython3",
35175-
"version": "3.11.5"
35164+
"version": "3.9.20"
3517635165
}
3517735166
},
3517835167
"nbformat": 4,

0 commit comments

Comments
 (0)