Skip to content

Commit

Permalink
Change docstring style to numpydocs (#901)
Browse files Browse the repository at this point in the history
* Update half the docstrings to numpy style

* Fix minor change bug

* Introduce numpy style

* Add new api reference style

* Remove older style @p references

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Update src/pyscipopt/scip.pxi

* Apply suggestions from code review

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update some comments from Joao

* Update src/pyscipopt/scip.pxi

Co-authored-by: João Dionísio <[email protected]>

* Update src/pyscipopt/scip.pxi

---------

Co-authored-by: João Dionísio <[email protected]>
  • Loading branch information
Opt-Mucca and Joao-Dionisio authored Sep 23, 2024
1 parent a061b76 commit 729420c
Show file tree
Hide file tree
Showing 11 changed files with 4,767 additions and 1,159 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Fixed too strict getObjVal, getVal check
### Changed
- Changed createSol to now have an option of initialising at the current LP solution
- Unified documentation style of scip.pxi to numpydocs
### Removed

## 5.1.1 - 2024-06-22
Expand Down
83 changes: 45 additions & 38 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,79 +1,86 @@
#############
API reference
API Reference
#############

This page provides an auto-generated summary of PySCIPOpt's API.

.. automodule:: pyscipopt

SCIP Model
==========

.. autosummary::
:toctree: _autosummary
:recursive:
This is the main class of PySCIPOpt. Most functionality is accessible through functions
of this class. All functions that require the SCIP object belong to this class.

.. toctree::
:maxdepth: 1

pyscipopt.Model
api/model

SCIP Constraint
===============

.. autosummary::
:toctree: _autosummary
:recursive:
This class wraps a SCIP constraint object. It contains functions that can retrieve basic information
that is entirely contained within the constraint object.

.. toctree::
:maxdepth: 1

pyscipopt.Constraint
api/constraint

SCIP Variable
=============

.. autosummary::
:toctree: _autosummary
:recursive:
This class wraps a SCIP variable object. It contains functions that can retrieve basic information
that is entirely contained within the variable object.

pyscipopt.Variable
.. toctree::
:maxdepth: 1

api/variable

SCIP Row
========

.. autosummary::
:toctree: _autosummary
:recursive:
This class wraps a SCIP row object. It contains functions that can retrieve basic information
that is entirely contained within the row object.

.. toctree::
:maxdepth: 1

pyscipopt.scip.Row
api/row

SCIP Column
===========

.. autosummary::
:toctree: _autosummary
:recursive:
This class wraps a SCIP column object. It contains functions that can retrieve basic information
that is entirely contained within the column object.

.. toctree::
:maxdepth: 1

pyscipopt.scip.Column
api/column

SCIP Node
=========

.. autosummary::
:toctree: _autosummary
:recursive:
This class wraps a SCIP node object. It contains functions that can retrieve basic information
that is entirely contained within the node object.

pyscipopt.scip.Node
.. toctree::
:maxdepth: 1

SCIP Solution
=============

.. autosummary::
:toctree: _autosummary
:recursive:

pyscipopt.scip.Solution
api/node

SCIP Event
===========
==========

This class wraps a SCIP event object. It contains functions that can retrieve basic information
that is entirely contained within the event object.

.. autosummary::
:toctree: _autosummary
:recursive:
.. toctree::
:maxdepth: 1

pyscipopt.scip.Event
api/event


6 changes: 6 additions & 0 deletions docs/api/column.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
##########
Column API
##########

.. autoclass:: pyscipopt.scip.Column
:members:
6 changes: 6 additions & 0 deletions docs/api/constraint.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
##############
Constraint API
##############

.. autoclass:: pyscipopt.Constraint
:members:
6 changes: 6 additions & 0 deletions docs/api/event.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
##########
Event API
##########

.. autoclass:: pyscipopt.scip.Event
:members:
6 changes: 6 additions & 0 deletions docs/api/model.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#########
Model API
#########

.. autoclass:: pyscipopt.Model
:members:
6 changes: 6 additions & 0 deletions docs/api/node.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
########
Node API
########

.. autoclass:: pyscipopt.scip.Node
:members:
6 changes: 6 additions & 0 deletions docs/api/row.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#######
Row API
#######

.. autoclass:: pyscipopt.scip.Row
:members:
6 changes: 6 additions & 0 deletions docs/api/variable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
############
Variable API
############

.. autoclass:: pyscipopt.Variable
:members:
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

autosummary_generate = True
autoclass_content = "class"
autosummary_generate = False
napoleon_numpy_docstring = True
napoleon_google_docstring = False

pygments_style = "sphinx"

Expand Down
Loading

0 comments on commit 729420c

Please sign in to comment.