@@ -67,37 +67,69 @@ cite this package as
6767Installation
6868------------ 
6969
70+ Windows, macOS (non-Arm64), Linux
71+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
72+ 
7073The preferred method is to use `Miniconda Python 
7174<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
7275and install from the "conda-forge" channel of Conda packages.
7376
74- To add  "conda-forge" to the conda channels, run  the following in a terminal.  ::
77+ Add the  "conda-forge" channel by running  the following command  in a terminal:  ::
7578
7679        conda config --add channels conda-forge 
7780
78- We want to install our packages in a suitable conda environment.
79- The following creates and activates a new environment named ``diffpy.pdfgui_env `` ::
81+ Create a new environment named ``diffpy.pdfgui_env `` and install ``diffpy.pdfgui ``: ::
8082
8183        conda create -n diffpy.pdfgui_env diffpy.pdfgui 
84+ 
85+ Activate the environment: ::
86+ 
8287        conda activate diffpy.pdfgui_env 
8388
84- To confirm  that the installation was successful, type  ::
89+ Confirm  that the installation was successful:  ::
8590
8691        python -c "import diffpy.pdfgui; print(diffpy.pdfgui.__version__)" 
8792
88- The output should print the latest version displayed on the badges above.
93+ macOS (Arm64)
94+ ~~~~~~~~~~~~~ 
95+ 
96+ Create a new conda environment ``diffpy.pdfgui_env ``: ::
97+ 
98+         conda create -n diffpy.pdfgui_env python=3.13 
99+ 
100+ Activate the environment: ::
101+ 
102+         conda activate diffpy.pdfgui_env 
103+ 
104+ It is necessary to get versions of pdffit2 built for Mac from Python package index (Pypi).  To install
105+ pdffit2 from Pypi using ``pip `` to download and install the latest version from `Python Package Index  <https://pypi.python.org >`_: ::
106+ 
107+         pip install diffpy.pdffit2 
108+ 
109+ Confirm that the installation was successful: ::
110+ 
111+         python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)" 
112+ 
113+ Now we want to install PDFgui from conda-forge
114+ 
115+         conda install diffpy.pdfgui
116+ 
117+ 
118+ Build from source
119+ ~~~~~~~~~~~~~~~~~ 
89120
90- If the above does not work, you can use ``pip `` to download and install the latest release from
91- `Python Package Index  <https://pypi.python.org >`_.
92- To install using ``pip `` into your ``diffpy.pdfgui_env `` environment, type ::
121+ For advanced users, obtain the source archive, and in the ``diffpy.pdffit2 `` directory, run ::
93122
94-         pip install diffpy.pdfgui 
123+         conda create -n diffpy.pdffit2_env python=3.13 \ 
124+                 --file requirements/test.txt \ 
125+                 --file requirements/conda.txt \ 
126+                 --file requirements/build.txt 
95127
96- If you prefer to install from sources, after installing the dependencies, obtain the source archive from
97- `GitHub  <https://github.com/diffpy/diffpy.pdfgui/ >`_. Once installed, ``cd `` into your ``diffpy.pdfgui `` directory
98- and run the following ::
128+ Activate the environment, build the package, and run unit tests by following commands sequentially: ::
99129
100-         pip install . 
130+         conda activate diffpy.pdffit2_env 
131+         pip install . --no-deps 
132+         pytest 
101133
102134Getting Started
103135--------------- 
0 commit comments