Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the bug and update flake8 #144 #151

Merged
merged 1 commit into from
Sep 25, 2020
Merged

Conversation

zmaalick
Copy link
Contributor

No description provided.

Copy link
Contributor

@balazagi balazagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run_all_tests.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.vector_plot: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_

@zmaalick
Copy link
Contributor Author

run_all_tests.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.vector_plot: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
Copy link
Contributor

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
Copy link
Contributor Author

zmaalick commented Sep 25, 2020 via email

@balazagi
Copy link
Contributor

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

Copy link
Contributor

@balazagi balazagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed approve this for now and we investigate and address the issue before the final merge into develop

@zmaalick zmaalick merged commit 0f6d617 into develop Sep 25, 2020
@zmaalick zmaalick deleted the hotfix_numpy_i144 branch September 25, 2020 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants