From 00aea117bc8f1e7e9ffa5f6df5c94880ae0695cf Mon Sep 17 00:00:00 2001 From: bn Date: Tue, 12 May 2020 18:16:40 +0200 Subject: [PATCH] Move test files into amc2moodle folder. - change path in python sources files - Move test file - Update path for Latexml CI script - Add missing files in MANIFEST --- .github/workflows/ci-mac-os.yml | 2 +- .github/workflows/ci-ubuntu.yml | 2 +- MANIFEST.in | 14 +++++++++----- README.md | 4 ++-- amc2moodle/test.py | 8 ++++---- {test => amc2moodle/test}/Figures/other/4.png | Bin {test => amc2moodle/test}/Figures/other/4r.png | Bin .../test}/Figures/other/schema_interpL.png | Bin {test => amc2moodle/test}/Figures/tinymonk.pdf | Bin {test => amc2moodle/test}/QCM.pdf | Bin {test => amc2moodle/test}/QCM.tex | 0 {test => amc2moodle/test}/QCM.xml | 0 {test => amc2moodle/test}/QCM_wo-tikz.tex | 0 {test => amc2moodle/test}/QCM_wo-tikz.xml | 0 setup.py | 5 +++-- 15 files changed, 20 insertions(+), 15 deletions(-) rename {test => amc2moodle/test}/Figures/other/4.png (100%) rename {test => amc2moodle/test}/Figures/other/4r.png (100%) rename {test => amc2moodle/test}/Figures/other/schema_interpL.png (100%) rename {test => amc2moodle/test}/Figures/tinymonk.pdf (100%) rename {test => amc2moodle/test}/QCM.pdf (100%) rename {test => amc2moodle/test}/QCM.tex (100%) rename {test => amc2moodle/test}/QCM.xml (100%) rename {test => amc2moodle/test}/QCM_wo-tikz.tex (100%) rename {test => amc2moodle/test}/QCM_wo-tikz.xml (100%) diff --git a/.github/workflows/ci-mac-os.yml b/.github/workflows/ci-mac-os.yml index aaa5aef..78b189f 100644 --- a/.github/workflows/ci-mac-os.yml +++ b/.github/workflows/ci-mac-os.yml @@ -53,7 +53,7 @@ jobs: - name: Test latexml run: | # add --strict flag to be more strict in error catching - latexml --noparse --nocomment --strict --path=./amc2moodle --dest=./out.xml ./test/QCM.tex + latexml --noparse --nocomment --strict --path=./amc2moodle --dest=./out.xml ./amc2moodle/test/QCM.tex - name: Install amc2moodle run: | # add -e to have write access for test. TODO : change with temp file diff --git a/.github/workflows/ci-ubuntu.yml b/.github/workflows/ci-ubuntu.yml index 9af24c9..83d76b1 100644 --- a/.github/workflows/ci-ubuntu.yml +++ b/.github/workflows/ci-ubuntu.yml @@ -46,7 +46,7 @@ jobs: - name: Test latexml run: | # add --strict flag to be more strict in error catching - latexml --noparse --nocomment --strict --path=./amc2moodle --dest=./out.xml ./test/QCM.tex + latexml --noparse --nocomment --strict --path=./amc2moodle --dest=./out.xml ./amc2moodle/test/QCM.tex - name: Install amc2moodle run: | # add -e to have write access for test. TODO : change with temp file diff --git a/MANIFEST.in b/MANIFEST.in index bfd4925..bafa08b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,10 +1,14 @@ include amc2moodle/bin/amc2moodle include amc2moodle/*.xslt include amc2moodle/*sty.ltxml -include test/Figures/* -include test/QCM.pdf -include test/QCM.tex -include test/QCM.xml -include test/QCM_wo-tikz.tex +include amc2moodle/test/Figures/* +include amc2moodle/test/Figures/other/* +include amc2moodle/test/QCM.pdf +include amc2moodle/test/QCM.tex +include amc2moodle/test/QCM.xml +include amc2moodle/test/QCM_wo-tikz.tex +include amc2moodle/test/QCM_wo-tikz.xml include LICENSE include README.md + + diff --git a/README.md b/README.md index ce99e69..ac705b1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The first conversion step is to convert the LaTeX file into XML file. This is pe Then, other transformation are applied in python with XSLT stylesheet. Most of LaTeX possibilities are supported (equations, tables, graphics, user defined commands). The question can then be imported in the moodle question bank using category tags. -> Examples of supported AMC question are provided in the [test](./test/) folder. +> Examples of supported AMC question are provided in the [test](./amc2moodle/test/) folder. ## Installation @@ -65,7 +65,7 @@ Then on moodle, go to the course `administration\question bank\import` and choos ## Usage ### What you can do -Examples of the `amc2moodle` possibilities are given at [QCM.pdf](./test/QCM.pdf) +Examples of the `amc2moodle` possibilities are given at [QCM.pdf](./amc2moodle/test/QCM.pdf) - Convert `question` and `questionmult` environments. - You don't need to remove questionnaires part `\exemplaire` or `\onecopy`. But if this part contains undefined commands, remove/comment it! diff --git a/amc2moodle/test.py b/amc2moodle/test.py index d680875..6a13f1d 100755 --- a/amc2moodle/test.py +++ b/amc2moodle/test.py @@ -76,10 +76,10 @@ def test_notikz(self): """ # define i/o file fileIn = os.path.abspath(os.path.join(os.path.dirname(__file__), - "../test/QCM_wo-tikz.tex")) + "test/QCM_wo-tikz.tex")) fileOut = os.path.abspath('./test_notikz.xml') fileRef = os.path.abspath(os.path.join(os.path.dirname(__file__), - "../test/QCM_wo-tikz.xml")) + "test/QCM_wo-tikz.xml")) # convert to xml a2m.amc2moodle(fileInput=fileIn, fileOutput=fileOut, @@ -97,10 +97,10 @@ def test_tikz(self): """ # define i/o file fileIn = os.path.abspath(os.path.join(os.path.dirname(__file__), - "../test/QCM.tex")) + "test/QCM.tex")) fileOut = os.path.abspath('./test_tikz.xml') fileRef = os.path.abspath(os.path.join(os.path.dirname(__file__), - "../test/QCM.xml")) + "test/QCM.xml")) # convert to xml a2m.amc2moodle(fileInput=fileIn, fileOutput=fileOut, diff --git a/test/Figures/other/4.png b/amc2moodle/test/Figures/other/4.png similarity index 100% rename from test/Figures/other/4.png rename to amc2moodle/test/Figures/other/4.png diff --git a/test/Figures/other/4r.png b/amc2moodle/test/Figures/other/4r.png similarity index 100% rename from test/Figures/other/4r.png rename to amc2moodle/test/Figures/other/4r.png diff --git a/test/Figures/other/schema_interpL.png b/amc2moodle/test/Figures/other/schema_interpL.png similarity index 100% rename from test/Figures/other/schema_interpL.png rename to amc2moodle/test/Figures/other/schema_interpL.png diff --git a/test/Figures/tinymonk.pdf b/amc2moodle/test/Figures/tinymonk.pdf similarity index 100% rename from test/Figures/tinymonk.pdf rename to amc2moodle/test/Figures/tinymonk.pdf diff --git a/test/QCM.pdf b/amc2moodle/test/QCM.pdf similarity index 100% rename from test/QCM.pdf rename to amc2moodle/test/QCM.pdf diff --git a/test/QCM.tex b/amc2moodle/test/QCM.tex similarity index 100% rename from test/QCM.tex rename to amc2moodle/test/QCM.tex diff --git a/test/QCM.xml b/amc2moodle/test/QCM.xml similarity index 100% rename from test/QCM.xml rename to amc2moodle/test/QCM.xml diff --git a/test/QCM_wo-tikz.tex b/amc2moodle/test/QCM_wo-tikz.tex similarity index 100% rename from test/QCM_wo-tikz.tex rename to amc2moodle/test/QCM_wo-tikz.tex diff --git a/test/QCM_wo-tikz.xml b/amc2moodle/test/QCM_wo-tikz.xml similarity index 100% rename from test/QCM_wo-tikz.xml rename to amc2moodle/test/QCM_wo-tikz.xml diff --git a/setup.py b/setup.py index 7133413..08f941c 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ def version(): this_version = version() -print('version:',this_version) +print('version:', this_version) setup( @@ -60,7 +60,8 @@ def version(): ], install_requires=[ 'wand>=0.5.9', - 'lxml>=3.5.0' + 'lxml>=3.5.0', + 'wheel>=0.29.0' ], python_requires='>=3.5' ) \ No newline at end of file