aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_taskipy.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* GH-63: Fix use_vars task override with project setting (#64)Eugene Triguba2023-07-301-0/+32
| | | | * from now on, the use_vars task-level setting takes priority if it is ever explicitly set. Otherwise, the project-level setting is used * closes #63
* gh-32: Fix linting warnings/failuresEugene Triguba2023-04-081-3/+14
|
* handle listing tasks when there are no tasks (#52)Roy Sommer2022-08-311-0/+18
|
* Add support for recursive variables (#44)Eugene Triguba2022-02-101-2/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use `self` in pyproject * Add support for recursive variables * Remove duplicate psutil from pyproject * Tweak implementation based on issue feedback * Add type hint to vars_dict * Use `count_of_previously_resolved_vars` name * Clarify test name * Revert refactor and use tuple for variable type return * Add non recursive variable test case * Alter test case name * Add recursive variable docs * Add recursive variables to table of contents * Use PyProject to access static methods * Add better handling of invalid variables * Fix lockfile hash * Move variable import * Only resolve variables once if we are using vars * Fix minor type issue * Reword error message
* Fix `taskipy.variables` table name in error message (#39)Eugene Triguba2022-02-061-1/+1
|
* added vars to readmeRoy Sommer2021-09-271-4/+4
|
* Add variable support (#38)Bernardas Ališauskas2021-09-271-1/+94
| | | | | | * add variable support * add use_vars task option and make command variables expand only when use_vars is True * add tests for variable feature * add setting use_vars as global use_vars for all commands
* Only use and install `mslex` on Windows (#36)Eugene Triguba2021-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix lint issues where encoding was not specified * Only use and install mslex on Windows * Escape backslash in test_windows * Alter Windows CI name Since we actually have some tests other than the path sanity test, it probably makes sense to just call it a Windows test now. * Disable pylint issue with mslex import It's raising an unable to import issue with that line, which makes sense since mslex wouldn't be installed on any other platform other than Windows, but it also wouldn't be run on any other platform so it seems to be a non issue. Co-authored-by: Eugene Triguba <etriguba@sonifi.com>
* Allow Declaring Tasks with Descriptions (#35)Roy Sommer2021-05-161-7/+68
| | | adds the ability to declare tasks explicitly, including command and description text
* Add usage printout when no task is given (#31)Eugene Triguba2021-03-281-0/+15
| | | | | | | | | | | | | | | | | * Add usage printout when no task is given This addresses issue #30 where 'could not find task "None"' would be outputted when simply `task` is ran without an task name. * Simplify InvalidUsageError's __str__ method * Ignore pyenv's local python version file * Update dependencies in lockfile a.k.a. ran `poetry update` * Disable W0707 in pylint
* Find a parent pyproject.toml from a child directory (#28)Tsunenobu Kai2020-12-251-2/+15
| | | Enable running tasks defined in parent pyproject.toml from a child directory.
* Support Windows-Style Paths (#27)Roy Sommer2020-11-281-2/+1
| | | | use mslex instead of shlex when running on windows. added a new windows sanity ci test.
* Add -l option for taskipy list command (#24)Eugene Triguba2020-11-241-12/+17
|
* fixed tests on macosRoy Sommer2020-10-081-1/+1
|
* Update test_taskipy.pyRoy Sommer2020-10-071-4/+0
|
* add list command which lists tasks (#21)Bernardas Ališauskas2020-10-071-3/+39
| | | | | | | | | | | | | | | | | | | * add list command which lists tasks * refactor list argument as a flag add tests and readme for --list flag * more tests * Update tests/test_taskipy.py Co-authored-by: Roy Sommer <illBeRoy@users.noreply.github.com> * refactor listing to taskrunner fix tests and cli to handle --list following arguments cases Co-authored-by: Roy Sommer <illBeRoy@users.noreply.github.com>
* Propagate SIGTERM to child processes (#19)RobinFrcd2020-08-081-0/+14
| | | SIGTERM sent to taskipy are handed over to task subprocess
* Refactor taskipy into Task, PyProject, and TaskRunner (#15)Eugene Triguba2020-06-151-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Run `poetry update` * Sort test imports & convert unused f strings to strings There were some f strings that weren't interpolating anything. * Create custom exceptions * Refactor taskipi package into task, pyproject, and task_runner * Add docstrings & types to task & task_runner. Also, a small refactoring of __bail_on_first_fail() in task_runner.py. * Remove docstrings * Add MissingTaskipySettingsSectionError * Make path & items in PyProject private * Check runner is string rather than catching AttributeError * Add default exception case to cli * Add exit_code class variable to exceptions * Change PyProject to take in the file_path This also converts the instance variables to be private and has __load_toml_file convert the file_path to a Path if it is a str. We also no longer store the file_path since __load_toml_file is the only place it is needed so it is just passed in. * Task now builds the commands & takes in args + project I think args could possibly be moved over to commands since that is the only place it is used and that would reduce the amount of things we are passing in to Task. commands would just have to be converted to a method instead of a property then. * TaskRunner only runs the commands now with the project passed in Instead of putting the commands together, that is now delegated to Task. The run_commands_and_bail_on_first_fail method is now gone as that is what `run` does now. Furthermore, the instance variables of TaskRunner are private now. A single instance of the TaskRunner can now run many tasks now, since it is not tied to any particular task. * Update cli to use updated TaskRunner The pyproject.toml path is now passed in with the command name and args being passed to `run`. * Use single quotes * Extract pre_task & post_task to use __find_hooks They are basically the same method, with a one word difference.
* Passed Arguments Are Escaped Properly (#12)Roy Sommer2020-03-211-0/+9
| | | passed arguments are now escaped properly. can pass arguments with spaces.
* Custom Runner (#11)Roy Sommer2020-03-071-3/+60
|
* Ignore SIGINT While Running Tasks (#8)Roy Sommer2020-02-011-4/+49
| | | fix: sigint is now ignored by taskipy process, reflects output of task instead
* added support for passing arguments into taskipy tasksRoy Sommer2020-01-021-2/+46
|
* renamingRoy Sommer2019-12-231-1/+1
|
* v1.0.0Roy Sommer2019-12-231-1/+1
|
* initial commitRoy Sommer2019-12-221-0/+131