Skip to content

Commit

Permalink
Add faq and more tweaks to advanced
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Feb 5, 2024
1 parent 9dbab31 commit a5df462
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/topics/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
###
FAQ
###

1. How can I perform some debug logging within a code block?

You can simply import the logging module within a code block. For example:

.. code-block:: yaml
:linenos:

tools:
default:
cores: 2
mem: cores * 3
rules:
- if: True
execute: |
import logging
log = logging.getLogger(__name__)
log.debug(f"Here's what the entity looks like: {entity}")

2. How can I import custom libraries or code?

As long as the code is available within Galaxy's virtualenv or the python path,
it can be imported like any other package. For example:

.. code-block:: yaml
:linenos:

tools:
default:
cores: 2
mem: cores * 3
rules:
- if: True
execute: |
import my_custom_module
my_custom_module.my_func()

0 comments on commit a5df462

Please sign in to comment.