Skip to content

Commit

Permalink
Updates to pyproject.toml and some formatting clean-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
bltravis committed Nov 7, 2023
1 parent c89c2fc commit dc6a7f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "folio_migration_tools"
version = "1.8.3"
version = "1.8.4"
description = "A tool allowing you to migrate data from legacy ILS:s (Library systems) into FOLIO LSP"
authors = ["Theodor Tolstoy <github.teddes@tolstoy.se>", "Lisa Sjögren", "Brooks Travis", "Jeremy Nelson"]
license = "MIT"
Expand Down Expand Up @@ -33,7 +33,7 @@ profile = "black"

[tool.poetry.dependencies]
python = "^3.9"
folioclient = "^0.50.1"
folioclient = "^0.60.0"
pyhumps = "^3.7.3"
defusedxml = "^0.7.1"
python-dateutil = "^2.8.2"
Expand Down
8 changes: 5 additions & 3 deletions src/folio_migration_tools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ def main():
try:
i18n.load_config(
Path(
environ.get(
"FOLIO_MIGRATION_TOOLS_I18N_CONFIG_BASE_PATH"
) or args.base_folder_path) / "i18n_config.py")
environ.get("FOLIO_MIGRATION_TOOLS_I18N_CONFIG_BASE_PATH")
or args.base_folder_path
)
/ "i18n_config.py"
)
except i18n.I18nFileLoadError:
i18n.load_config(Path(__file__).parent / "i18n_config.py")
i18n.set("locale", args.report_language)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ def remove_from_id_map(self, former_ids: List[str]):
if former_id in self.id_map:
del self.id_map[former_id]

def create_entity(self, entity_mappings, marc_field: Field, entity_parent_key, index_or_legacy_id):
def create_entity(
self, entity_mappings, marc_field: Field, entity_parent_key, index_or_legacy_id
):
entity = {}
parent_schema_prop = self.schema.get("properties", {}).get(entity_parent_key, {})
if parent_schema_prop.get("type", "") == "array":
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules_mapper_bibs_no_folio.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_create_entity_empty_props(mapper: BibsRulesMapper):
Subfield(code="a", value="De Geer, Jan,"),
Subfield(code="d", value="1918-2007"),
Subfield(code="0", value="280552"),
Subfield(code="9", value="someid")
Subfield(code="9", value="someid"),
],
)
entity = mapper.create_entity(entity_mappings, marc_field, "contributors", "apa")
Expand Down

0 comments on commit dc6a7f2

Please sign in to comment.