* Upgraded CI workflow to use Python 3.11.2 and Pytest 7.2.2
* Pinned Pylint version to ~=2.17.1
* Added tomli to test_exercises.py imports.
* Adding in tomli for dependancies.
* Need to use latest build of Black due to Python 3.11 and packaging problems with tomli
* Regenerated test files for exercises failing CI.
* Try removing tomli to see if it fixes CI for Py3.11
* And more version fishing for black, which is the culprit here.
* Regeneraed test files with black 22.3.0, since black 23.3.0 is incompatible with Python 3.11 due to tomli conflicts.
* Trying a different strategy. Using only 3.11 for the main container.
* Must import tomllib, part of exteded standard lib not core.
* Wrapped tomllib in a try-catch and aliased importing tomli. Updated requirements to only install tmli on 3.10 and below.
* Forgot to update the imports in the generator.
* Added paasio test changes here, since this changes the CI checker to use Python 3.11.
* Trying a msg= approach.
* grep: add test template
* queen-attack: create macro to apply to canonical and additional test cases
* grep: extract variables
* grep: set variable name using filename
Remove hard-code files variables name and change filesnames dict to list to avoid duplicated work in case of add files to test.
* grep: read filename from canonical data comments
* grep: create content variables
Set builtin zip as jinja filter to iterate names and contents lists.
* grep: add mock-file
* create plugins file and move appropriate content there
* Add gigasecond test template and generate tests.
* Add datetime import.
* gigasecond: add test template
Adds the gigasecond test template. Addresses most of the concerns on the
defunct #2066 submitted by @simonbcodes, however the `strptime` fix
suggested by @cmccandless was brittle, as some of the incoming data had
time data.
We'd _maybe_ want to add a `dateutil` dependency if the canonical data
strays in any way from bog standard ISO 8601 dates, but hopefully if
that happens the `datetime.fromisoformat` calls here will blow up and
let us know.
Closes#1950
* gigasecond: generate with dateutil parse
Adds a dependency to the generator, but shifts the work off the student.
As an added benefit should parse a lot more than fromisoformat would.
Must be merged _after_ #2134.
* Update requirements-generator.txt
Woops!
Co-Authored-By: Corey McCandless <cmccandless@users.noreply.github.com>
* generate_tests: allow newer Python versions
Current version forces 3.7, but one of the few pains of being on Arch
Linux is that _suddenly_ you're on 3.8.
* generate_tests: relax to 3.6
* generator: Add support for exercise plugins
* use importlib for importing plugins
* handle plugin SyntaxError
* group SyntaxError with TypeError, UndefinedError
* Add test generator script
* add .flake8 file to handle line length discrepency with black
* add requirements file for generator script
* Run bin/generate_tests.py in Travis HOUSEKEEPING job to ensure template changes have been applied
* add --check flag to generator script and refactor CI calls
Co-authored-by: Michael Morehouse <640167+yawpitch@users.noreply.github.com>