Skip to content

Commit

Permalink
Merge pull request #287 from Carreau/misc-c
Browse files Browse the repository at this point in the history
Misc cleanups
  • Loading branch information
Carreau authored Sep 22, 2023
2 parents 93fb951 + cf2f9ab commit 05f5461
Show file tree
Hide file tree
Showing 11 changed files with 162 additions and 238 deletions.
14 changes: 0 additions & 14 deletions examples/matplotlib.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,11 @@ VisitSubstitutionDefinitionNotImplementedError = [
]
IncorrectInternalDocsLen = [
"matplotlib.pyplot:rc",
"matplotlib.axes._base:_process_plot_var_args",
"matplotlib.dates:ConciseDateFormatter",
"matplotlib.font_manager:win32FontDirectory",
"matplotlib.transforms:Affine2D.__init__",
"matplotlib.transforms:Affine2D.get_matrix",
"matplotlib.transforms:Affine2D.set_matrix",
"matplotlib.figure:FigureBase._process_projection_requirements",
"matplotlib.transforms:Transform.__sub__",
"matplotlib.patches:ConnectionStyle._Base",
"matplotlib.tri.triinterpolate:_safe_inv22_vectorized",
"matplotlib.transforms:Affine2D.from_values",
"matplotlib.ticker:LogLocator.__init__",
"matplotlib.backend_bases:FigureCanvasBase._switch_canvas_and_return_print_method",
]
ValueError = [
"matplotlib.image:thumbnail",
Expand All @@ -123,12 +115,6 @@ ValueError = [
"matplotlib.spines:Spine.set_bounds",
"matplotlib.patches:FancyArrowPatch.set_connectionstyle",
]
SpaceAfterBlockDirectiveError = [
"matplotlib.figure.FigureBase.subplot_mosaic",
"matplotlib.image:imsave",
"matplotlib.pyplot:imsave",
"matplotlib.ft2font:FT2Font"
]
[global.implied_imports]
_api = 'matplotlib._api'

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",
]
87 changes: 1 addition & 86 deletions examples/pandas.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,95 +4,10 @@ logo = 'logo_pandas.png'
exec_failure = "fallback"
submodules = []
exclude = [
# "AssertionError"
"pandas._libs.properties.CachedProperty",
"pandas._config.config.CallableDynamicDoc",
"pandas._libs.index.BaseMultiIndexCodesEngine",
"pandas._libs.properties.AxisProperty",
# "ErrorHelper1-<class 'papyri.errors.SpaceAfterBlockDirectiveError'>
"pandas.core.algorithms.factorize",
"pandas.core.base.IndexOpsMixin.factorize",
# "ErrorNoExec-<class 'AssertionError'>
"pandas._libs.index.BaseMultiIndexCodesEngine",
# "ErrorNoExec-<class 'ValueError'>
"pandas.core.accessor.register_dataframe_accessor",
"pandas.core.accessor.register_index_accessor",
"pandas.core.accessor.register_series_accessor",
"pandas.core.accessor._register_accessor",
"pandas.core.arrays.base.ExtensionArray.take",
# "ErrorNoExec-<class 'papyri.errors.VisitTargetNotImplementedError'>
"pandas.plotting._core.PlotAccessor.kde",
# "ExecError-<class 'AssertionError'>
"pandas._libs.index.BaseMultiIndexCodesEngine",
# "ExecError-<class 'ValueError'>
"pandas.core.accessor.register_dataframe_accessor",
"pandas.core.accessor.register_index_accessor",
"pandas.core.accessor.register_series_accessor",
"pandas.core.accessor._register_accessor",
"pandas.core.arrays.base.ExtensionArray.take",
# "ExecError-<class 'papyri.errors.VisitTargetNotImplementedError'>
"pandas.plotting._core.PlotAccessor.kde",
# "NumpydocError-<class 'AssertionError'>
"pandas._libs.properties.CachedProperty",
"pandas._config.config.CallableDynamicDoc",
"pandas._libs.properties.AxisProperty",
# "NumpydocError-<class 'ValueError'>
"pandas.io.pytables.Table",
# "NumpydocError-<class 'numpydoc.docscrape.ParseError'>
"pandas.core.arraylike.array_ufunc",
"pandas.io.formats.info.BaseInfo.render",
"pandas.core.generic.NDFrame.set_axis",
"pandas.core.generic.NDFrame.replace",
"pandas.core.generic.NDFrame.isna",
"pandas.core.generic.NDFrame.isnull",
"pandas.core.generic.NDFrame.notna",
"pandas.core.generic.NDFrame.notnull",
# "ParseDesc-<class 'IndexError'>
"pandas._libs.algos.is_monotonic",
"pandas._libs.interval.intervals_to_interval_bounds",
"pandas.core.algorithms.duplicated",
"pandas._libs.tslibs.offsets.shift_month",
"pandas.core.dtypes.cast.astype_array_safe",
"pandas.core.window.expanding.Expanding.apply",
"pandas.core.window.expanding.Expanding.apply",
"pandas.core.window.expanding.Expanding.sum",
"pandas.core.window.expanding.Expanding.max",
"pandas.core.window.expanding.Expanding.min",
"pandas.core.window.expanding.Expanding.mean",
"pandas.core.window.expanding.Expanding.median",
"pandas.core.window.ewm.ExponentialMovingWindow.mean",
"pandas.core.window.rolling.Rolling.apply",
"pandas.core.window.rolling.Rolling.apply",
"pandas.core.window.rolling.Rolling.sum",
"pandas.core.window.rolling.Rolling.max",
"pandas.core.window.rolling.Rolling.min",
"pandas.core.window.rolling.Rolling.mean",
"pandas.core.window.rolling.Rolling.median",
"pandas.core.groupby.generic.DataFrameGroupBy.aggregate",
"pandas.core.groupby.generic.DataFrameGroupBy.transform",
"pandas.core.groupby.generic.SeriesGroupBy.aggregate",
"pandas.core.groupby.generic.SeriesGroupBy.transform",
"pandas.core.groupby.grouper.Grouping",
"pandas.core.internals.blocks.Block.astype",
"pandas.core.internals.blocks.Block.where",
"pandas.io.parsers.base_parser._get_na_values",
"pandas.core.reshape.melt.lreshape",
# "VisitTargetNotImplementedError
"pandas.plotting._core.PlotAccessor.kde",
"pandas.io.gbq.read_gbq",
"pandas.core.frame.DataFrame.to_gbq",
"pandas.core.indexes.base.Index.drop_duplicates",
"pandas.plotting._core.hist_frame",
# "ExecError-<class 'ValueError'>": [
"pandas._testing._io.network",
# "np.bool_" is seen as a reference
"pandas._libs.lib.is_bool_list",
# Imbalanced backticks
"pandas.core.common.pipe"
]
[pandas.expected_errors]
ValueError = [
"pandas.io.gbq:read_gbq", gen.py:2041
"pandas.io.gbq:read_gbq",
"pandas.io.pickle:to_pickle",
"pandas.core.frame:DataFrame.to_gbq",
"pandas.core.generic:NDFrame.to_pickle",
Expand Down
210 changes: 108 additions & 102 deletions examples/scipy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ 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",

# contain ascii diagram
"scipy.stats._continuous_distns:crystalball_gen._pdf"
]
exclude_jedi = [
"scipy.linalg._sketches.clarkson_woodruff_transform",
Expand All @@ -40,20 +38,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 +69,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",
]
Loading

0 comments on commit 05f5461

Please sign in to comment.