Skip to content

Commit

Permalink
fix nx/scipy and error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Sep 7, 2023
1 parent 6a7691e commit 6bd54ef
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 109 deletions.
4 changes: 0 additions & 4 deletions examples/networkx.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ ValueError = [ "networkx.generators.geometric:geographical_threshold_graph",
"networkx.generators.geometric:waxman_graph",
"networkx.algorithms.cycles:_johnson_cycle_search",
]
AssertionError = [ "networkx.algorithms.minors.contraction:quotient_graph",
"networkx.algorithms.smallworld:random_reference",
"networkx.generators.joint_degree_seq:_directed_neighbor_switch",
]
207 changes: 105 additions & 102 deletions examples/scipy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,23 @@ logo = "../scipy_logo.png"
exec = true
submodules = [ "signal","misc"]
exclude = [
# https://github.com/stsewd/tree-sitter-rst/issues/31
"scipy.interpolate._fitpack_py.splprep",
"scipy.sparse._construct._compressed_sparse_stack",
"scipy.sparse._construct._stack_along_minor_axis",
# OTHER.
"scipy.interpolate._fitpack_impl.spalde",
"scipy.interpolate._fitpack_impl:spalde",

"scipy.sparse.csgraph._traversal.breadth_first_tree",
"scipy.sparse.csgraph._traversal.depth_first_tree",
"scipy.sparse.csgraph._traversal:breadth_first_tree",
"scipy.sparse.csgraph._traversal:depth_first_tree",

# Example is incorrect https://github.com/scipy/scipy/issues/15595
"scipy.signal._peak_finding._identify_ridge_lines",
"scipy.stats._continuous_distns.crystalball_gen._pdf",
"scipy.stats._ksstats._kolmogn_PelzGood",
"scipy.stats._discrete_distns.betabinom_gen",
"scipy.sparse.csgraph._min_spanning_tree.minimum_spanning_tree",
"scipy.stats._morestats.wilcoxon",
"scipy.stats._distn_infrastructure.rv_continuous",
"scipy.stats._stats_py.moment",
"scipy.stats._mannwhitneyu.mannwhitneyu",
"scipy.stats._resampling.bootstrap",
"scipy.sparse.linalg._expm_multiply.expm_multiply",
"scipy.signal._peak_finding:_identify_ridge_lines",
"scipy.stats._continuous_distns:crystalball_gen._pdf",
"scipy.stats._ksstats:_kolmogn_PelzGood",
"scipy.stats._discrete_distns:betabinom_gen",
"scipy.stats._morestats:wilcoxon",
"scipy.stats._distn_infrastructure:rv_continuous",
"scipy.stats._stats_py:moment",
"scipy.stats._mannwhitneyu:mannwhitneyu",
"scipy.stats._resampling:bootstrap",
"scipy.sparse.linalg._expm_multiply:expm_multiply",
]
exclude_jedi = [
"scipy.linalg._sketches.clarkson_woodruff_transform",
Expand All @@ -40,20 +35,20 @@ exclude_jedi = [
]

execute_exclude_patterns = [
'scipy._lib._uarray._backend.determine_backend_multi',
'scipy.integrate._quadrature._qmc_quad',
'scipy.interpolate._bspl.evaluate_all_bspl',
'scipy.optimize._root.root',
'scipy.signal._filter_design.normalize',
'scipy.signal._signaltools.filtfilt',
'scipy.stats._axis_nan_policy._broadcast_array_shapes_remove_axis',
'scipy.stats._multivariate.multivariate_normal_frozen.__init__',
'scipy.stats._multivariate.multivariate_t_frozen.__init__',
'scipy.stats._stats_py._ttest_nans',
'scipy.io.matlab._mio5.varmats_from_mat',
'scipy.io.matlab._byteordercodes.to_numpy_code',
'scipy._lib._uarray._backend.determine_backend',
'scipy._lib._uarray._backend.all_of_type',
'scipy._lib._uarray._backend:determine_backend_multi',
'scipy.integrate._quadrature:_qmc_quad',
'scipy.interpolate._bspl:evaluate_all_bspl',
'scipy.optimize._root:root',
'scipy.signal._filter_design:normalize',
'scipy.signal._signaltools:filtfilt',
'scipy.stats._axis_nan_policy:_broadcast_array_shapes_remove_axis',
'scipy.stats._multivariate:multivariate_normal_frozen.__init__',
'scipy.stats._multivariate:multivariate_t_frozen.__init__',
'scipy.stats._stats_py:_ttest_nans',
'scipy.io.matlab._mio5:varmats_from_mat',
'scipy.io.matlab._byteordercodes:to_numpy_code',
'scipy._lib._uarray._backend:determine_backend',
'scipy._lib._uarray._backend:all_of_type',
'scipy._lib._util._nan_allsame',
]
exec_failure = "fallback"
Expand All @@ -71,76 +66,84 @@ ua = 'scipy._lib.uarray'
array = 'numpy:array'
arange = 'numpy:arange'
[global.expected_errors]
IncorrectInternalDocsLen = [
"scipy.interpolate._fitpack_impl.bisplev",
"scipy.interpolate._fitpack_impl.spalde",
"scipy.interpolate._fitpack_py.spalde",
"scipy.linalg._decomp.cdf2rdf",
"scipy.linalg._special_matrices.fiedler",
"scipy.optimize._lsq.common.regularized_lsq_operator",
"scipy.optimize._trustregion_constr.tr_interior_point.BarrierSubproblem.gradient_and_jacobian",
"scipy.optimize._trustregion_constr.tr_interior_point.tr_interior_point",
"scipy.signal._filter_design._ellipdeg",
"scipy.signal._spline.symiirorder1",
"scipy.signal._spline.symiirorder2",
"scipy.sparse._bsr.bsr_matrix.check_format",
]
VisitCitationReferenceNotImplementedError = [
"scipy.optimize._nonlin.anderson",
"scipy.optimize._zeros_py.brenth",
"scipy.optimize._zeros_py.brentq",
"scipy.optimize._lsq.least_squares.least_squares",
"scipy.optimize._lsq.lsq_linear.lsq_linear",
"scipy.optimize._zeros_py.ridder",
"scipy.special._orthogonal",
"scipy.special._orthogonal.roots_chebyc",
"scipy.special._orthogonal.roots_gegenbauer",
"scipy.special._orthogonal.roots_hermite",
"scipy.special._orthogonal.roots_hermitenorm",
"scipy.special._orthogonal.roots_jacobi",
"scipy.special._orthogonal.roots_sh_jacobi",
"scipy.special._orthogonal.roots_laguerre",
"scipy.special._orthogonal.roots_genlaguerre",
"scipy.special._orthogonal.roots_legendre",
"scipy.special._basic.polygamma",
"scipy.special._orthogonal.roots_sh_legendre",
"scipy.special._orthogonal.roots_chebys",
"scipy.special._orthogonal.roots_chebyt",
"scipy.special._orthogonal.roots_chebyu",
"scipy.special._orthogonal.roots_sh_chebyt",
"scipy.special._orthogonal.roots_sh_chebyu",
"scipy.special._basic.zeta",
"scipy.interpolate.interpnd.CloughTocher2DInterpolator",
"scipy.optimize._lsq.dogbox",
"scipy.optimize._lsq.trf",
"scipy.optimize._nonlin.Anderson",
"scipy.special._orthogonal._pbcf",
"scipy.spatial._spherical_voronoi.SphericalVoronoi",
"scipy.spatial._spherical_voronoi.calculate_solid_angles",
"scipy.integrate._ode.ode",
]
"scipy.constants",
"scipy.integrate._ode:ode",
"scipy.interpolate.interpnd:CloughTocher2DInterpolator",
"scipy.optimize._nonlin:anderson",
"scipy.optimize._zeros_py:brenth",
"scipy.optimize._zeros_py:brentq",
"scipy.optimize._lsq.least_squares:least_squares",
"scipy.optimize._lsq.lsq_linear:lsq_linear",
"scipy.optimize._zeros_py:ridder",
"scipy.spatial._spherical_voronoi:SphericalVoronoi",
"scipy.special._orthogonal:roots_chebyc",
"scipy.special._orthogonal:roots_gegenbauer",
"scipy.special._orthogonal:roots_hermite",
"scipy.special._orthogonal:roots_hermitenorm",
"scipy.special._orthogonal:roots_jacobi",
"scipy.special._orthogonal:roots_sh_jacobi",
"scipy.special._orthogonal:roots_laguerre",
"scipy.special._orthogonal:roots_genlaguerre",
"scipy.special._orthogonal:roots_legendre",
"scipy.special._basic:polygamma",
"scipy.special._orthogonal:roots_sh_legendre",
"scipy.special._orthogonal:roots_chebys",
"scipy.special._orthogonal:roots_chebyt",
"scipy.special._orthogonal:roots_chebyu",
"scipy.special._orthogonal:roots_sh_chebyt",
"scipy.special._orthogonal:roots_sh_chebyu",
"scipy.special._basic:zeta",
"scipy.optimize._nonlin:Anderson",
"scipy.spatial._spherical_voronoi:calculate_solid_angles",
"scipy.special._orthogonal:_pbcf",
]
IncorrectInternalDocsLen = [
"scipy.signal._spline:symiirorder1",
"scipy.signal._spline:symiirorder2",
"scipy.interpolate._fitpack_impl:bisplev",
"scipy.interpolate._fitpack_py:spalde",
"scipy.linalg._decomp:cdf2rdf",
"scipy.linalg._special_matrices:fiedler",
"scipy.signal._filter_design:_ellipdeg",
"scipy.stats._ksstats:_kolmogn_PelzGood",
"scipy.optimize._lsq.common:regularized_lsq_operator",
"scipy.optimize._trustregion_constr.tr_interior_point:tr_interior_point",
"scipy.sparse._bsr:_bsr_base.check_format",
"scipy.optimize._trustregion_constr.tr_interior_point:BarrierSubproblem.gradient_and_jacobian",
]
AssertionError = [
"scipy.optimize._linprog_ip._ip_hsd",
"scipy.special._orthogonal._compute_tauk",
]
"scipy.stats._resampling:bootstrap",
"scipy.stats._distn_infrastructure:rv_continuous",
"scipy.io.matlab._mio5",
"scipy.optimize._linprog_ip:_ip_hsd",
"scipy.special._orthogonal:_compute_tauk",
]
ValueError = [
"scipy.stats._stats_py:iqr",
"scipy.stats._mannwhitneyu:mannwhitneyu",
"scipy.stats._stats_py:moment",
"scipy.stats._morestats:wilcoxon",
"scipy.stats._continuous_distns:crystalball_gen._pdf",
]
NumpydocParseError = [
"scipy.optimize._linprog_doc._linprog_highs_doc",
"scipy.optimize._linprog_doc._linprog_highs_ds_doc",
"scipy.optimize._linprog_doc._linprog_highs_ipm_doc",
"scipy.optimize._linprog_doc._linprog_ip_doc",
"scipy.optimize._linprog_doc._linprog_rs_doc",
"scipy.optimize._linprog_doc._linprog_simplex_doc",
"scipy.optimize._linprog_highs._linprog_highs",
"scipy.optimize._linprog_ip._linprog_ip",
"scipy.optimize._linprog_rs._linprog_rs",
"scipy.optimize._linprog_simplex._linprog_simplex",
"scipy.optimize._optimize._minimize_powell",
"scipy.optimize._qap._quadratic_assignment_2opt",
"scipy.optimize._qap._quadratic_assignment_faq",
"scipy.stats._discrete_distns.geom_gen",
"scipy.stats._discrete_distns.planck_gen",
]
SpaceAfterBlockDirectiveError = [
"scipy.optimize._tnc._minimize_tnc",
]

