Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from SINTEF/cwa/fix-141-utilize-ignore
Handle version specifiers. Utilize the `packaging` package to parse the version specifier set and generate "ignore" rules to utilize the existing logic for handling "ignore" rules. In this way, it's more of a "minimum implementation" and should be easier and more straight forward. However, what may really be happening, is simply just making the reading and understanding of the "ignore" rules implementation the point at which one may struggle to understand the implementation. But again, since this logic already exists, this does not add additional complexity. In addition to parsing the dependency-specific version specifier set as "ignore" rules, support for the 'python_version' marker is also implemented, although be it in a limited capacity - mainly due to not over-complicating the logic further. Also, the utils.py file has been split up into it's separate parts and moved into dedicated files under a new utils folder - effectively changing the `ci-cd` package's Python API. Finally, some formatting options have been added when printing to the console. These options include colorization and general formatting (bold, italic, etc.). Note, these are only displayed in any given terminal if the terminal supports it. These options have only been implemented for the update-deps task, since this is the only one being touched properly by this PR. Note, the Python API changes mentioned above has also resulted in a change in the test files structure. Because all utility functions previously found in ci_cd.tasks.update_deps have been moved to the new ci_cd.utils.versions module, some tests have also been moved, accordingly.
- Loading branch information