|
| 1 | +============ |
| 2 | +Installation |
| 3 | +============ |
| 4 | + |
| 5 | +Prerequisites |
| 6 | +------------- |
| 7 | + |
| 8 | +Install `Anaconda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_. |
| 9 | + |
| 10 | +After conda is installed, at the commnad line:: |
| 11 | + |
| 12 | + conda config --append channels nsls2forge |
| 13 | + conda config --append channels conda-forge |
| 14 | + |
| 15 | +(Optional) Get the .whl file of `PDFgetX <https://www.diffpy.org/products/pdfgetx.html>`_. This package is used |
| 16 | +to transform the XRD data to PDF data. |
| 17 | + |
| 18 | +General Installation |
| 19 | +-------------------- |
| 20 | + |
| 21 | +Users can install the `pdfstream` using conda. It is suggested to create a new environment for it. |
| 22 | + |
| 23 | +At the command line:: |
| 24 | + |
| 25 | + conda create -n pdfstream_env -c st3107 pdfstream |
| 26 | + |
| 27 | +The ``pdfstream_env`` in the command is the name of the environment. It can be changed to any name. |
| 28 | + |
| 29 | +Activate the environment:: |
| 30 | + |
| 31 | + conda activate pdfstream_env |
| 32 | + |
| 33 | +(Optional) Install the `diffpy.pdfgetx` using .whl file:: |
| 34 | + |
| 35 | + python -m pip install <path to .whl file> |
| 36 | + |
| 37 | +Change the ``<path to .whl file>`` to the path of the .whl file on your computer. |
| 38 | + |
| 39 | +Before using the `pdfstream`, remember to activate the environment:: |
| 40 | + |
| 41 | + conda activate pdfstream_env |
| 42 | + |
| 43 | +Development Installation |
| 44 | +------------------------ |
| 45 | + |
| 46 | +**Fork** and clone the github repo and change the current directory:: |
| 47 | + |
| 48 | + git clone https://github.com/<your account>/pdfstream |
| 49 | + |
| 50 | +Remember to change ``<your account>`` to the name of your github account. |
| 51 | + |
| 52 | +Change directory:: |
| 53 | + |
| 54 | + cd pdfstream |
| 55 | + |
| 56 | +Create an environment with all the requirements:: |
| 57 | + |
| 58 | + conda create -n pdfstream_env --file requirements/build.txt --file requirements/run.txt --file requirements/test.txt |
| 59 | + |
| 60 | +(Optional) For the maintainer, install the packages for building documents and releasing the software:: |
| 61 | + |
| 62 | + conda install -n pdfstream_env --file requirements/docs.txt --file requirements/release.txt |
| 63 | + |
| 64 | +Activate the environment:: |
| 65 | + |
| 66 | + conda activate pdfstream_env |
| 67 | + |
| 68 | +Install the `diffpy.pdfgetx` using .whl file:: |
| 69 | + |
| 70 | + python -m pip install <path to .whl file> |
| 71 | + |
| 72 | +Install the `twine` for pypi release:: |
| 73 | + |
| 74 | + python -m pip install twine |
| 75 | + |
| 76 | +Change the ``<path to .whl file>`` to the path of the .whl file on your computer. |
| 77 | + |
| 78 | +Install the `pdfstream` in development mode:: |
| 79 | + |
| 80 | + python -m pip install -e . |
| 81 | + |
0 commit comments