Skip to content

Commit

Permalink
Create CLI to manage, check, and patch data
Browse files Browse the repository at this point in the history
  • Loading branch information
wblondel committed Jan 15, 2021
1 parent 08c4895 commit 8c4b8d1
Show file tree
Hide file tree
Showing 25 changed files with 591 additions and 115 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Source CSV and ZIP files
data/source/csv/*
!data/source/csv/.gitkeep
data/source/zip/*
!data/source/zip/.gitkeep

# Corrected CSV and GZ files
data/corrected/csv/*
!data/corrected/csv/.gitkeep
data/corrected/gz/*
!data/corrected/gz/.gitkeep

tests
__pycache__
.idea
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
click = "~=7.1"
more-itertools = "~=8.6"
regex = "~=2020.11.13"

[dev-packages]

[requires]
python_version = "3.9"
84 changes: 84 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions data-prep/.gitignore

This file was deleted.

18 changes: 0 additions & 18 deletions data-prep/00-1-source-files-download.py

This file was deleted.

19 changes: 0 additions & 19 deletions data-prep/00-2-source-files-extract.py

This file was deleted.

14 changes: 0 additions & 14 deletions data-prep/01-1-source-to-corrected.py

This file was deleted.

17 changes: 0 additions & 17 deletions data-prep/01-2-apply-patches-to-corrected

This file was deleted.

17 changes: 0 additions & 17 deletions data-prep/01-3-corrected-compress.py

This file was deleted.

18 changes: 0 additions & 18 deletions data-prep/01-4-create-patches

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TOO SLOW
# REALLY TOO SLOW

from pathlib import Path
import subprocess
Expand Down
17 changes: 17 additions & 0 deletions insee-deaths-manager/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import click

from cli_check import cli_check
from cli_manage import cli_manage
from cli_patch import cli_patch


@click.group()
def cli():
pass


if __name__ == '__main__':
cli.add_command(cli_check)
cli.add_command(cli_manage)
cli.add_command(cli_patch)
cli()
Loading

0 comments on commit 8c4b8d1

Please sign in to comment.