aiven-db-migrate icon indicating copy to clipboard operation
aiven-db-migrate copied to clipboard

Documentation issues

Open nickgsc opened this issue 4 years ago • 1 comments

A few things I'm noticing wrong with the docs, attempting to run this tool for the first time.

In order to run pip3 install . - there's a version file that is required that is generated by the make command, otherwise you get this nasty business:

    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/[email protected]/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mh/dl_8qr6531q1wgqvtmybs1nw0000gn/T/pip-req-build-zs25m8bd/setup.py'"'"'; __file__='"'"'/private/var/folders/mh/dl_8qr6531q1wgqvtmybs1nw0000gn/T/pip-req-build-zs25m8bd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/mh/dl_8qr6531q1wgqvtmybs1nw0000gn/T/pip-pip-egg-info-_5usqh3l
         cwd: /private/var/folders/mh/dl_8qr6531q1wgqvtmybs1nw0000gn/T/pip-req-build-zs25m8bd/
    Complete output (16 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/mh/dl_8qr6531q1wgqvtmybs1nw0000gn/T/pip-req-build-zs25m8bd/setup.py", line 31, in <module>
        version=get_version(),
      File "/private/var/folders/mh/dl_8qr6531q1wgqvtmybs1nw0000gn/T/pip-req-build-zs25m8bd/setup.py", line 10, in get_version
        return SourceFileLoader("version", "aiven_db_migrate/migrate/version.py").load_module().__version__
      File "<frozen importlib._bootstrap_external>", line 462, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 962, in load_module
      File "<frozen importlib._bootstrap_external>", line 787, in load_module
      File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 702, in _load
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 779, in exec_module
      File "<frozen importlib._bootstrap_external>", line 915, in get_code
      File "<frozen importlib._bootstrap_external>", line 972, in get_data
    FileNotFoundError: [Errno 2] No such file or directory: 'aiven_db_migrate/migrate/version.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Running the make command generates this file. Seems like if this is the intended process, this step should be included in the docs and migrate/version.py should probably also be in the .gitignore?

➜  aiven-db-migrate git:(master) ✗ make
echo "__version__ = \"0.0.1-13-g8a8bb0b\"" > aiven_db_migrate/migrate/version.py

The second issue in the docs is that the name of the module is incorrect:

➜  aiven-db-migrate git:(master) ✗ python3 -m aiven.migrate -h
/usr/local/opt/[email protected]/bin/python3.8: Error while finding module specification for 'aiven.migrate' (ModuleNotFoundError: No module named 'aiven')

This command does work for me instead (based on the path structure in the repo):

➜  aiven-db-migrate git:(master) ✗ python3 -m aiven_db_migrate.migrate -h
Available commands: pg

nickgsc avatar Oct 29 '20 21:10 nickgsc