Skip to content

Commit 6ea09b2

Browse files
PABannierBadr-MOUFADmathurinm
authored
DOC - add Whatsnew section (#75)
Co-authored-by: Badr MOUFAD <[email protected]> Co-authored-by: mathurinm <[email protected]>
1 parent 212a37e commit 6ea09b2

File tree

7 files changed

+70
-5
lines changed

7 files changed

+70
-5
lines changed

doc/api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Penalties
4141
MCPenalty
4242
WeightedL1
4343
WeightedGroupL2
44+
SCAD
45+
BlockSCAD
4446

4547

4648
Datafits

doc/changes/0.1.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _changes_0_1:
2+
3+
Version 0.1 (2022-04-25)
4+
------------------------
5+
6+
- Initial release (initial commit: 2022-04-20)

doc/changes/0.2.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _changes_0_2:
2+
3+
Version 0.2 (in progress)
4+
------------------------
5+
6+
- Accelerated block coordinate descent solver :ref:`GroupBCD <skglm.solvers.GroupBCD>` with working sets for problems with group penalties (PR :gh:`29`, :gh:`28`, and :gh:`26`)
7+
8+
- Proximal Newton solver :ref:`ProxNewton <skglm.solvers.ProxNewton>` with working sets for problems with non-quadratic datafits (PR :gh:`51`)
9+
10+
- :ref:`Huber <skglm.datafits.Huber>` datafit (PR :gh:`14`)
11+
12+
- Added :ref:`SCAD <skglm.penalties.SCAD>` and :ref:`BlockSCAD <skglm.penalties.BlockSCAD>` penalties (PR :gh:`12`)
13+
14+
- Fitting intercept for :ref:`Quadratic <skglm.datafits.Quadratic>`, :ref:`Logistic <skglm.datafits.Logistic>` and :ref:`Huber <skglm.datafits.Huber>` datafits (PR :gh:`55`)
15+
16+
- Added :ref:`GramCD <skglm.solvers.GramCD>`, a Gram-based coordinate descent solver for problems with ``n_features`` :math:`\ll` ``n_samples`` (PR :gh:`59`)
17+
18+
- Transform solvers from functions to classes (PR :gh:`63`)

doc/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
from skglm import __version__ as version
15+
import os
1616
import sys
1717
import warnings
1818
# import os
@@ -21,6 +21,11 @@
2121
from numpydoc import numpydoc, docscrape # noqa
2222
from doc.github_link import make_linkcode_resolve
2323

24+
from skglm import __version__ as version
25+
26+
curdir = os.path.dirname(__file__)
27+
sys.path.append(os.path.abspath(os.path.join(curdir, 'sphinxext')))
28+
2429

2530
# Mathurin: disable agg warnings in doc
2631
warnings.filterwarnings("ignore", category=UserWarning,
@@ -50,8 +55,10 @@
5055
'sphinx.ext.intersphinx',
5156
'sphinx.ext.mathjax',
5257
'sphinx_gallery.gen_gallery',
58+
'sphinx.ext.autosectionlabel',
5359
'numpydoc',
54-
"sphinx.ext.linkcode",
60+
'sphinx.ext.linkcode',
61+
'gh_substitutions', # custom ext, see ./sphinxext/gh_substitutions.py
5562
]
5663

5764
# generate autosummary even if no references

doc/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ To check if everything worked fine, you can do::
4949
and it should not give any error message.
5050

5151

52-
API
53-
---
52+
Release history
53+
---------------
5454

5555
.. toctree::
5656
:maxdepth: 1
5757

58-
api.rst
58+
whats_new.rst

doc/sphinxext/gh_substitutions.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""Provide a convenient way to link to GitHub issues and pull requests.
2+
3+
Adapted from:
4+
https://doughellmann.com/blog/2010/05/09/defining-custom-roles-in-sphinx/
5+
"""
6+
from docutils.nodes import reference
7+
from docutils.parsers.rst.roles import set_classes
8+
9+
10+
def gh_role(name, rawtext, pr_number, lineno, inliner, options={}, content=[]):
11+
"""Link to a GitHub pull request."""
12+
ref = f'https://github.com/scikit-learn-contrib/skglm/pull/{pr_number}'
13+
set_classes(options)
14+
node = reference(rawtext, '#' + pr_number, refuri=ref, **options)
15+
return [node], []
16+
17+
18+
def setup(app):
19+
"""Do setup."""
20+
app.add_role('gh', gh_role)
21+
return

doc/whats_new.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. _whats_new:
2+
3+
What's new
4+
==========
5+
6+
.. currentmodule:: skglm
7+
8+
.. include:: changes/0.2.rst
9+
10+
.. include:: changes/0.1.rst
11+

0 commit comments

Comments
 (0)