Closed jmarshrossney closed 3 years ago
I think we can add a default_style
property to the sampling app class
if you add an init file like this to style
import pathlib
defaultstyle = pathlib.Path(__file__).with_name('anvil.mplstyle')
then you can import it. You might need to double check that the style gets properly installed by pip install
in a fresh env, it might require adding to the package_data in setup.py
something like *.mplstyle
works in a fresh env without modifying setup.py, but good to check.
Ah, it would appear not.. I think the behaviour is different if you use the actual install or the development install. In the latter you symlink to the git directory so the file will be present, but the point is if I were to fresh install and run pip install .
then it wouldn't copy the file
yeah I spoke too soon, whoops. Though I'm a little confused - the "development install" is when we do pip install .
..? So this is what I did and it works ok. Am I right to say the problem is with the "normal" install?
The development is when we use the -e
option https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-e
ah!
I appreciate both could be viewed as development installs - apologies for not being clear. I suppose I would call them binary install (through conda), manual install (pip install), development install (-e option) but that's completely my convention not universal haha
Ok let's try this again.
No need to apologise. On a positive note, if we make the documentation clear enough for me to understand I think it would qualify as "accessible" which is probably what we want!
Yeah, I'll open an issue!
Ok, I don't understand that last error. Do we need an extra package?
I don't either - everything passes in ~20s when I run locally, in a fresh env with pip install .
.
I wonder if it's the fonts. I've used the STIX family because normal text matches the style of equations. Let me remove and re-check.
Added a .mplstyle file to produce plots that look consistent with the style used in our paper.
Also made some minor changes to existing figures and added a simple histogram for the magnetization. (I'll make a separate PR for bigger additions to plots - hopefully this histogram is sufficiently inoffensive that it doesn't distract from the main topic).
Currently one needs to use an extra arg
anvil-sample --style style/anvil.mplstyle
because I haven't decided/figured out whether/how to override the reportengine default (which I think is just the matplotlib default).