Skip to content

Commit fde04e4

Browse files
authored
Merge pull request #138 from billsacks/add_python38_tests
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.
2 parents 34fbf55 + 37e4c4a commit fde04e4

File tree

3 files changed

+15
-27
lines changed

3 files changed

+15
-27
lines changed

.travis.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
# NOTE(bja, 2017-11) travis-ci dosen't support python language builds
2-
# on mac os. As a work around, we use built-in python on linux, and
3-
# declare osx a 'generic' language, and create our own python env.
4-
51
language: python
62
os: linux
73
python:
84
- "2.7"
95
- "3.4"
106
- "3.5"
117
- "3.6"
12-
matrix:
13-
include:
14-
- os: osx
15-
language: generic
16-
before_install:
17-
# NOTE(bja, 2017-11) update is slow, 2.7.12 installed by default, good enough!
18-
# - brew update
19-
# - brew outdated python2 || brew upgrade python2
20-
- pip install virtualenv
21-
- virtualenv env -p python2
22-
- source env/bin/activate
8+
- "3.7"
9+
- "3.8"
2310
install:
2411
- pip install -r test/requirements.txt
2512
before_script:

manic/repository_svn.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,8 @@ def xml_status_is_dirty(svn_output):
220220
continue
221221
if item == SVN_UNVERSIONED:
222222
continue
223-
else:
224-
is_dirty = True
225-
break
223+
is_dirty = True
224+
break
226225
return is_dirty
227226

228227
# ----------------------------------------------------------------

manic/sourcetree.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,20 @@ def status(self, relative_path_base=LOCAL_PATH_INDICATOR):
299299
for comp in load_comps:
300300
printlog('{0}, '.format(comp), end='')
301301
stat = self._all_components[comp].status()
302+
stat_final = {}
302303
for name in stat.keys():
303304
# check if we need to append the relative_path_base to
304305
# the path so it will be sorted in the correct order.
305-
if not stat[name].path.startswith(relative_path_base):
306-
stat[name].path = os.path.join(relative_path_base,
307-
stat[name].path)
308-
# store under key = updated path, and delete the
309-
# old key.
310-
comp_stat = stat[name]
311-
del stat[name]
312-
stat[comp_stat.path] = comp_stat
313-
summary.update(stat)
306+
if stat[name].path.startswith(relative_path_base):
307+
# use as is, without any changes to path
308+
stat_final[name] = stat[name]
309+
else:
310+
# append relative_path_base to path and store under key = updated path
311+
modified_path = os.path.join(relative_path_base,
312+
stat[name].path)
313+
stat_final[modified_path] = stat[name]
314+
stat_final[modified_path].path = modified_path
315+
summary.update(stat_final)
314316

315317
return summary
316318

0 commit comments

Comments
 (0)