Skip to content

manic-v1.1.8: Add support for git sparse checkout, and fixes for python3.8

Compare
Choose a tag to compare
@billsacks billsacks released this 03 Mar 17:35
fde04e4
(1) Add support for git sparse checkout

Added a new, optional external property, sparse. sparse points to a file
(relative to external repository local directory) with git sparse
checkout patterns (e.g., directory names to include).

If the sparse keyword is included, enable sparse checkout for that
repository and use git read-tree to perform the sparse checkout.

Added a new test for sparse checkout. The test is a repo with two
externals which are both tag2 of the simple_ext repo with one of them
configured for a sparse checkout. The test makes sure that both
externals have the correct files.

Updated the documentation for the externals configuration file.

User interface changes?: Yes - New sparse keyword is optional with a
blank default value which preserves current functionality.

Fixes: #120

Testing:
test removed: None
unit tests: All passed
system tests: All passed, including new test for sparse feature
manual testing: Several manual tests of NASA test cases.

(2) Fixes for python3.8, and tweak travis-ci testing

- Critical fix needed for python3.8
- pylint fix needed for all versions of python 3
- Add python3.7 and python3.8 testing through travis-ci
- Remove travis-ci testing on Mac OS (which was using python2, and was
  failing)

User interface changes?: No

Fixes ESMCI/cime#135 ("dictionary keys changed during iteration" when
running checkout_externals)

Testing: 'make lint', 'make test'
  test removed: travis-ci testing on Mac OS
  unit tests: pass
  system tests: pass
  manual testing:

With these diffs in a CESM checkout:

```diff
diff --git a/Externals.cfg b/Externals.cfg
index b943c25..6b0f03e 100644
--- a/Externals.cfg
+++ b/Externals.cfg
@@ -39,7 +39,7 @@ required = True
 tag = release-cesm2.0.03
 protocol = git
 repo_url = https://github.com/ESCOMP/mosart
-local_path = components/mosart
+local_path = ./components/mosart
 required = True

 [pop]
```

ensured that `manage_externals -S` gives the exact same output now as
before.