anesthetic icon indicating copy to clipboard operation
anesthetic copied to clipboard

pass labels argument through when reading chains

Open AdamOrmondroyd opened this issue 2 years ago • 3 comments

I noticed that labels isn't passed along in the same way as columns when reading chains.

AdamOrmondroyd avatar Sep 16 '22 16:09 AdamOrmondroyd

Codecov Report

Merging #232 (d6ae643) into master (fffa42e) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #232   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines         2271      2276    +5     
=========================================
+ Hits          2271      2276    +5     
Impacted Files Coverage Δ
anesthetic/read/cobaya.py 100.00% <100.00%> (ø)
anesthetic/read/getdist.py 100.00% <100.00%> (ø)
anesthetic/read/multinest.py 100.00% <100.00%> (ø)
anesthetic/read/polychord.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Sep 16 '22 16:09 codecov[bot]

I can, guess I should get used to it (I've always preferred ", as I find myself much more often needing an apostrophe than quotation marks in a string)

@williamjameshandley should I switch to ' in other PRs? Thinking of the **kwargs PolyChord interface in particular

AdamOrmondroyd avatar Oct 12 '22 21:10 AdamOrmondroyd

I can, guess I should get used to it (I've always preferred ", as I find myself much more often needing an apostrophe than quotation marks in a string)

There is no rule about this, PEP8 takes a mostly neutral stance, except saying to avoid escaping with backslashes. However, I think there is somewhat of a community consensus (take e.g. the votes on this stackexchange answer) which I try to follow where

  • double quotes " are used for text, e.g. in print statements, warnings or error messages (which accommodates the use of apostrophes...),
  • single quotes ' are used for single characters, dictionary keywords or other identifiers such as bins='auto' in histograms.

So that is what I'd suggest to go with. While I am open to other suggestions, I am strongly in favour of some form of consistency, so seeing 'columns' and "labels" in successive rows seems wrong to me...

lukashergt avatar Oct 13 '22 07:10 lukashergt