bugeLyXer - Bugs: bug #31414, src/conf/config.py not found in...

 
 

bug #31414: src/conf/config.py not found in git repository

Submitter:  Jose Ramon Alvarez-Sanchez <jras>
Submitted:  Fri 22 Oct 2010 12:40:08 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Postponed
Privacy:  Public Assigned to:  alexfernandez
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 29 Oct 2010 07:15:51 AM UTC, comment #11: 

Yes, I agree. The remaining problem need many simultaneos rare conditions to show, and even in that case, it is ignorable as the cause is known to not harm...

Jose Ramon Alvarez-Sanchez <jras>
Fri 29 Oct 2010 06:48:02 AM UTC, comment #10: 

Good suggestion, I will add it to the wish list if you don't mind. I want to make a release today with all the fixes, if there aren't any showstoppers.

Alex Fernandez <alexfernandez>
Group administrator
Thu 28 Oct 2010 10:28:37 PM UTC, comment #9: 

In a clean git clone, a ./make went without errors this time. The timestamps could have been in order by chance. Then touching all .jpg in test/ and doing again a ./make it went correct. And at last touching all .png in test/ and repeating ./make all was ok.

I am not sure also about what is best, but probably the solution should be different for each test case:
If the objective of a test is to detect conversion from one format to other, then the target must be removed before running that test. In this case it should be natural to have error messages when convert (imagemagick) is not correctly or fully installed (as in my case). Also that graphic file can (must?) be removed from git.
On the other hand, if the objective of the test is to find differences in the html files that depend on a correct graphic file, then it is necessary to check if the target graphic file already exists and, only in this case, touch it to ensure no conversion is done before running elyxer in the test.
The graphic test files must be separated in different sets, one for persistent graphics and other for erasable ones, and the later set could be removed from git also.

Jose Ramon Alvarez-Sanchez <jras>
Thu 28 Oct 2010 09:45:16 PM UTC, comment #8: 

That is true, download order may force a reconversion -- eLyXer looks at the timestamp and decides if the original file has been modified and needs to be converted again. But I don't know how to solve it.

A manual touch is fine, as you did. Touching all files always before make would defeat the purpose of this mechanism. Actually one of the tests removes mourning.png and forces a reconversion.

As to the JPEG images, it appears that the wrong version was uploaded somehow. I have committed new versions; they should work fine for you.

Alex Fernandez <alexfernandez>
Group administrator
Tue 26 Oct 2010 12:09:39 AM UTC, comment #7: 

Tried again in clean git clone and now almost all goes OK, except an strange problem in doc generation phase (remember I have imagemagick but without rsvg).
eLyXer tried to convert "docs/parse tree.svg" (so giving an error by convert), but the file "docs/parse tree.png" was already in git. The other .svg/.png files in docs were OK, so at first I thought it was a problem with space in name or similar.
Finally, the problem is that timedate stamp of .png file was earlier than the corresponding .svg, so eLyXer tried to rebuild the .png.
This different timestamp is the result of undefined order of download by git. And  it could explain why you cannot reproduce the other problem reported in my previous comment #5 with test/laurindas-anger.png, this could occur in random files with each new clean git clone...
The solution is to just "touch" all the .png and .jpg files in docs before using them in ./make, to ensure they are newer than their .svg.

On the other hand, I tried a new git clone and a blind touch of all jpg and png in subdirectories (including tests), but then I got a difference in test "with images-1-5-jpg-test.html" about dimensions in "square.jpg" because it is not converted from .svg but from .png, that my installation of imagemagick is able to do, but for some reason it results in different size:

Testing eLyXer -- any text below this line signals an error
--- with images-1-5-jpg-good.html        2010-10-26 01:37:21.481196835 +0200
+++ with images-1-5-jpg-test.html        2010-10-26 01:53:21.968696912 +0200
@@ -30,7 +30,7 @@
 Fourth image: from a JPEG file.
 </div>
 <div class="Standard">