"scipy.optimize._linprog_highs:_linprog_highs",
"scipy.optimize._linprog_doc:_linprog_highs_doc",
"scipy.optimize._linprog_doc:_linprog_highs_ds_doc",
"scipy.optimize._linprog_doc:_linprog_highs_ipm_doc",
"scipy.optimize._linprog_ip:_linprog_ip",
"scipy.optimize._linprog_doc:_linprog_ip_doc",
"scipy.optimize._linprog_rs:_linprog_rs",
"scipy.optimize._linprog_doc:_linprog_rs_doc",
"scipy.optimize._linprog_simplex:_linprog_simplex",
"scipy.optimize._linprog_doc:_linprog_simplex_doc",
"scipy.optimize._optimize:_minimize_powell",
"scipy.optimize._qap:_quadratic_assignment_2opt",
"scipy.optimize._qap:_quadratic_assignment_faq",
"scipy.stats._discrete_distns:betabinom_gen",
"scipy.stats._discrete_distns:geom_gen",
"scipy.stats._discrete_distns:planck_gen",
]
ExampleError1 = [
"scipy.stats._qmc:PoissonDisk",
]
8 changes: 5 additions & 3 deletions papyri/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -2095,9 +2095,11 @@ def collect_api_docs(self, root: str, limit_to: List[str]):
+ tomli_w.dumps(error_collector._errors).replace(",", ", \n")
)
if error_collector._expected_unseen:
self.log.info(
"UNSEEN ERRORS:" + tomli_w.dumps(error_collector._expected_unseen)
)
inverted = defaultdict(lambda: [])
for qa, errs in error_collector._expected_unseen.items():
for err in errs:
inverted[err].append(qa)
self.log.info("UNSEEN ERRORS:" + tomli_w.dumps(inverted))
if failure_collection:
self.log.info(
"The following parsing failed \n%s",
Expand Down

0 comments on commit 6bd54ef

Please sign in to comment.