Example on how to run manage.sh import_snapshot #74210

Open
opened 2020-02-25 19:28:33 +01:00 by Francesco Siddi · 3 comments

Johan suggests:

Also, an example for manage.sh import_snapshot would be nice to have in DEVELOP.md.

Does it want a zipfile (tried it, no workie), a JSONL, something else?

Johan suggests: > Also, an example for `manage.sh import_snapshot` would be nice to have in DEVELOP.md. > > Does it want a zipfile (tried it, no workie), a JSONL, something else?
Sem Mulder was assigned by Francesco Siddi 2020-02-25 19:28:33 +01:00
Author
Owner

Added subscriber: @fsiddi

Added subscriber: @fsiddi

Added subscriber: @Walles

Added subscriber: @Walles

Running ./manage.py import_snapshot --help gives:

usage: manage.py import_snapshot [-h] [--legacy-format] [--version]
                                 [-v {0,1,2,3}] [--settings SETTINGS]
                                 [--pythonpath PYTHONPATH] [--traceback]
                                 [--no-color] [--force-color]
                                 snapshot

Imports an Open Data snapshot

positional arguments:
  snapshot              a .jsonl file to import

optional arguments:
  -h, --help            show this help message and exit
  --legacy-format       assume the dump is in legacy format
  --version             show program's version number and exit
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.

So it needs a JSONL file. Also note the --legacy-format flag (any dump from last month should be alright).

Also, an example for manage.sh import_snapshot would be nice to have in DEVELOP.md.

Agreed. Maybe we can put an example in ./manage.py import_snapshot --help and point to that in DEVELOP.md.

Running `./manage.py import_snapshot --help` gives: ``` usage: manage.py import_snapshot [-h] [--legacy-format] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color] snapshot Imports an Open Data snapshot positional arguments: snapshot a .jsonl file to import optional arguments: -h, --help show this help message and exit --legacy-format assume the dump is in legacy format --version show program's version number and exit -v {0,1,2,3}, --verbosity {0,1,2,3} Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output --settings SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used. --pythonpath PYTHONPATH A directory to add to the Python path, e.g. "/home/djangoprojects/myproject". --traceback Raise on CommandError exceptions --no-color Don't colorize the command output. --force-color Force colorization of the command output. ``` So it needs a JSONL file. Also note the `--legacy-format` flag (any dump from last month should be alright). > Also, an example for manage.sh import_snapshot would be nice to have in `DEVELOP.md`. Agreed. Maybe we can put an example in `./manage.py import_snapshot --help` and point to that in `DEVELOP.md`.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/blender-open-data#74210
No description provided.