Skip to content

Commit

Permalink
Move test files into amc2moodle folder.
Browse files Browse the repository at this point in the history
  - change path in python sources files
  - Move test file
  - Update path for Latexml CI script
  - Add missing files in MANIFEST
  • Loading branch information
nennigb committed May 12, 2020
1 parent 9f14a49 commit 00aea11
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-mac-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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


4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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!
Expand Down
8 changes: 4 additions & 4 deletions amc2moodle/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def version():


this_version = version()
print('version:',this_version)
print('version:', this_version)


setup(
Expand All @@ -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'
)

0 comments on commit 00aea11

Please sign in to comment.