Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make matplotlib support SAGE_SPKG_INSTALL_DOCS #10828

Closed
jasongrout opened this issue Feb 23, 2011 · 23 comments
Closed

Make matplotlib support SAGE_SPKG_INSTALL_DOCS #10828

jasongrout opened this issue Feb 23, 2011 · 23 comments

Comments

@jasongrout
Copy link
Member

This ticket implements #10823 for matplotlib. New spkg at  http://sage.math.washington.edu/home/jason/spkg-docs/matplotlib-1.0.1.p0.spkg (depends on #10588)

CC: @sagetrac-ryan

Component: packages: standard

Keywords: sd32

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/10828

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Mar 1, 2011

comment:2

A few points.

It looks like similar issues arise with the other updated .spkg files that you produced which are related to #10823

@jasongrout
Copy link
Member Author

Attachment: 10828.patch.gz

FYI Only---already applied to spkg.

@jasongrout
Copy link
Member Author

FYI Only---already applied to spkg.

@jasongrout

This comment has been minimized.

@jasongrout
Copy link
Member Author

comment:3

Attachment: 10828-1.patch.gz

@jasongrout
Copy link
Member Author

comment:4

I also found that the last matplotlib spkg from #10588 had a dirty src/ directory, instead a pristine copy of the sources. That was probably all my fault, as I was the reviewer, and the contributor was a new contributor. I'm CCing Ryan to make sure he knows about it, just as an FYI.

The new matplotlib spkg above replaces the src/ directory with a pristine copy of the 1.0.1 matplotlib sources, which removes the build directory, some of the files that are generated in compilation, and trims the final spkg from 19M to 11M.

@jasongrout
Copy link
Member Author

comment:6

New spkg is up, ready for review.

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Mar 2, 2011

Reviewer: David Kirkby

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Mar 2, 2011

comment:7

This generates the HTML and puts it where expected. However, the simple

cp -r doc/* $SAGE_ROOT/local/share/doc/PACKAGE_NAME/

is copying a lot of unnecessary files. There are 29 files with the extension .py, 511 files with the extension .pyc, and possibly some other unnecessary files that are being copied to $SAGE_ROOT/local/share/doc/PACKAGE_NAME/ There are 945 pdf files there too - I'm not quite sure how they got there. The total size of the files copied to $SAGE_ROOT/local/share/doc/PACKAGE_NAME/ is 115 MB

I think we need to find the unnecessary files and remove them. Something like:

find "$SAGE_ROOT/local/share/doc/matplotlib" -name '*.pyc' -exec rm -f {} \;
find "$SAGE_ROOT/local/share/doc/matplotlib" -name '*.py'  -exec rm -f {} \;

would be a start, but there's probably more that can be done.

Should we generate all the PDFs if pdftex is present? (In which case there will be several hundred more), or delete all the PDFs??

I can't see any point in having the .py and .pyc files, but I'm not so sure about the .pdf files.

I'm not going to copy the same comments to all the other packages - lets get one right first, before going on to the others.

I think #10823 should be updated to advise developers to remove unnecessary files if they are present, otherwise we are just going to be copying a lot of unneeded junk, and filling up disks unnecessarily.

Dave

@jasongrout
Copy link
Member Author

comment:8

In matplotlib, it's not "cp -r doc/* $SAGE_ROOT/local/share/doc/PACKAGE_NAME/", but rather, it's copying the results of the build directory.

The documentation for matplotlib includes a lot of example figures (generated in both png and pdf formats) as well as the .py files that generated those examples, so I think those files are legitimate. I'm not sure about the .pyc files---I'll check those.

@jasongrout
Copy link
Member Author

comment:9

This spkg (as well as the other spkgs from #10823) are copying the directories containing the actual built documentation (e.g., build/html), not the entire documentation source tree. As such, only the actual documentation files should be there. In matplotlib's case, lots of pdf and png files are generated as example images (this is a plotting package, after all) and the generating .py files are also included in the docs.

I see some pyc files that probably should not be in the build directory of the docs.
I feel like these should be reported upstream and dealt with on another ticket. I'd really rather use the default upstream doc build system, and report problems upstream.

Please remember that SAGE_SPKG_INSTALL_DOCS is an optional feature, and the people that invoke it are making a decision that the documentation is worth the disk space.

@jasongrout
Copy link
Member Author

comment:10

I've posted a message to the matplotlib list about the .pyc files, as well as a possible redundancy in image files.

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Mar 2, 2011

comment:11

OK, in light of what you have said, I'll put this to positive review.

@jasongrout
Copy link
Member Author

comment:12

An upstream developer has proposed some changes to matplotlib that will cut down on the redundant files. See the mailing list thread here: http://thread.gmane.org/gmane.comp.python.matplotlib.general/26576

@jdemeyer
Copy link

jdemeyer commented Mar 8, 2011

Merged: sage-4.7.alpha1

@jdemeyer
Copy link

comment:14

matplotlib doesn't build from scratch using SAGE_SPKG_INSTALL_DOCS, see also #10826.

@jdemeyer
Copy link

Changed merged from sage-4.7.alpha1 to none

@jasongrout
Copy link
Member Author

comment:16

See #11197 for building docs after Sage is built.

@williamstein
Copy link
Contributor

Changed keywords from none to sd32

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe
Copy link
Member

mkoeppe commented Dec 2, 2021

Changed reviewer from David Kirkby to none

@mkoeppe
Copy link
Member

mkoeppe commented Dec 2, 2021

Changed author from Jason Grout to none

@mkoeppe
Copy link
Member

mkoeppe commented Dec 2, 2021

comment:22

outdated, should close

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 2, 2021
@dimpase
Copy link
Member

dimpase commented Dec 3, 2021

Reviewer: Dima Pasechnik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants