Skip to content

removed quiet in favour of verbose#2055

Merged
orbeckst merged 1 commit intodevelopfrom
issue-1975-nomorequiet
Sep 21, 2018
Merged

removed quiet in favour of verbose#2055
orbeckst merged 1 commit intodevelopfrom
issue-1975-nomorequiet

Conversation

@richardjgowers
Copy link
Copy Markdown
Member

@richardjgowers richardjgowers commented Aug 22, 2018

Fixes #1975 #1979
Starts #1463

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@richardjgowers richardjgowers force-pushed the issue-1975-nomorequiet branch from 627eeff to 578014b Compare August 22, 2018 20:47
@orbeckst
Copy link
Copy Markdown
Member

That fails with some _set_verbose still being used somewhere.

@richardjgowers richardjgowers force-pushed the issue-1975-nomorequiet branch 2 times, most recently from cc9100c to 274b4e2 Compare August 31, 2018 15:17
@orbeckst
Copy link
Copy Markdown
Member

You need to merge or rebase against develop because #2066 was "fixed".

@orbeckst
Copy link
Copy Markdown
Member

@richardjgowers I rebase this branch against develop and force-pushed. Be careful with your next git pull.

@richardjgowers richardjgowers force-pushed the issue-1975-nomorequiet branch 2 times, most recently from 9a43259 to b92b502 Compare September 13, 2018 21:44
@richardjgowers richardjgowers added this to the 0.19.0 milestone Sep 13, 2018
@richardjgowers
Copy link
Copy Markdown
Member Author

Ok I still need to

  • check if/where we refer to start/stop/step in docs
  • check existing usage of start/stop/step in tests etc
  • add tests for the new deprecations
  • check I got verbose right

deps.append(arg)
setattr(self, arg, kwargs[arg])
if deps:
raise ValueError(deps)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've made this a VE so that I can find all deprecated usages in the testsuite, will remove later..

"""
if not self._calculated:
self.run()
self.run(start=start, stop=stop, step=step)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this seems to cause errors. Are run and transform meant to be allowed to use different frames? @kain88-de

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes. You may first compute the transformation and then apply it to an arbitrary trajectory to project out the motions corresponding to the PCs.

I can't think of a clean way to separate them here so instead of running self.run() rather raise the error and let the user do it explicitly. Also makes for much clearer scripts on the user side.

Needs to be documented in the CHANGELOG and with a

.. versionchanged 0.19.0:: 
   :meth:`transform` does not automatically :meth:`run` the PCA if needed; instead 
   it raises :exc:`ValueError` to remind the user to perform :meth:`run` first.

Copy link
Copy Markdown
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

comments on PCA; @kain88-de and @jdetle – feel free to correct me.

"""
if not self._calculated:
self.run()
self.run(start=start, stop=stop, step=step)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes. You may first compute the transformation and then apply it to an arbitrary trajectory to project out the motions corresponding to the PCs.

I can't think of a clean way to separate them here so instead of running self.run() rather raise the error and let the user do it explicitly. Also makes for much clearer scripts on the user side.

Needs to be documented in the CHANGELOG and with a

.. versionchanged 0.19.0:: 
   :meth:`transform` does not automatically :meth:`run` the PCA if needed; instead 
   it raises :exc:`ValueError` to remind the user to perform :meth:`run` first.

@jdetle
Copy link
Copy Markdown
Contributor

jdetle commented Sep 14, 2018

I have no memory of this place

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2018

Codecov Report

Merging #2055 into develop will increase coverage by 0.01%.
The diff coverage is 82.81%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2055      +/-   ##
===========================================
+ Coverage    89.33%   89.34%   +0.01%     
===========================================
  Files          159      159              
  Lines        18729    18712      -17     
  Branches      2684     2684              
