-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/pdct 1399 Add skeleton for GCF document mapping (#7)
- Loading branch information
Showing
4 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import Any, Optional | ||
|
||
import click | ||
|
||
|
||
def document(debug: bool) -> list[Optional[dict[str, Any]]]: | ||
"""Map the GCF document info to new structure. | ||
:param bool debug: Whether debug mode is on. | ||
:return list[Optional[dict[str, Any]]]: A list of GCF families in | ||
the 'destination' format described in the GCF Data Mapper Google | ||
Sheet. | ||
""" | ||
if debug: | ||
click.echo("📝 Wrangling GCF document data.") | ||
|
||
return [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "gcf-data-mapper" | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
description = "A CLI tool to wrangle GCF data into format recognised by the bulk-import tool." | ||
authors = ["CPR-dev-team <[email protected]>"] | ||
license = "Apache-2.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import pytest | ||
|
||
from gcf_data_mapper.parsers.document import document | ||
|
||
|
||
@pytest.mark.parametrize("debug", [True, False]) | ||
def test_returns_empty(debug: bool): | ||
document_data = document(debug) | ||
assert document_data == [] |