Skip to content

Deprecate every method in arkindex_cli.commands.export.db

Erwan Rouchet requested to merge deprecate-export-db into master

Closes #114 (closed)

This uses FutureWarning instead of DeprecationWarning, which is a little more violent. DeprecationWarning is ignored by default, unless something in __main__ triggers it, which is not the case as soon as any script imports another module. FutureWarning is shown by default, so it is louder:

λ arkindex export ~/dl/balsac-annotated-20230208-104815.sqlite csv --output lol.csv --parent a513feba-eef5-465d-bfc6-f389768507c6
/home/lucidiot/dev/ark/cli/arkindex_cli/commands/export/csv.py:152: FutureWarning: This method is deprecated. Please use the arkindex-export library instead: https://pypi.org/project/arkindex-export/
  elements = get_elements(database_path, parent, type, recursive)
/home/lucidiot/dev/ark/cli/arkindex_cli/commands/export/csv.py:58: FutureWarning: This method is deprecated. Please use the arkindex-export library instead: https://pypi.org/project/arkindex-export/
  element_img = element_image(database_path, item.id)
[17:09:29] INFO     Exported elements successfully written to /home/lucidiot/dev/ark/cli/lol.csv.           csv.py:207

I added a warnings.filterwarnings so that this screaming only happens when not running the CLI.

Merge request reports