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

Fix distutils issue (+ a few basics improvments) #85

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-mac-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.8, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
env:
# set env variable for Wand
MAGICK_HOME: '/opt/homebrew'
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 @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', '3.13']
# unsupported version on ubuntu-latest 3.5, 3.6
# see https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
4 changes: 2 additions & 2 deletions amc2moodle/amc2moodle/amc2moodle_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import shutil
from importlib import util # python 3.x
import tempfile
from distutils.dir_util import copy_tree
from shutil import copytree
import logging
from concurrent.futures import ThreadPoolExecutor

Expand Down Expand Up @@ -341,7 +341,7 @@ def runBuilding(self):
dir=getPathFile(self.output))
#
Logger.info(' > Save all temp files in: %s' % tempdirSave)
copy_tree(self.tempdir.name, tempdirSave)
copytree(self.tempdir.name, tempdirSave, dirs_exist_ok=True)

# clean XML file (experimental)
if self.cleanXML:
Expand Down
2 changes: 1 addition & 1 deletion amc2moodle/amc2moodle/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def _element_pre_process(self, tree):
with CDATA.
"""
# These elements should be <para> nodes at roots level.
all_para = tree.findall('/para')
all_para = tree.findall('./para')
if len(all_para) > 0:
Logger.warning(" > {} '\\element' blocks contain text outside ".format(len(all_para))
+ "'Question environnement'. "
Expand Down
6 changes: 3 additions & 3 deletions amc2moodle/amc2moodle/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def question_fields(self, qname, target_ans_sum,
frac = float(a.attrib['fraction'])
frac_list.append(frac)
s += frac
print('In {}, fraction are {}\n'.format(qname, frac_list))
Logger.debug('In {}, fraction are {}\n'.format(qname, frac_list))
if abs(s - target_ans_sum) > TOL:
ok += 1
else:
Expand Down Expand Up @@ -360,7 +360,7 @@ def test_numerical(self):
# check it
equiv = check_hash(fileOut, fileRef)
if equiv:
print(' > Converted XML is identical to the ref.')
Logger.info(' > Converted XML is identical to the ref.')
# self.assertTrue(equiv, 'The converted file is different from the ref.')

def test_tikz(self):
Expand All @@ -381,7 +381,7 @@ def test_tikz(self):
# check it
equiv = check_hash(fileOut, fileRef)
if equiv:
print(' > Converted XML is identical to the ref.')
Logger.info(' > Converted XML is identical to the ref.')
# self.assertTrue(equiv, 'The converted file is different from the ref.')

def test_cleaning(self):
Expand Down
Loading