From 0676f81b283c6f4992bbee46faa6b9459ccdf026 Mon Sep 17 00:00:00 2001 From: mmckerns Date: Sat, 14 Jan 2023 16:35:17 -0500 Subject: [PATCH] pypi can't use relative paths --- README.md | 21 ++++++++++++++------- version.py | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0dfa390..88dbb55 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ About Pygrace ``pygrace`` ``Project`` objects are used to construct and save ``xmgrace`` project files (.agr). ``Project`` files capture the state of a ``xmgrace`` session, including the figures, settings, and current variables. -![pygrace project](docs/source/_static/crow_diagram.png) +![pygrace project](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/crow_diagram.png) A more detailed diagram of all the attributes of ``pygrace`` template objects can be found at https://github.com/uqfoundation/pygrace/blob/master/docs/diagrams/diagram.pdf, while a handy cheatsheet of the methods and attributes of each ``pygrace`` template class can be found at https://github.com/uqfoundation/pygrace/blob/master/docs/diagrams/cheatsheet.pdf. This cheatsheet can be dynamically generated through use of the ``write_cheatsheet`` method, available from the ``Project`` class. @@ -52,6 +52,13 @@ Installation It is assumed ``xmgrace`` is already installed and on the user's ``$PATH``. ``xmgrace`` is available at: https://plasma-gate.weizmann.ac.il/pub/grace/src/ +Alternately, ``xmgrace`` typically can be installed with most package managers. For example:: + + $ apt-get install grace # on Linux + $ brew install grace # on MacOS + +Installing an Xserver from X.org (``xorg``, ``xorg-server``, ``xquartz``, or similar, depending on your operating system and package manager) is also required to open the ``xmgrace`` GUI. + Requirements ------------ @@ -93,7 +100,7 @@ then, open the project file with xmgrace:: $ xmgrace 00_helloworld.agr -![00_helloworld](docs/source/_static/00_helloworld.png) +![00_helloworld](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/00_helloworld.png) find out more about ``pygrace`` at http://pygrace.rtfd.io or browse some more of the examples at https://github.com/uqfoundation/pygrace/tree/master/examples. @@ -102,14 +109,14 @@ for example:: $ python 05_colorplot.py $ xmgrace 05_colorplot.agr -![05_colorplot](docs/source/_static/05_colorplot.png) +![05_colorplot](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/05_colorplot.png) and:: $ python 08_latexlabels.py $ xmgrace 08_latexlabels.agr -![08_latexlabels](docs/source/_static/08_latexlabels.png) +![08_latexlabels](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/08_latexlabels.png) we can also work in an interactive xmgrace session:: @@ -123,7 +130,7 @@ use xmgrace methods directly from the python interpreter:: >>> x = np.arange(21) * np.pi/10 >>> pg.plot(x, np.sin(x)) -![sin](docs/source/_static/sin.png) +![sin](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/sin.png) push variables into xmgrace and interact with the xmgrace scripting language:: @@ -132,7 +139,7 @@ push variables into xmgrace and interact with the xmgrace scripting language:: >>> pg.eval('s0 line color 2') >>> pg.eval('plot(x,y)') -![cos](docs/source/_static/cos.png) +![cos](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/cos.png) use the interactive xmgrace prompt:: @@ -146,7 +153,7 @@ use the interactive xmgrace prompt:: grace> redraw() grace> exit -![histoPlot](docs/source/_static/histoPlot.png) +![histoPlot](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/histoPlot.png) check variables in xmgrace session:: diff --git a/version.py b/version.py index d498d88..f48d91f 100644 --- a/version.py +++ b/version.py @@ -40,7 +40,7 @@ def get_readme_as_rst(filepath): README += line.replace('-','=') + '\n' elif line.startswith('!['): # image alt,img = line.split('](',1) - img = img.replace('docs/source/','') # make is in docs + img = img.split('docs/source/',1)[-1] # make is in docs README += '.. image:: ' + img.replace(')','') README += ' :alt: ' + alt.replace('![','') + '\n' #elif ')[http' in line: # alt text link (`text `_)