Skip to content

Commit

Permalink
Set properly formatted fallback metadata values
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiSG committed May 5, 2024
1 parent 1ae4e05 commit 6a92272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openfisca_core/taxbenefitsystems/tax_benefit_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,16 +517,16 @@ def get_package_metadata(self) -> Dict[str, str]:
log.warn("Unable to load package metadata, exposing default metadata", e)
source_metadata = {
"Name": self.__class__.__name__,
"Version": "",
"Home-page": "",
"Version": "0.0.0",
"Home-page": "https://openfisca.org",
}

try:
source_file = inspect.getsourcefile(module)
location = source_file.split(package_name)[0].rstrip("/")
except Exception as e:
log.warn("Unable to load package source folder", e)
location = ""
location = "_unknown_"

repository_url = ""
if source_metadata.get("Project-URL"): # pyproject.toml metadata format
Expand Down

0 comments on commit 6a92272

Please sign in to comment.