-<img class="embedded" src="square.jpg" alt="figure square.jpg" style="width: 300px; max-width: 30px; height: 300px; max-height: 30px;"/>
+<img class="embedded" src="square.jpg" alt="figure square.jpg" style="width: 30px; max-width: 3px; height: 30px; max-height: 3px;"/>
 Fifth image: from a PNG file.
 </div>


This could be a sign that if all the converted images in tests are already included from git, then they are not really checked by conversion, but just from the downloaded version if timestamp is newer...

The rest of issues (language, etc.) are OK.

Jose Ramon Alvarez-Sanchez <jras>
Mon 25 Oct 2010 10:08:18 PM UTC, comment #6: 

1. The unknown command is in the changelog; it is used to show how an unknown command is displayed. So, everything is fine.

2. It's true, images are included in the git tree you linked -- I had forgotten. And in this same git tree I can see test/laurindas-anger.png, so I don't know why you cannot find them. In fact I redid your test (clean git clone) and I cannot reproduce this issue.

Finally, there is no need to use LANG=C: eLyXer will use the language of each document. For descriptions-1.5-good.html the language was incorrectly set to Spanish, corrected now.

So everything should be fine now, could you confirm?

Alex Fernandez <alexfernandez>
Group administrator
Sun 24 Oct 2010 11:49:13 PM UTC, comment #5: 

Testing ./make in a clean new git clone (with imagemagick installed but without rsvg):

1. Now there is no error about images during docs building phase (just progress messages and one "Line 3082: . Unknown command \Game").

2. During tests there are only 2 failures in image conversion but they seem related to not finding the files `test/laurindas-anger.png' and `laurindas-anger.png'. I can see there is only a "laurindas-anger.png" but in "test/subdir/".

On the other hand, there is no detected failure for converting any svg file in tests, because all the corresponding .jpg and .png are already included in git. Check the "test" subdir in git tree http://git.savannah.gnu.org/cgit/elyxer.git/tree/test

And there is also a small difference. In test "descriptions-1-5-good.html" appears the old Spanish translation "Glosario" and, as I have installed the new file elyxer.mo, in "descriptions-1-5-test.html" appears the new "Índice alfabético". This is minor, but it hints that the tests should be run with "export LANG=C" environment and that "good" files should be generated also with LANG=C, so to avoid false differences due to different locales.
 
3. (to be checked in next release).
4. OK.
5. OK.

Jose Ramon Alvarez-Sanchez <jras>
Sun 24 Oct 2010 10:03:11 PM UTC, comment #4: 

There are five issues pending, I am numbering them for easy reference:

  1. Image conversion for the documentation: I could commit PNG versions of the images, after all they do not change often. In general I dislike uploading non-source artifacts (binary files which can be generated from other text files), but in this case I suppose that they don't change very often and they could be useful. So I added them.
  2. Test runs should warn if image conversion is not available: This is a hard issue to tackle. I will add it to the wish list since it might be worth revisiting.
  3. Test files in the distributed .tar.gz: Should be solved now for the next release.
  4. Tests do not detect if a file is missing: This has been solved in the git repository. Now all test files are removed before every test run.
  5. Test with Python 2.4 (python2.4): I like your solution, I have committed a version very similar to yours.


Let me know how it goes. Even if all goes well I will leave this report open until after 1.0.4 has been released so we can check issue #3.

Alex Fernandez <alexfernandez>
Group administrator
Sat 23 Oct 2010 08:12:43 PM UTC, comment #3: 

