Closed ufUNnxagpM closed 3 years ago
@lewismc The DependencyFile class accepts a path to an ivy.xml file when it's initialized. Once initialized, it builds a list of dependencies from the ivy.xml file and these can be modified with the modify_version(index, version)
function. When all desired changes are made, the original file can be overwritten and updated with save()
.
The only part of the ivy.xml that must be "recreated" is the license header since the ElementTree library doesn't seem to support placing comments between <?xml version="1.0" ?>
and <ivy-module version="1.0">
(see below). I've been looking into other xml libraries, mainly xml.dom.minidom
, that may be able to preserve this portion, but haven't got around to it fully.
<?xml version="1.0" ?>
<!--
ElementTree doesn't support parsing of comments placed at the top here.
-->
<ivy-module version="1.0">
...
Thanks for submitting this PR @MattTreadwell good work. Please merge and continue.
At some stage we will go back and document all Classes and Functions. This is a fundamental requirements. We will also require unit tests for all code. Is this something you guys are working on?
@lewismc I've started documenting the major files in the codebase here. I haven't gotten around to describing each function, but I can add that. Jamie and I are starting to work on unit tests as well.
Excellent. Thanks @MattTreadwell
Class for editing dependencies of ivy.xml files (mainly, the
rev
tag of each dependency). I also made some changes tomain.py
, but they'll be overwritten by Jamie's changes (in thedocker
branch). Let me know if you have any suggested changes.@lewismc