Opened 23 months ago
Last modified 13 months ago
#28838 closed defect
Resurrect "sage sws2rst" via a pipinstallable package sage_sws2rst — at Version 28
Reported by:  tmonteil  Owned by:  

Priority:  critical  Milestone:  sage9.2 
Component:  python3  Keywords:  
Cc:  vbraun, dimpase, kcrisman, jhpalmieri  Merged in:  
Authors:  Reviewers:  Dima Pasechnik  
Report Upstream:  N/A  Work issues:  
Branch:  u/mkoeppe/28838 (Commits, GitHub, GitLab)  Commit:  a05748b54be032ce66e25462ff297b2af7f80047 
Dependencies:  Stopgaps: 
Description (last modified by )
An important feature is to still be able to handle old .sws
worksheets because a lot of pedagogical material was written on that format.
With the removal of sagenb, also sws2rst
disappeared, see #30076 and related tickets.
We extract and translate the required material from sagenb
to a new optional package sage_sws2rst
that makes sage sws2rst
work.
As of this ticket, the source code of sage_sws2rst
is in build/pkgs/sage_sws2rst/src
, which is a pipinstallable Python package; and one can build an sdist from there, for example using the spkgsrc
script. The source tree could as well be split out to a separate repository.
Change History (28)
comment:1 Changed 23 months ago by
comment:2 Changed 23 months ago by
 Cc vbraun added
It seems not directly: after a quick look, the script seems to parse the html page, but maybe it could try to parse the html that belongs to the .sws archive (not sure if it has the same structure). Let me CC Volker for a better understanding of what is doable.
comment:3 Changed 23 months ago by
 Branch set to u/chapoton/28838
 Commit set to 8b5de13003724601c70e36c1a11aa83db5fdaff8
Here is a first sketch. The moved files are not at the level of sage requirements, as many doctests are missing. If this matters for you, please take the job.
New commits:
8b5de13  first sketch of sws2rst tools (moved from sagenb)

comment:4 Changed 23 months ago by
Shouldn't this go to a subdirectory of src/ext/
(e.g. src/ext/sws2rst/
) ?
comment:5 Changed 23 months ago by
Salut Thierry.
Feel free to put it anywhere you like. I am not going to do anything more here.
comment:6 Changed 22 months ago by
 Milestone changed from sage9.0 to sage9.1
Ticket retargeted after milestone closed
comment:7 Changed 18 months ago by
 Milestone changed from sage9.1 to sage9.2
comment:8 Changed 15 months ago by
 Cc dimpase added
 Milestone changed from sage9.2 to sageduplicate/invalid/wontfix
 Status changed from new to needs_review
outdated, sws stuff was removed in #30076
comment:9 followup: ↓ 17 Changed 15 months ago by
 Milestone changed from sageduplicate/invalid/wontfix to sage9.3
 Status changed from needs_review to needs_work
It is even more important now that there is no sagenb
anymore, while there are still sws
files that people might want to convert (e.g. from a former course). I will try to work on this.
comment:10 followup: ↓ 11 Changed 15 months ago by
 Milestone changed from sage9.3 to sageduplicate/invalid/wontfix
 Reviewers set to Dima Pasechnik
 Status changed from needs_work to positive_review
it needs sagenb, a nonstarter.
comment:11 in reply to: ↑ 10 Changed 15 months ago by
 Milestone changed from sageduplicate/invalid/wontfix to sage9.2
 Status changed from positive_review to needs_work
Replying to dimpase:
it needs sagenb, a nonstarter.
It only needs a small part of it (see Frédéric's patch), and the feature is still needed.
comment:12 Changed 15 months ago by
Given that this has extra dependencies (beautifulsoup
) that we have just removed, this should really be packaged as a pipinstallable little package and NOT be put into sage.misc
.
comment:13 Changed 15 months ago by
 Summary changed from sage sws2rst broken to Resurrect "sage sws2rst" via a pipinstallable package sage_sws2rst
comment:14 Changed 15 months ago by
I don't see why such an extraction cannot be carried out in a version of Sage where this tool still works.
comment:15 Changed 15 months ago by
It seems like a great idea to me to provide this converter  as long as this code is not dumped into sagelib.
comment:16 Changed 14 months ago by
I'll be happy to help with packaging
comment:17 in reply to: ↑ 9 Changed 14 months ago by
Replying to tmonteil:
It is even more important now that there is no
sagenb
anymore, while there are stillsws
files that people might want to convert (e.g. from a former course). I will try to work on this.
Any progress?
comment:18 Changed 14 months ago by
 Branch changed from u/chapoton/28838 to u/mkoeppe/28838
comment:19 followup: ↓ 26 Changed 14 months ago by
 Commit changed from 8b5de13003724601c70e36c1a11aa83db5fdaff8 to a205ec244b29b75a83581c1df9876f1a3bf824ba
comment:20 Changed 14 months ago by
 Commit changed from a205ec244b29b75a83581c1df9876f1a3bf824ba to 9464457106de708fe31d51806654b47fc19a677f
comment:21 Changed 14 months ago by
 Commit changed from 9464457106de708fe31d51806654b47fc19a677f to 0408e6063f7c2f919fb88edacb9f9a97c550afbc
Branch pushed to git repo; I updated commit sha1. New commits:
0408e60  build/pkgs/sage_sws2rst: Add dependency, fix import

comment:22 Changed 14 months ago by
 Commit changed from 0408e6063f7c2f919fb88edacb9f9a97c550afbc to 3acd1dd4466dcde1303982b00e55ba53bd2af2e4
Branch pushed to git repo; I updated commit sha1. New commits:
3acd1dd  src/bin/sage: Restore sws2rst option

comment:23 Changed 14 months ago by
It would be good to add a few test documents to the package.
comment:24 Changed 14 months ago by
 Commit changed from 3acd1dd4466dcde1303982b00e55ba53bd2af2e4 to a05748b54be032ce66e25462ff297b2af7f80047
Branch pushed to git repo; I updated commit sha1. New commits:
a05748b  build/pkgs/sage_sws2rst: More packaging

comment:25 Changed 14 months ago by
 Cc kcrisman added
comment:26 in reply to: ↑ 19 ; followup: ↓ 27 Changed 14 months ago by
How is this different from
sagenb_export
by the way?
This gives rst
files which are quite useful for e.g. adding to Sage documentation. That was some of the main use before.
Is this basically Pablo's stuff modified for Py3? It looks like it's a required package, is that correct?
comment:27 in reply to: ↑ 26 Changed 14 months ago by
Replying to kcrisman:
How is this different from
sagenb_export
by the way?This gives
rst
files which are quite useful for e.g. adding to Sage documentation. That was some of the main use before.
Thanks.
Is this basically Pablo's stuff modified for Py3?
I don't know. I just moved files around that were on this ticket already.
It looks like it's a required package, is that correct?
No, I made it an optional package, see build/pkgs/sage_sws2rst/type
comment:28 Changed 14 months ago by
 Description modified (diff)
Is converting
.sws
file covered bysagenb_export
?