MetOffice / CATNIP

Climate Analysis Tool: Now In Python
Other
5 stars 2 forks source link

remove the bug and update flake8 #144 #151

Closed zmaalick closed 3 years ago

zmaalick commented 3 years ago

_run_alltests.sh passes the [TEST SUIT COMPLETE] checks but reports on failure and two warnings:

_Checking documentation ... make[1]: Entering directory `/net/home/h04/ssadri/git-repos/CATNIP/docsrc' sphinx-build -b html -d _build/doctrees . _build/html Running Sphinx v2.4.0 loading pickled environment... failed failed: build environment version not current building [mo]: targets for 0 po files that are out of date building [html]: targets for 3 source files that are out of date updating environment: [new config] 3 added, 0 changed, 0 removed reading sources... [100%] tools /net/home/h04/ssadri/git-repos/CATNIP/lib/catnip/analysis.py:docstring of catnip.analysis.wind_direction:15: WARNING: Unexpected indentation. /net/home/h04/ssadri/git-repos/CATNIP/lib/catnip/visualisation.py:docstring of catnip.visualisation.vectorplot:9: WARNING: Unexpected indentation. looking for now-outdated files... none found pickling environment... done

I am also getting to untracked files after running the tests, not sure if these are needed or should be added in the ignore list! _Untracked files: (use "git add ..." to include in what will be committed)

docs/_static/jquery-3.4.1.js
docsrc/_build/html/_static/jquery-3.4.1.js_

The final tests are all passed here. Doc test report showing two warnings - that seems like caused by black. (I will test it) There is a pickle load failure in the beginning but over build succeeded with two warnings:

checking consistency... done preparing documents... done writing output... [100%] tools
generating indices... genindex py-modindexdone writing additional pages... searchdone copying images... [100%] images/rcm_rot_vs_unrot.png
copying static files... ... done copying extra files... done dumping search index in English (code: en)... done dumping object inventory... done build succeeded, 2 warnings.

try ignoring the untracked files (I am not been able to add or commit it)

balazagi commented 3 years ago

Also after running the tests the git status reveals: modified: lib/catnip/utils.py modified: lib/catnip/visualisation.py

but these changes are not consistent with the a0b57e3 commit to this branch

zmaalick commented 3 years ago

Strange, I haven't got at my system. Can you check the exact different? using git diff?

Thanks


From: saeed sadri notifications@github.com Sent: 25 September 2020 09:59 To: MetOffice/CATNIP CATNIP@noreply.github.com Cc: Maalick, Zubair zubair.maalick@metoffice.gov.uk; Author author@noreply.github.com Subject: Re: [MetOffice/CATNIP] remove the bug and update flake8 #144 (#151)

Also after running the tests the git status reveals: modified: lib/catnip/utils.py modified: lib/catnip/visualisation.py

but these changes are not consistent with the a0b57e3https://github.com/MetOffice/CATNIP/pull/151/commits/a0b57e3ea4db4c825e22dfebb50cf5f162307f12 commit to this branch

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MetOffice/CATNIP/pull/151#issuecomment-698812416, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN2CPNFFIUJOMMVZRJXECHLSHRLWHANCNFSM4RYYQWMA.

balazagi commented 3 years ago

Strange, I haven't got at my system. Can you check the exact different? using git diff? Thanks ____ From: saeed sadri notifications@github.com Sent: 25 September 2020 09:59 To: MetOffice/CATNIP CATNIP@noreply.github.com Cc: Maalick, Zubair zubair.maalick@metoffice.gov.uk; Author author@noreply.github.com Subject: Re: [MetOffice/CATNIP] remove the bug and update flake8 #144 (#151) Also after running the tests the git status reveals: modified: lib/catnip/utils.py modified: lib/catnip/visualisation.py but these changes are not consistent with the a0b57e3<a0b57e3> commit to this branch — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<#151 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN2CPNFFIUJOMMVZRJXECHLSHRLWHANCNFSM4RYYQWMA.

this is what I get

git diff lib/catnip/utils.py
diff --git a/lib/catnip/utils.py b/lib/catnip/utils.py
index cd9c1a5..4b144e9 100644
--- a/lib/catnip/utils.py
+++ b/lib/catnip/utils.py
@@ -130,9 +130,7 @@ calendar='360_day')
     if start_time >= end_time:
         raise ValueError(
             "No common time period. Start time ({}) is later than or the "
-            "same as end time({})".format(
-                str(start_time), str(end_time)
-            )
+            "same as end time({})".format(str(start_time), str(end_time))
         )

     # string of start and end dates
@@ -904,8 +902,9 @@ def umstash_2_pystash(stash):
             raise TypeError("{} must be a string".format(scode))
         if len(scode) > 5:
             raise IndexError(
-                "stash item is {}. Stash items must be no longer than 5 characters"
-                .format(scode)
+                "stash item is {}. Stash items must be no longer than 5 characters".format(
+                    scode
+                )
             )
         if not scode.isdigit():
             raise AttributeError(

And

git diff lib/catnip/visualisation.py
diff --git a/lib/catnip/visualisation.py b/lib/catnip/visualisation.py
index 670024d..ae04087 100644
--- a/lib/catnip/visualisation.py
+++ b/lib/catnip/visualisation.py
@@ -32,6 +32,7 @@

 import matplotlib
+
 matplotlib.use("Agg")
 import matplotlib.pyplot as plt
 import iris.quickplot as qplt