Skip to content

Commit 43bff8e

Browse files
sdpythonxadupre
andauthored
Rename master into main (#38)
* master to main * rdev * setup * ci * req * opy * rst * rst * rst * rst * setup * setup --------- Co-authored-by: Xavier Dupre <[email protected]>
1 parent 30b0be7 commit 43bff8e

File tree

7 files changed

+59
-19
lines changed

7 files changed

+59
-19
lines changed

.github/workflows/documentation.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,23 @@ jobs:
3333
with:
3434
python-version: '3.11'
3535

36+
- name: Install pandoc
37+
run: sudo apt-get install -y pandoc
38+
3639
- name: Install requirements
3740
run: python -m pip install -r requirements.txt
3841

39-
- name: Install requirements-dev.txt
40-
run: python -m pip install -r requirements-dev.txt
41-
42-
- name: Install
43-
run: python -m pip install -e .
42+
#- name: Install
43+
# run: python -m pip install -e .
44+
- name: Copy license
45+
run: cp LICENSE* ./_doc/sphinxdoc/source
46+
- name: Copy readme
47+
run: cp README* ./_doc/sphinxdoc/source
4448

49+
#- name: Documentation
50+
# run: python -m sphinx ./_doc/sphinxdoc/source ./dist/html
4551
- name: Documentation
46-
run: python -m sphinx ./_doc ./dist/html
52+
run: python setup.py build_sphinx
4753

4854
- uses: actions/upload-artifact@v3
4955
with:

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
.. image:: https://travis-ci.com/sdpython/mlstatpy.svg?branch=master
2+
.. image:: https://travis-ci.com/sdpython/mlstatpy.svg?branch=main
33
:target: https://app.travis-ci.com/github/sdpython/mlstatpy
44
:alt: Build status
55

66
.. image:: https://ci.appveyor.com/api/projects/status/5env33qptorgshaq?svg=true
77
:target: https://ci.appveyor.com/project/sdpython/mlstatpy
88
:alt: Build Status Windows
99

10-
.. image:: https://circleci.com/gh/sdpython/mlstatpy/tree/master.svg?style=svg
11-
:target: https://circleci.com/gh/sdpython/mlstatpy/tree/master
10+
.. image:: https://circleci.com/gh/sdpython/mlstatpy/tree/main.svg?style=svg
11+
:target: https://circleci.com/gh/sdpython/mlstatpy/tree/main
1212

1313
.. image:: https://badge.fury.io/py/mlstatpy.svg
1414
:target: https://pypi.org/project/mlstatpy/
@@ -17,8 +17,8 @@
1717
:alt: MIT License
1818
:target: http://opensource.org/licenses/MIT
1919

20-
.. image:: https://codecov.io/github/sdpython/mlstatpy/coverage.svg?branch=master
21-
:target: https://codecov.io/github/sdpython/mlstatpy?branch=master
20+
.. image:: https://codecov.io/github/sdpython/mlstatpy/coverage.svg?branch=main
21+
:target: https://codecov.io/github/sdpython/mlstatpy?branch=main
2222

2323
.. image:: http://img.shields.io/github/issues/sdpython/mlstatpy.png
2424
:alt: GitHub Issues

_doc/sphinxdoc/source/c_algo/gest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Explications
5353
============
5454

5555
La présentation
56-
`Détection des images dans les images digitales <https://github.com/sdpython/mlstatpy/blob/master/_todo/segment_detection/presentation.pdf>`_
56+
`Détection des images dans les images digitales <https://github.com/sdpython/mlstatpy/blob/main/_todo/segment_detection/presentation.pdf>`_
5757
détaille le principe de l'algorithme. L'idée de l'algorithme est assez
5858
proche de la `transformée de Hough <https://fr.wikipedia.org/wiki/Transform%C3%A9e_de_Hough>`_.
5959
Celle-ci est implémentée dans le module

_doc/sphinxdoc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@
120120
"PiecewiseTreeRegressor": "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/mlinsights/mlmodel/"
121121
"piecewise_tree_regression.html#mlinsights.mlmodel.piecewise_tree_regression.PiecewiseTreeRegressor",
122122
"Predictable t-SNE": "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/notebooks/predictable_tsne.html",
123+
"QuantileLinearRegression": "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/mlinsights/mlmodel/quantile_regression.html#mlinsights.mlmodel.quantile_regression.QuantileLinearRegression",
123124
"R-tree": "https://en.wikipedia.org/wiki/R-tree",
124125
"R* tree": "https://en.wikipedia.org/wiki/R*_tree",
125126
"Regression with confidence interval": "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/notebooks/regression_confidence_interval.html",

_doc/sphinxdoc/source/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ Xavier Dupré
3838

3939
.. only:: html
4040

41-
.. image:: https://travis-ci.com/sdpython/mlstatpy.svg?branch=master
41+
.. image:: https://travis-ci.com/sdpython/mlstatpy.svg?branch=main
4242
:target: https://app.travis-ci.com/github/sdpython/mlstatpy
4343
:alt: Build status
4444

4545
.. image:: https://ci.appveyor.com/api/projects/status/5env33qptorgshaq?svg=true
4646
:target: https://ci.appveyor.com/project/sdpython/mlstatpy
4747
:alt: Build Status Windows
4848

49-
.. image:: https://circleci.com/gh/sdpython/mlstatpy/tree/master.svg?style=svg
50-
:target: https://circleci.com/gh/sdpython/mlstatpy/tree/master
49+
.. image:: https://circleci.com/gh/sdpython/mlstatpy/tree/main.svg?style=svg
50+
:target: https://circleci.com/gh/sdpython/mlstatpy/tree/main
5151

5252
.. image:: https://badge.fury.io/py/mlstatpy.svg
5353
:target: https://pypi.org/project/mlstatpy/
@@ -56,8 +56,8 @@ Xavier Dupré
5656
:alt: MIT License
5757
:target: http://opensource.org/licenses/MIT
5858

59-
.. image:: https://codecov.io/github/sdpython/mlstatpy/coverage.svg?branch=master
60-
:target: https://codecov.io/github/sdpython/mlstatpy?branch=master
59+
.. image:: https://codecov.io/github/sdpython/mlstatpy/coverage.svg?branch=main
60+
:target: https://codecov.io/github/sdpython/mlstatpy?branch=main
6161

6262
.. image:: http://img.shields.io/github/issues/sdpython/mlstatpy.png
6363
:alt: GitHub Issues

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ snakeviz
4040
scikit-learn>=1.1
4141
git+https://github.com/onnx/sklearn-onnx.git
4242
sphinx
43-
sphinx-bootstrap-theme
43+
sphinx_gallery
4444
sphinxcontrib.imagesvg
4545
stack_data
4646
statsmodels

setup.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
from setuptools import find_packages, setup
55
from pyquicksetup import read_version, read_readme, default_cmdclass
6+
from pyquicksetup.pyquick import _SetupCommand
67

78
#########
89
# settings
@@ -37,6 +38,38 @@
3738
package_data = {}
3839

3940

41+
class SetupCommandSphinx(_SetupCommand):
42+
description = "Builds documentation."
43+
44+
user_options = [
45+
("layout=", None, "format generation, default is html,rst."),
46+
(
47+
"nbformats=",
48+
None,
49+
"format generation, default is ipynb,slides,html,python,rst,github",
50+
),
51+
]
52+
53+
def initialize_options(self):
54+
self.layout = "html,rst"
55+
self.nbformats = "ipynb,html,python,rst,github"
56+
57+
def finalize_options(self):
58+
pass
59+
60+
def run(self):
61+
from pyquickhelper.pycode import process_standard_options_for_setup
62+
63+
parameters = self.get_parameters()
64+
parameters["argv"] = ["build_sphinx"]
65+
parameters["layout"] = self.layout.split(",")
66+
parameters["nbformats"] = self.nbformats.split(",")
67+
process_standard_options_for_setup(**parameters)
68+
69+
70+
defcla = default_cmdclass().copy()
71+
defcla["build_sphinx"] = SetupCommandSphinx
72+
4073
setup(
4174
name=project_var_name,
4275
version=read_version(__file__, project_var_name),
@@ -47,7 +80,7 @@
4780
download_url=f"https://github.com/sdpython/{project_var_name}/",
4881
description=DESCRIPTION,
4982
long_description=read_readme(__file__),
50-
cmdclass=default_cmdclass(),
83+
cmdclass=defcla,
5184
keywords=KEYWORDS,
5285
classifiers=CLASSIFIERS,
5386
packages=packages,

0 commit comments

Comments
 (0)