switch from pdoc3 to pdoc
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -21,10 +21,41 @@ java-doc: java
|
||||
|
||||
.PHONY: python-doc # Create python documentation.
|
||||
python-doc:
|
||||
bash -c "command -v pdoc3"
|
||||
$(SET_PYTHONPATH) pdoc3 --html --force --template-dir tools/doc/templates -o docs/python/ortools/sat/python/ ortools/sat/python/cp_model.py
|
||||
$(SET_PYTHONPATH) pdoc3 --html --force --template-dir tools/doc/templates -o docs/python/ortools/util/ ortools/gen/ortools/util/sorted_interval_list.py
|
||||
$(SET_PYTHONPATH) pdoc3 --html --force --template-dir tools/doc/templates -o docs/python/ortools/linear_solver ortools/gen/ortools/linear_solver/pywraplp.py
|
||||
$(SET_PYTHONPATH) pdoc3 --html --force --template-dir tools/doc/templates -o docs/python/ortools/constraint_solver ortools/gen/ortools/constraint_solver/pywrapcp.py
|
||||
$(SET_PYTHONPATH) pdoc3 --html --force --template-dir tools/doc/templates -o docs/python/ortools/algorithms ortools/gen/ortools/algorithms/pywrapknapsack_solver.py
|
||||
$(SET_PYTHONPATH) pdoc3 --html --force --template-dir tools/doc/templates -o docs/python/ortools/graph ortools/gen/ortools/graph/pywrapgraph.py
|
||||
bash -c "command -v pdoc"
|
||||
$(SET_PYTHONPATH) pdoc \
|
||||
--logo https://developers.google.com/optimization/images/orLogo.png \
|
||||
-o docs/python/ \
|
||||
--no-search -d google \
|
||||
--footer-text "OR-Tools ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}" \
|
||||
ortools/sat/python/cp_model.py
|
||||
$(SET_PYTHONPATH) pdoc \
|
||||
--logo https://developers.google.com/optimization/images/orLogo.png \
|
||||
-o docs/python/ortools/util/ \
|
||||
--no-search -d google \
|
||||
--footer-text "OR-Tools ${ORTOOLS_MAJOR}.${ORTOOLS_MINOR}" \
|
||||
--footer-text "OR-Tools ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}" \
|
||||
ortools/gen/ortools/util/sorted_interval_list.py
|
||||
$(SET_PYTHONPATH) pdoc \
|
||||
--logo https://developers.google.com/optimization/images/orLogo.png \
|
||||
-o docs/python/ortools/linear_solver/ \
|
||||
--no-search -d google \
|
||||
--footer-text "OR-Tools ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}" \
|
||||
ortools/gen/ortools/linear_solver/pywraplp.py
|
||||
$(SET_PYTHONPATH) pdoc \
|
||||
--logo https://developers.google.com/optimization/images/orLogo.png \
|
||||
-o docs/python/ortools/constraint_solver/ \
|
||||
--no-search -d google \
|
||||
--footer-text "OR-Tools ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}" \
|
||||
ortools/gen/ortools/constraint_solver/pywrapcp.py
|
||||
$(SET_PYTHONPATH) pdoc \
|
||||
--logo https://developers.google.com/optimization/images/orLogo.png \
|
||||
-o docs/python/ortools/algorithms/ \
|
||||
--no-search -d google \
|
||||
--footer-text "OR-Tools ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}" \
|
||||
ortools/gen/ortools/algorithms/pywrapknapsack_solver.py
|
||||
$(SET_PYTHONPATH) pdoc \
|
||||
--logo https://developers.google.com/optimization/images/orLogo.png \
|
||||
-o docs/python/ortools/graph/ \
|
||||
--no-search -d google \
|
||||
--footer-text "OR-Tools ${OR_TOOLS_MAJOR}.${OR_TOOLS_MINOR}" \
|
||||
ortools/gen/ortools/graph/pywrapgraph.py
|
||||
|
||||
@@ -63,22 +63,6 @@ from ortools.linear_solver.linear_solver_natural_api import SumArray
|
||||
from ortools.linear_solver.linear_solver_natural_api import SumCst
|
||||
from ortools.linear_solver.linear_solver_natural_api import LinearConstraint
|
||||
from ortools.linear_solver.linear_solver_natural_api import VariableExpr
|
||||
|
||||
# Remove the documentation of some functions.
|
||||
# See https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-
|
||||
__pdoc__ = {}
|
||||
__pdoc__['Solver_infinity'] = False
|
||||
__pdoc__['Solver_Infinity'] = False
|
||||
__pdoc__['Solver_SolveWithProto'] = False
|
||||
__pdoc__['Solver_SupportsProblemType'] = False
|
||||
__pdoc__['setup_variable_operator'] = False
|
||||
__pdoc__['Constraint.thisown'] = False
|
||||
__pdoc__['Constraint.thisown'] = False
|
||||
__pdoc__['MPSolverParameters.thisown'] = False
|
||||
__pdoc__['ModelExportOptions.thisown'] = False
|
||||
__pdoc__['Objective.thisown'] = False
|
||||
__pdoc__['Solver.thisown'] = False
|
||||
__pdoc__['Variable.thisown'] = False
|
||||
%} // %pythoncode
|
||||
|
||||
%extend operations_research::MPVariable {
|
||||
|
||||
@@ -58,15 +58,6 @@ from ortools.util import sorted_interval_list
|
||||
|
||||
Domain = sorted_interval_list.Domain
|
||||
|
||||
# Documentation cleaning.
|
||||
# Remove the documentation of some functions.
|
||||
# See https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-
|
||||
__pdoc__ = {}
|
||||
__pdoc__['DisplayBounds'] = False
|
||||
__pdoc__['EvaluateLinearExpr'] = False
|
||||
__pdoc__['EvaluateBooleanExpression'] = False
|
||||
__pdoc__['ShortName'] = False
|
||||
|
||||
# The classes below allow linear expressions to be expressed naturally with the
|
||||
# usual arithmetic operators +-*/ and with constant numbers, which makes the
|
||||
# python API very intuitive. See ../samples/*.py for examples.
|
||||
@@ -1207,8 +1198,8 @@ class CpModel(object):
|
||||
sum(demands[i] if times[i] <= t) in [min_level, max_level]
|
||||
|
||||
Args:
|
||||
times: A list of integer variables which specify the time of the
|
||||
filling or emptying the reservoir.
|
||||
times: A list of integer variables which specify the time of the filling
|
||||
or emptying the reservoir.
|
||||
demands: A list of integer values that specifies the amount of the
|
||||
emptying or filling.
|
||||
min_level: At any time, the level of the reservoir must be greater or
|
||||
@@ -1267,8 +1258,8 @@ class CpModel(object):
|
||||
actions are actually performed.
|
||||
|
||||
Args:
|
||||
times: A list of integer variables which specify the time of the
|
||||
filling or emptying the reservoir.
|
||||
times: A list of integer variables which specify the time of the filling
|
||||
or emptying the reservoir.
|
||||
demands: A list of integer values that specifies the amount of the
|
||||
emptying or filling.
|
||||
actives: a list of boolean variables. They indicates if the
|
||||
@@ -1420,7 +1411,9 @@ class CpModel(object):
|
||||
|
||||
def AddProdEquality(self, target, variables):
|
||||
"""Deprecated, use AddMultiplicationEquality."""
|
||||
warnings.warn("AddProdEquality is deprecated; use AddMultiplicationEquality.", DeprecationWarning)
|
||||
warnings.warn(
|
||||
'AddProdEquality is deprecated; use' + 'AddMultiplicationEquality.',
|
||||
DeprecationWarning)
|
||||
return self.AddMultiplicationEquality(target, variables)
|
||||
|
||||
# Scheduling support
|
||||
@@ -1435,11 +1428,10 @@ class CpModel(object):
|
||||
|
||||
Args:
|
||||
start: The start of the interval. It can be an affine or constant
|
||||
expression.
|
||||
expression.
|
||||
size: The size of the interval. It can be an affine or constant
|
||||
expression.
|
||||
end: The end of the interval. It can be an affine or constant
|
||||
expression.
|
||||
expression.
|
||||
end: The end of the interval. It can be an affine or constant expression.
|
||||
name: The name of the interval variable.
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -22,17 +22,6 @@
|
||||
#include "ortools/util/sorted_interval_list.h"
|
||||
%}
|
||||
|
||||
%pythonbegin %{
|
||||
# Remove the documentation of some functions.
|
||||
# See https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-
|
||||
__pdoc__ = {}
|
||||
__pdoc__['Domain_AllValues'] = False
|
||||
__pdoc__['Domain_FromFlatIntervals'] = False
|
||||
__pdoc__['Domain_FromIntervals'] = False
|
||||
__pdoc__['Domain_FromValues'] = False
|
||||
__pdoc__['Domain.thisown'] = False
|
||||
%}
|
||||
|
||||
%ignoreall
|
||||
|
||||
%unignore operations_research;
|
||||
|
||||
Reference in New Issue
Block a user