Skip to content
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
12 changes: 6 additions & 6 deletions doc/tutorial-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Then clone the ``requests`` project
.. code-block:: console

$ cd projects
$ git clone git@github.com:requests/requests.git
$ git clone https://github.com/requests/requests.git
$ cd ..


Expand All @@ -77,7 +77,7 @@ For example:

.. code-block:: console

$ python -m import_deps projects/requests/requests/models.py
$ python -m import_deps projects/requests/src/requests/models.py
requests._internal_utils
requests.auth
requests.compat
Expand Down Expand Up @@ -107,7 +107,7 @@ For example, a trivial task to execute the script above and save its output into
def task_imports():
return {
'actions': ['python -m import_deps '
'projects/requests/requests/models.py > requests.models.deps'],
'projects/requests/src/requests/models.py > requests.models.deps'],
}


Expand Down Expand Up @@ -200,10 +200,10 @@ file_dep

.. code-block:: console

$ touch projects/requests/requests/models.py
$ touch projects/requests/src/requests/models.py
$ doit
-- imports
$ echo "# comment" >> projects/requests/requests/models.py
$ echo "# comment" >> projects/requests/src/requests/models.py
$ doit
. imports

Expand Down Expand Up @@ -355,7 +355,7 @@ metadata and state (whether it is up-to-date or not).
status : up-to-date

file_dep :
- projects/requests/requests/models.py
- projects/requests/src/requests/models.py

targets :
- requests.models.deps
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/tuto_1_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def task_imports():
"""find imports from a python module"""
return {
'file_dep': ['projects/requests/requests/models.py'],
'file_dep': ['projects/requests/src/requests/models.py'],
'targets': ['requests.models.deps'],
'actions': ['python -m import_deps %(dependencies)s > %(targets)s'],
'clean': True,
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/tuto_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_imports(module_path):

def task_imports():
"""find imports from a python module"""
module_path = 'projects/requests/requests/models.py'
module_path = 'projects/requests/src/requests/models.py'
return {
'file_dep': [module_path],
'actions': [(get_imports, [module_path])],
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/tuto_1_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_imports(pkg_modules, module_path):

def task_imports():
"""find imports from a python module"""
base_path = pathlib.Path('projects/requests/requests')
base_path = pathlib.Path('projects/requests/src/requests')
pkg_modules = ModuleSet(base_path.glob('**/*.py'))
for name, module in pkg_modules.by_name.items():
yield {
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/tuto_1_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}


base_path = pathlib.Path('projects/requests/requests')
base_path = pathlib.Path('projects/requests/src/requests')
PKG_MODULES = ModuleSet(base_path.glob('**/*.py'))


Expand Down