Yes, now bootstrap of conf/config.py works from git version and, independent of other messages (see comment #1), an elyxer.py file is created correctly.

Jose Ramon Alvarez-Sanchez <jras>
Sat 23 Oct 2010 04:48:40 PM UTC, comment #2: 

Hi jras,

The first part of the bug (bootstrap creation of conf/config.py should be solved now. The script to generate it, exportconfig.py, had grown a number of functionalities over time, including generation of elyxer.pot; this in turn required conf/config.py, making it impossible to generate a clean package.

I will get to the  second part soon. Thanks!

Alex Fernandez <alexfernandez>
Group administrator
Fri 22 Oct 2010 08:41:07 PM UTC, comment #1: 

After copying config.py from 1.0.3, to avoid the bootstrap problem in the git version (in original post in this bug), running ./make builds elyxer.py, but it prints some errors during documentation building, all of them similar to the following:

sh: rsvg: not found
convert: delegate failed `"rsvg" "%i" "%o"' @ error/delegate.c/InvokeDelegate/1061.
convert: unable to open image `/tmp/magick-XXm6PhM8': gick-6.6.0/modules-Q16/coders/svg.la @ error/blob.c/OpenBlob/2489.
convert: unable to open file `/tmp/magick-XXm6PhM8': ���� @ error/constitute.c/ReadImage/572.
convert: missing an image filename `docs/elyxer.png' @ error/convert.c/ConvertImageCommand/2940.
Line 72: * imagemagick not installed; images will not be processed

imagemagick is installed, but as I use inkscape to convert .svg files in LyX,
"rsvg" program (used by imagemagick) is not needed, so I already do not have installed Debian package librsvg2-bin that has it.

I just copied files: container.png, elyxer.png, parse\ tree.png, pipeline.png, from docs directory in elyxer-1.0.3.tar.gz and then ./make in git version worked.
Maybe, those files for documentation must be included in git to avoid strange failure messages before the tests.

On the other hand, maybe, run-tests (if it is not tested previously in ./make) should include a test to see if "convert" (from imagemagick) is installed, and if it is being able to convert from svg to png (i.e.: rsvg is installed) and in case it fails, then it could try with inkscape (to set it by default or warning, in case it can), or if it both converters fail, then show a clear message urging to install rsvg or to check imagemagick installation, etc.



I have seen that .tar.gz distribution (not in git) includes all the "...-test..." files, so run-tests could not detect if a test failed to create the file, because it already is there from start...


Also I only have Python 2.6 (default in Debian now) and don't have Python 2.4 installed, so cannot test  index-1-6-py2.4-test.html in ./run-tests, but it generates an error. Probably, the following in run-tests could be better:

type -P python2.4 &> /dev/null
if [ $? = 0 ] ; then
   name="index-1-6"
   python2.4 ../elyxer.py --quiet --css ../docs/lyx.css "$name.lyx" "$name-py2.4-test.html"
   diff -u --ignore-matching-lines="create-date" "$name-good.html" "$name-py2.4-test.html"
else
   # echo "python2.4 not found, cannot test it"
fi


Thanks.

Jose Ramon Alvarez-Sanchez <jras>
Fri 22 Oct 2010 12:40:08 PM UTC, original submission:  

I tried to follow instructions in Developer Guide to get eLyXer from git repository:

  • git clone git://git.sv.gnu.org/elyxer.git
  • cd elyxer
  • ./make

but it shows a lot of errors related to missing conf/config.py:


Traceback (most recent call last):
  File "./exportconfig.py", line 27, in <module>
    import conf.config
ImportError: No module named config
* Missing file conf/config.py
...


An elyxer.py is generated, but then appear a lot of repeated messages from elyxer.py (when running tests):


Traceback (most recent call last):
  File "./elyxer.py", line 196, in <module>
    from conf.config import *
ImportError: No module named conf.config


File src/conf/config.py is missing from git repository.

I tried to use a copy of src/conf/config.py from elyxer-1.0.3.tar.gz to bootstrap config generation, but that does not seems to be the intended way...

Jose Ramon Alvarez-Sanchez <jras>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by alexfernandez (Posted a comment)
  • -email is unavailable- added by jras (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-29 alexfernandez StatusReady For Test Postponed
    2010-10-23 alexfernandez Assigned toNone alexfernandez
    2010-10-23 alexfernandez StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code