Skip to content

Commit 8c71d1d

Browse files
authored
Update documentation regarding nox tasks and PYTHONPATH (#199)
1 parent 0a514bf commit 8c71d1d

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

doc/changes/unreleased.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88

99
* #162: Updated templates for GitHub workflows to inherit secrets by default
1010
* #52: Add support for caching python dependencies in GitHub workflows
11+
12+
## 📚 Documentation
13+
* Updated information about nox tasks and `PYTHONPATH` setup

doc/faq.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _faq_toolbox:
2+
3+
:octicon:`question` FAQ
4+
=======================
5+
6+
7+
.. _faq_no_module_noxconfig:
8+
9+
No Module Named 'noxconfig'
10+
---------------------------
11+
12+
The error, :code:`ModuleNotFoundError: No module named 'noxconfig'`, often appears on systems such as Fedora, where the current path may not be included in the :code:`PYTHONPATH`. This issue is elaborated upon at https://fedoraproject.org/wiki/Changes/PythonSafePath. Accordingly, it may be necessary to correctly set the :code:`PYTHONPATH` before initiating nox, as our nox tasks anticipate the `noxconfig` module to be located within the python path.
13+
14+
There are several methods to configure your shell:
15+
16+
1. For a one-time setup: :code:`PYTHONPATH=\`pwd\` nox -s task`
17+
2. For a general setup: :code:`export PYTHONPATH=`pwd``
18+
3. Alternatively, tools like `direnv <https://direnv.net>`_ can be used.

doc/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Documentation of the Exasol-Toolbox
4343

4444
Document outlining the architectural and design principles and decisions in this project.
4545

46+
.. grid-item-card:: :octicon:`question` FAQ
47+
:link: faq_toolbox
48+
:link-type: ref
49+
50+
Frequently asked questsions.
51+
4652

4753
.. toctree::
4854
:maxdepth: 1
@@ -53,6 +59,7 @@ Documentation of the Exasol-Toolbox
5359
tools
5460
github_actions/github_actions
5561
api
62+
faq
5663
changes/changelog
5764

5865

doc/user_guide/getting_started.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ forward and you just can use the example *noxfile.py* bellow.
6969

7070
.. literalinclude:: ../../noxfile.py
7171
:language: python3
72+
:end-before: # entry point for debugging
73+
74+
75+
.. attention::
76+
77+
Keep in mind that the current path may not be included in the :code:`PYTHONPATH`, depending on the operating system you are using. This is explained in more detail in this resource: https://fedoraproject.org/wiki/Changes/PythonSafePath. Thus, it might be necessary to properly set the :code:`PYTHONPATH` before running nox. This is because our nox tasks expect the `noxconfig` module to be located within the python path.
78+
79+
For additional information on resolving this issue, please :ref:`refer to <faq_no_module_noxconfig>`.
80+
81+
7282

7383
6. Setup the pre-commit hooks
7484
+++++++++++++++++++++++++++++

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# default actions to be run if nothing is explicitly specified with the -s option
88
nox.options.sessions = ["fix"]
99

10-
10+
# entry point for debugging
1111
def main() -> None:
1212
"""
1313
This excerpt was taken from nox.__main__.py. Generally, users should invoke Nox using the CLI provided by the Nox package.

0 commit comments

Comments
 (0)