===========================================
- Hits         16731    16719      -12     
+ Misses        1396     1387       -9     
- Partials       602      606       +4
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 97.56% <ø> (ø) ⬆️
package/MDAnalysis/analysis/density.py 64.94% <ø> (ø) ⬆️
package/MDAnalysis/analysis/helanal.py 85.24% <100%> (-0.05%) ⬇️
package/MDAnalysis/analysis/rms.py 90.66% <100%> (-0.36%) ⬇️
package/MDAnalysis/analysis/waterdynamics.py 81.13% <100%> (+0.19%) ⬆️
...ckage/MDAnalysis/analysis/hbonds/hbond_analysis.py 80.64% <100%> (+0.18%) ⬆️
package/MDAnalysis/analysis/diffusionmap.py 90.62% <100%> (ø) ⬆️
package/MDAnalysis/lib/log.py 97.7% <100%> (-0.22%) ⬇️
package/MDAnalysis/core/universe.py 95.04% <100%> (-0.02%) ⬇️
...age/MDAnalysis/analysis/hbonds/wbridge_analysis.py 86.45% <71.42%> (+0.46%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 259f778...21843d3. Read the comment docs.

@richardjgowers
Copy link
Copy Markdown
Member Author

@orbeckst this is hopefully finished

Copy link
Copy Markdown
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Looking good, thanks for all the work. Just update the CHANGELOG, please.

* PCA.transform now requires that PCA.run has already been called (PR #2055)

Deprecations
* Almost all "save()", "save_results()", "save_table()" methods in
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

add start/stop/step deprecations here

enforced to be of the form ``[lx, ly, lz, alpha, beta, gamma]`` as required
by the docs (Issue #2046, PR #2048)
* Added periodic keyword to select_atoms (#759)
* PCA.transform now requires that PCA.run has already been called (PR #2055)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

add start/stop/step in run() here

enforced to be of the form ``[lx, ly, lz, alpha, beta, gamma]`` as required
by the docs (Issue #2046, PR #2048)
* Added periodic keyword to select_atoms (#759)
* PCA.transform now requires that PCA.run has already been called (PR #2055)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add removal of quiet here

enforced to be of the form ``[lx, ly, lz, alpha, beta, gamma]`` as required
by the docs (Issue #2046, PR #2048)
* Added periodic keyword to select_atoms (#759)
* PCA.transform now requires that PCA.run has already been called (PR #2055)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add: PCA.transform now requires that run has been called before, otherwise aValueError is raised.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2018

Codecov Report

Merging #2055 into develop will increase coverage by 0.04%.
The diff coverage is 90.62%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2055      +/-   ##
===========================================
+ Coverage    89.33%   89.37%   +0.04%     
===========================================
  Files          159      159              
  Lines        18729    18712      -17     
  Branches      2684     2684              
===========================================
- Hits         16731    16724       -7     
+ Misses        1396     1384      -12     
- Partials       602      604       +2
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 97.56% <ø> (ø) ⬆️
package/MDAnalysis/analysis/density.py 64.94% <ø> (ø) ⬆️
package/MDAnalysis/analysis/helanal.py 85.24% <100%> (-0.05%) ⬇️
package/MDAnalysis/analysis/rms.py 90.66% <100%> (-0.36%) ⬇️
package/MDAnalysis/analysis/waterdynamics.py 81.13% <100%> (+0.19%) ⬆️
...ckage/MDAnalysis/analysis/hbonds/hbond_analysis.py 80.64% <100%> (+0.18%) ⬆️
package/MDAnalysis/analysis/diffusionmap.py 90.62% <100%> (ø) ⬆️
package/MDAnalysis/lib/log.py 97.7% <100%> (-0.22%) ⬇️
package/MDAnalysis/core/universe.py 95.04% <100%> (-0.02%) ⬇️
...age/MDAnalysis/analysis/hbonds/wbridge_analysis.py 86.45% <71.42%> (+0.46%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 259f778...21843d3. Read the comment docs.

3 similar comments
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2018

Codecov Report

Merging #2055 into develop will increase coverage by 0.04%.
The diff coverage is 90.62%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2055      +/-   ##
===========================================
+ Coverage    89.33%   89.37%   +0.04%     
===========================================
  Files          159      159              
  Lines        18729    18712      -17     
  Branches      2684     2684              
===========================================
- Hits         16731    16724       -7     
+ Misses        1396     1384      -12     
- Partials       602      604       +2
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 97.56% <ø> (ø) ⬆️
package/MDAnalysis/analysis/density.py 64.94% <ø> (ø) ⬆️
package/MDAnalysis/analysis/helanal.py 85.24% <100%> (-0.05%) ⬇️
package/MDAnalysis/analysis/rms.py 90.66% <100%> (-0.36%) ⬇️
package/MDAnalysis/analysis/waterdynamics.py 81.13% <100%> (+0.19%) ⬆️
...ckage/MDAnalysis/analysis/hbonds/hbond_analysis.py 80.64% <100%> (+0.18%) ⬆️
package/MDAnalysis/analysis/diffusionmap.py 90.62% <100%> (ø) ⬆️
package/MDAnalysis/lib/log.py 97.7% <100%> (-0.22%) ⬇️
package/MDAnalysis/core/universe.py 95.04% <100%> (-0.02%) ⬇️
...age/MDAnalysis/analysis/hbonds/wbridge_analysis.py 86.45% <71.42%> (+0.46%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 259f778...21843d3. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2018

Codecov Report

Merging #2055 into develop will increase coverage by 0.04%.
The diff coverage is 90.62%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2055      +/-   ##
===========================================
+ Coverage    89.33%   89.37%   +0.04%     
===========================================
  Files          159      159              
  Lines        18729    18712      -17     
  Branches      2684     2684              
===========================================
- Hits         16731    16724       -7     
+ Misses        1396     1384      -12     
- Partials       602      604       +2
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 97.56% <ø> (ø) ⬆️
package/MDAnalysis/analysis/density.py 64.94% <ø> (ø) ⬆️
package/MDAnalysis/analysis/helanal.py 85.24% <100%> (-0.05%) ⬇️
package/MDAnalysis/analysis/rms.py 90.66% <100%> (-0.36%) ⬇️
package/MDAnalysis/analysis/waterdynamics.py 81.13% <100%> (+0.19%) ⬆️
...ckage/MDAnalysis/analysis/hbonds/hbond_analysis.py 80.64% <100%> (+0.18%) ⬆️
package/MDAnalysis/analysis/diffusionmap.py 90.62% <100%> (ø) ⬆️
package/MDAnalysis/lib/log.py 97.7% <100%> (-0.22%) ⬇️
package/MDAnalysis/core/universe.py 95.04% <100%> (-0.02%) ⬇️
...age/MDAnalysis/analysis/hbonds/wbridge_analysis.py 86.45% <71.42%> (+0.46%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 259f778...21843d3. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2018

Codecov Report

Merging #2055 into develop will increase coverage by 0.04%.
The diff coverage is 90.62%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2055      +/-   ##
===========================================
+ Coverage    89.33%   89.37%   +0.04%     
===========================================
  Files          159      159              
  Lines        18729    18712      -17     
  Branches      2684     2684              
===========================================
- Hits         16731    16724       -7     
+ Misses        1396     1384      -12     
- Partials       602      604       +2
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 97.56% <ø> (ø) ⬆️
package/MDAnalysis/analysis/density.py 64.94% <ø> (ø) ⬆️
package/MDAnalysis/analysis/helanal.py 85.24% <100%> (-0.05%) ⬇️
package/MDAnalysis/analysis/rms.py 90.66% <100%> (-0.36%) ⬇️
package/MDAnalysis/analysis/waterdynamics.py 81.13% <100%> (+0.19%) ⬆️
...ckage/MDAnalysis/analysis/hbonds/hbond_analysis.py 80.64% <100%> (+0.18%) ⬆️
package/MDAnalysis/analysis/diffusionmap.py 90.62% <100%> (ø) ⬆️
package/MDAnalysis/lib/log.py 97.7% <100%> (-0.22%) ⬇️
package/MDAnalysis/core/universe.py 95.04% <100%> (-0.02%) ⬇️
...age/MDAnalysis/analysis/hbonds/wbridge_analysis.py 86.45% <71.42%> (+0.46%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 259f778...21843d3. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 18, 2018

Codecov Report

Merging #2055 into develop will increase coverage by 0.01%.
The diff coverage is 90.62%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2055      +/-   ##
===========================================
+ Coverage    89.35%   89.37%   +0.01%     
===========================================
  Files          159      159              
  Lines        18729    18712      -17     
  Branches      2684     2684              
===========================================
- Hits         16736    16724      -12     
+ Misses        1392     1384       -8     
- Partials       601      604       +3
Impacted Files Coverage Δ
package/MDAnalysis/analysis/contacts.py 97.56% <ø> (ø) ⬆️
package/MDAnalysis/analysis/density.py 64.94% <ø> (ø) ⬆️
package/MDAnalysis/analysis/helanal.py 85.24% <100%> (-0.05%) ⬇️
package/MDAnalysis/analysis/rms.py 90.66% <100%> (-0.36%) ⬇️
package/MDAnalysis/analysis/waterdynamics.py 81.13% <100%> (+0.19%) ⬆️
...ckage/MDAnalysis/analysis/hbonds/hbond_analysis.py 80.64% <100%> (+0.18%) ⬆️
package/MDAnalysis/analysis/diffusionmap.py 90.62% <100%> (ø) ⬆️
package/MDAnalysis/lib/log.py 97.7% <100%> (-0.22%) ⬇️
package/MDAnalysis/core/universe.py 95.04% <100%> (-0.02%) ⬇️
...age/MDAnalysis/analysis/hbonds/wbridge_analysis.py 86.45% <71.42%> (+0.46%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55e7475...00cf3b7. Read the comment docs.

@orbeckst
Copy link
Copy Markdown
Member

orbeckst commented Sep 20, 2018

@richardjgowers all that is needed are doc/CHANGELOG additions. Then you'll have fixed two issues! (<🥕 dangle/>)

@richardjgowers
Copy link
Copy Markdown
Member Author

richardjgowers commented Sep 21, 2018 via email

updated usage of Analysis API, start/stop/step
now deprecated in __init__ and should be given in run method

made PCA setup respect start frame more,
if start is given then initial weights are from that frame
not frame 0
@orbeckst orbeckst merged commit 8918d42 into develop Sep 21, 2018
@orbeckst orbeckst deleted the issue-1975-nomorequiet branch September 21, 2018 18:15
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.

3 participants