Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev docs after setuptools update #37976

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions dev-docs/source/CLion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ To set up CMake:
#. Set the build directory to the ``build`` directory if it is not the default (you'll need to use the full path if its outside the source directory)
#. The configurations drop-down at the top should show all of the build targets. If not, the CMake project is probably not loaded. Go to ``File > Reload CMake Project``. The configurations should be populated

Additional Build Configuration
------------------------------
This (optional) additional configuration allows one to start Clion from the JetBrains Toolbox or
from a terminal without having to activate the conda environment in the terminal.
This is useful when you're working on both Mantid and other projects in CLion simultaneously.

#. Navigate to ``File > Settings > Build, Execution, Deployment > CMake``
#. Under ``environment``, add new environment variable ``CONDA_PREFIX`` with value ``/path/to/mambaforge/envs/mantid-developer``.
#. Navigate to ``File > Settings > Build, Execution, Deployment > Python Interpreter > Add Interpreter > Add Local Interpreter > Conda Environment > Use existing environment``, then select ``mantid-developer``.


Building with CLion
###################

Expand All @@ -119,23 +130,35 @@ Debugging with CLion

To debug workbench, you'll need to edit the ``workbench`` CMake Application configuration.

#. Set the executable to be the ``python.exe`` in your conda installation
#. Set the executable to be the ``python`` executable in your conda installation:

.. hlist::
:columns: 1

- On Linux: ``/path/to/mambaforge/envs/mantid-developer/bin/python.exe``
- On Linux & macOS: ``/path/to/mambaforge/envs/mantid-developer/bin/python``
- On Windows: ``/path/to/mambaforge/envs/mantid-developer/python.exe``

#. Set the program arguments
#. Set the program arguments:

.. hlist::
:columns: 1

- On Linux: ``workbench --single-process``
- On Windows: ``workbench-script.pyw --single-process``
- On Linux & macOS: ``workbench --single-process``
- On Windows: ``workbench --single-process``

#. Set the working directory:

.. hlist::
:columns: 1

- All OS: ``path/to/mambaforge/envs/md/bin/``

#. Set any relevant environment variables:

.. hlist::
:columns: 1

#. Set the working directory to be the full path to your ``build/bin`` directory
- On macOS: ``PYTHONPATH=${PYTHONPATH}:/full/path/to/build/bin/``

The ``--single-process`` flag is necessary for debugging. See the :ref:`Running Workbench <RunningWorkbench>` documentation for more information.

Expand Down
2 changes: 1 addition & 1 deletion dev-docs/source/PyCharm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Now that your Python development environment has been setup we can setup the deb
- Click the ``+`` icon top left
- Select Python
- Name it something to do with ``Workbench``
- In the ``Script Path:`` box, on Linux/MacOS enter the ``{BUILD}/bin/workbench`` Python script, on Windows enter ``{BUILD}/bin/DebugWithRelRuntime/workbench-script.pyw``, ``.pyw`` files will not appear in the search window as it only shows ``.py`` files, so you cannot search for it with the GUI.
- Click the down arrow next to ``Script path:`` and change the selection to ``Module name``. Set the ``Module name`` to ``workbench``.
- In the ``Parameters`` box add ``--single-process`` so that the multiprocess startup is disabled and breakpoints can be attached to the primary process. See the :ref:`Running Workbench <RunningWorkbench>` documentation for more information.
- In the ``Working directory:`` box, on Linux/MacOS enter the ``{BUILD}/bin`` directory, on Windows enter ``{BUILD}/bin/DebugWithRelRuntime`` directory.
- Ensure the ``Python Interpreter:`` box is set to use your ``(mantid-developer)`` Conda environment.
Expand Down
Loading