Skip to content

Commit

Permalink
Fix pydantic versioning problem for _base_attrs
Browse files Browse the repository at this point in the history
Fix encoding in rdf file
  • Loading branch information
JosePizarro3 committed Jan 23, 2025
1 parent d7d8072 commit d5d7444
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bam_masterdata/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def export_to_rdf(force_delete, python_path):
# Saving RDF/XML to file
rdf_output = graph.serialize(format="pretty-xml")
masterdata_file = os.path.join(export_dir, "masterdata.owl")
with open(masterdata_file, "w") as f:
with open(masterdata_file, "w", encoding="utf-8") as f:
f.write(rdf_output)

click.echo(
Expand Down
3 changes: 2 additions & 1 deletion bam_masterdata/metadata/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def _base_attrs(self) -> list:
if not (
attr_name.startswith("_")
or callable(cls_attrs[attr_name])
or attr_name in ["defs", "model_config"]
or attr_name
in ["defs", "model_config", "model_fields", "model_computed_fields"]
)
]
return [getattr(self, attr_name) for attr_name in base_attrs]
Expand Down

1 comment on commit d5d7444

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
bam_masterdata
   logger.py80100% 
bam_masterdata/cli
   cli.py824949 40%
   entities_to_excel.py5433 94%
   entities_to_json.py3655 86%
   entities_to_rdf.py635353 16%
   fill_masterdata.py188175175 7%
bam_masterdata/datamodel
   collection_types.py370100% 
   dataset_types.py184184184 0%
   object_types.py15150100% 
   property_types.py8000100% 
   vocabulary_types.py137210100% 
bam_masterdata/metadata
   definitions.py850100% 
   entities.py883030 66%
bam_masterdata/openbis
   get_entities.py534343 19%
   login.py633 50%
bam_masterdata/utils
   utils.py4277 83%
TOTAL1696255297% 

Tests Skipped Failures Errors Time
65 1 💤 0 ❌ 0 🔥 19.202s ⏱️

Please sign in to comment.