Support for schemdraw.logic.logic Module in Sage

49 views
Skip to first unread message

Zunaid Ahmed

unread,
Sep 27, 2024, 5:07:55 PM9/27/24
to sage-support
I am currently working on an open-source discrete mathematics book aimed at helping students understand fundamental concepts through practical examples.  

One of the key areas I focus on is digital logic. To enhance the learning experience, I would like to include visual representations of logic gates using the schemdraw.logic.logic module.  

I am reaching out to ask if it would be possible to integrate support for the schemdraw.logic.logic module within Sage.

Zunaid

Nils Bruin

unread,
Sep 27, 2024, 5:46:46 PM9/27/24
to sage-support
Have you tried importing and using the module in Sage? Sage is ultimately just a python library, with a bit of a modified shell to do some preprocessing on the input to provide some conveniences for mathematics. I would expect this module to just work.

If you're finding that there is a nontrivial amount of code that is convenient for exchanging data between schemdraw's data structures and sage's data structures, the first step would probably be to just maintain that as your own github repository. Once it stabilizes a bit you could revisit how big of an audience there is for that integration and if it makes sense to ship it with sagemath proper. For that we'd basically need schemdraw.logic.logic to become a dependency of sage, so that would be quite a high bar to meet. But it's very likely you don't need too much magic and that using the module is just a "pip install schemdraw.logic.logic" away from being usable in sage already, without any changes.

Henri Girard

unread,
Sep 27, 2024, 7:14:51 PM9/27/24
to sage-s...@googlegroups.com

I tried in sage 10.4 arduino uno really great !

I installed it with github and sage -pip install ...

This is a good way to avoid the new error message with pip , this way no problem !

thanks

best

Henri

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/15fe19e7-3b6d-4f03-b1e0-4152888e119bn%40googlegroups.com.

Zunaid Ahmed

unread,
Sep 28, 2024, 5:49:09 AM9/28/24
to sage-support
Yes, apparently I am getting time out errors

[33mWARNING: The directory '/home/sc_work/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. [0m [33m [0m [31mERROR: Could not find a version that satisfies the requirement schemdraw.logic.logic (from versions: none) [0m [31m [0m [31mERROR: No matching distribution found for schemdraw.logic.logic [0m [31m [0m [1m[ [0m [34;49mnotice [0m [1;39;49m] [0m [39;49m A new release of pip is available: [0m [31;49m24.1.2 [0m [39;49m -> [0m [32;49m24.2 [0m [1m[ [0m [34;49mnotice [0m [1;39;49m] [0m [39;49m To update, run: [0m [32;49mpip install --upgrade pip [0m Note: you may need to restart the kernel to use updated packages.

not really sure why is this happening
Reply all
Reply to author
Forward
0 new messages