[no important files changed]
* Added join input function and changed template and test file for transpose exercise.
* Regenerated file to replace lines with text.
* Corrected small typos around resistor bands.
* Due to failing CI, alterations to the test generator script were needed.
The generated vs submitted diff now skips the first three lines of the file
so that the generation date is not picked up and flagged as needing regeneration.
Sadly, a workaround was also needed to prevent Python difflib from noting the difference
anyways and producing an empty "false positive" diff.
All templates and test files also needed to be altered to ensure that the first three
lines of every test file will always be the autogeneration comment and date.
Hopefully, this will now stop the CI failures without creating any subtle additional bugs.
* Touch up to bowling template. Added back the error raising utility.
* Touch up to two-bucket template to add back in error raising utility.
[no important files changed]
* Additional sweep to update Python versions and supported Python versions.
* Fixed requirements and CONTRIBUTING.
* Trying a different line skip to see if it fixes CI. CI is failing on test file generation again.
* Once again re-rendering tests to see if it fixes CI.
[no important files changed]
* Changed generate script to skp diffing generated comments and timestamp at top of file.
* Reordered and regenerated test files for practice exercises.
[no important files changed]
* Corrected the macro for comments on the test file.
* Added current_date (utcnow()) variable available for template macros.
* Removed unnecessary datetime import from macros file.
* Regenerated all practice exercise test files to add timestamp.
* Changed `datetime.now(tz=timezone.utc)` to `datetime.now(tz=timezone.utc).date()`
* Second regeneration to remove `timestamp` and just keep `date` for test files.
[no important files changed]
* 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>