### Install Lenstronomy with virtualenvwrapper Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md If you use virtualenvwrapper, create a new environment and then install lenstronomy within it. ```bash mkvirtualenv lenstronomy pip install lenstronomy ``` -------------------------------- ### Install FASTELL for PEMD model Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Install the FASTELL package, required for the PEMD lens model, by cloning the repository and running the setup script. A Fortran compiler is necessary. ```bash sudo apt-get install gfortran git clone https://github.com/sibirrer/fastell4py.git cd python setup.py install --user ``` -------------------------------- ### Install Local lenstronomy Version Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Install your local version of lenstronomy in development mode, making it accessible to Python. ```bash cd lenstronomy python setup.py develop --user ``` -------------------------------- ### Install Lenstronomy using pip Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Use this command to install the latest stable release of lenstronomy from the Python Package Index. ```bash pip install lenstronomy ``` -------------------------------- ### Check Lenstronomy installation with pytest Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Verify your lenstronomy installation by running the full test suite using pytest in the repository directory. ```bash cd py.test ``` -------------------------------- ### Install Lenstronomy using conda-forge Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Install the latest lenstronomy release from the conda-forge channel into your active conda environment. ```bash conda install -c conda-forge lenstronomy ``` -------------------------------- ### Configure Lenstronomy with NUMBA Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Create a custom configuration file for NUMBA JIT compilation settings. Ensure the path is correct for your system. ```bash ~/.conf/lenstronomy/config.yaml ``` -------------------------------- ### Set Upstream for First Push Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Link your local feature branch to the remote fork for the initial push. ```bash git push --set-upstream origin ``` -------------------------------- ### Run partial Lenstronomy tests Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Execute a specific subset of tests, such as those for the LensModel module, by providing the path to the test file. ```bash cd py.test/test/test_LensModel/ ``` -------------------------------- ### Run Lenstronomy tests with tox Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/installation.md Use tox to run tests within a virtual environment, which can help isolate dependencies and ensure compatibility. Note potential issues with PyMultiNest. ```bash cd tox ``` -------------------------------- ### Clone lenstronomy Repository Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Clone your forked repository to create a local copy for development. ```bash git clone https://github.com//lenstronomy.git ``` -------------------------------- ### Create Feature Branch Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Create a new branch from the lenstronomyproject main branch to work on your feature. ```bash git fetch lenstronomyproject git checkout -b lenstronomyproject/main ``` -------------------------------- ### Commit Changes Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Stage and commit your changes to the feature branch with a descriptive message. ```bash git add file_containing_your_contribution git commit -m 'Your clear and descriptive commit message' ``` -------------------------------- ### Add lenstronomyproject Remote Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Add the official lenstronomy repository as a remote to fetch upstream changes. ```bash cd lenstronomy git remote add lenstronomyproject https://github.com/lenstronomy/lenstronomy.git ``` -------------------------------- ### Import Lenstronomy Library Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/usage.md This is the basic import statement required to use the lenstronomy library in your Python projects. ```python import lenstronomy ``` -------------------------------- ### Push Feature Branch Source: https://github.com/lenstronomy/lenstronomy/blob/main/docs/contributing.md Push your feature branch to your remote fork on GitHub. Use --set-upstream for the first push. ```bash git push origin ``` ```bash git push --set-upstream origin ``` -------------------------------- ### Push Feature Branch Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Push your feature branch to your remote fork on GitHub. ```bash git push origin ``` -------------------------------- ### Merge lenstronomy Main Branch Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Update your feature branch by merging the latest changes from the lenstronomyproject main branch. ```bash git fetch lenstronomyproject git merge lenstronomyproject/main ``` -------------------------------- ### Rebase Feature Branch Source: https://github.com/lenstronomy/lenstronomy/blob/main/CONTRIBUTING.rst Update your feature branch by rebasing it onto the latest lenstronomy main branch. Use with caution on pushed commits. ```bash git fetch lenstronomyproject git rebase lenstronomyproject/main ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.