@@ -67,37 +67,69 @@ cite this package as
67
67
Installation
68
68
------------
69
69
70
+ Windows, macOS (non-Arm64), Linux
71
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72
+
70
73
The preferred method is to use `Miniconda Python
71
74
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html> `_
72
75
and install from the "conda-forge" channel of Conda packages.
73
76
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: ::
75
78
76
79
conda config --add channels conda-forge
77
80
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 ``: ::
80
82
81
83
conda create -n diffpy.pdfgui_env diffpy.pdfgui
84
+
85
+ Activate the environment: ::
86
+
82
87
conda activate diffpy.pdfgui_env
83
88
84
- To confirm that the installation was successful, type ::
89
+ Confirm that the installation was successful: ::
85
90
86
91
python -c "import diffpy.pdfgui; print(diffpy.pdfgui.__version__)"
87
92
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
+ ~~~~~~~~~~~~~~~~~
89
120
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 ::
93
122
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
95
127
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: ::
99
129
100
- pip install .
130
+ conda activate diffpy.pdffit2_env
131
+ pip install . --no-deps
132
+ pytest
101
133
102
134
Getting Started
103
135
---------------
0 commit comments