Code Quality test failing on github even though local tests doesn't give any error

111 views
Skip to first unread message

Shishir Kushwaha

unread,
Feb 9, 2024, 4:02:48 PM2/9/24
to sympy
I am getting an error in 
Check for incorrect use of "__slots__" using slotcheck . 
Any Idea why ?

Aaron Meurer

unread,
Feb 9, 2024, 5:03:43 PM2/9/24
to sy...@googlegroups.com
The slotscheck test is run on CI but isn't included in the normal
local tests run. If you want to run it locally you will need to
install slotscheck and run 'slotscheck sympy/'

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/9ca60097-eb28-436e-9c29-79eae93edf83n%40googlegroups.com.

Shishir Kushwaha

unread,
Feb 9, 2024, 5:48:48 PM2/9/24
to sympy
Can you also please tell me why it is failing as well . The errors I get are mostly some warning about deprecation or failing to import some modules but I have made no changes to any of the related files and synced with the upstream repository about an hour ago .

The output I get on running the test locally :

The sympy.utilities.runtests submodule is deprecated. Use sympy.testing.runtests instead.

See https://docs.sympy.org/latest/explanation/active-deprecations.html#deprecated-sympy-utilities-submodules
for details.

This has been deprecated since SymPy version 1.6. It
will be removed in a future version of SymPy.

  return _bootstrap._gcd_import(name[level:], package, level)    
ERROR: Failed to import 'sympy.galgebra'.
ERROR: Failed to import 'sympy.parsing.autolev._antlr.autolevlexer'.
ERROR: Failed to import 'sympy.parsing.autolev._antlr.autolevlistener'.
ERROR: Failed to import 'sympy.parsing.autolev._antlr.autolevparser'.
ERROR: Failed to import 'sympy.parsing.latex._antlr.latexlexer'.  
ERROR: Failed to import 'sympy.parsing.latex._antlr.latexparser'.
ERROR: Failed to import 'sympy.plotting.pygletplot.color_scheme'.
ERROR: Failed to import 'sympy.plotting.pygletplot.managed_window'.
ERROR: Failed to import 'sympy.plotting.pygletplot.plot'.
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_controller'.
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_controller'.  
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_curve'.      
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_mode'.        
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_mode_base'.  
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_modes'.      
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_rotation'.ERROR: Failed to import 'sympy.plotting.pygletplot.plot_surface'.
ERROR: Failed to import 'sympy.plotting.pygletplot.plot_window'.      
ERROR: Failed to import 'sympy.plotting.pygletplot.util'.
Oh no, found some problems!
Scanned 1501 module(s), 1923 class(es).

Shishir Kushwaha

unread,
Feb 9, 2024, 5:51:05 PM2/9/24
to sympy
I am getting the same errors on the master branch as well . Has it got something to do with the dependencies ? I set up my repo again after clearing previous stuff so I might have forgotten something ?

Aaron Meurer

unread,
Feb 12, 2024, 5:06:24 PM2/12/24
to sy...@googlegroups.com
The slotscheck command should be ran like

python -m slotscheck --exclude-modules
"(sympy.parsing.autolev._antlr.*|sympy.parsing.latex._antlr.*|sympy.galgebra|sympy.plotting.pygletplot.*)"
sympy

(see https://github.com/sympy/sympy/blob/680fb21363e1ea685d6fc868d15069d80ac0c97f/.github/workflows/runtests.yml#L47C14-L47C165).
Otherwise it will try to import several submodules which should not be
imported.

Really we should move this to a configuration file so that it will
always work correctly if you just call "slotscheck". See
https://slotscheck.readthedocs.io/en/latest/configuration.html#configuration-file.
This should be a straightforward thing to change if you want to make a
PR.

Aaron Meurer

On Fri, Feb 9, 2024 at 3:51 PM Shishir Kushwaha
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/cf63fea5-46f0-49cc-a0aa-aa9a0b2b9c75n%40googlegroups.com.

Himateju V

unread,
Feb 13, 2024, 1:07:06 AM2/13/24
to sympy
So If I'm not wrong we have to create a new configuration file right?

Shishir Kushwaha

unread,
Feb 13, 2024, 8:20:30 AM2/13/24
to sympy
I have opened a PR which potentially fixes the issue , however the warnign about the deprecated modules remain kindly check it out . Do we need to fix that too by replacing them with correct modules for the required places .

Shishir

Oscar Benjamin

unread,
Feb 18, 2024, 4:24:44 PM2/18/24
to sy...@googlegroups.com
We should just remove slotscheck from CI. It isn't useful enough to
justify any CI maintenance burden.

--
Oscar

On Tue, 13 Feb 2024 at 13:20, Shishir Kushwaha
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/ee405ac7-7466-4a5a-ad43-556e2bf84a64n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages