Skip to content

Google compliant option with -gc. Header Reference, Logos. Fixes #775, #594 , #564 , #563, #555 , #597 , #725 , #610#888

Open
juanjemdIos wants to merge 24 commits intoKnowledgeCaptureAndDiscovery:devfrom
juanjemdIos:master
Open

Google compliant option with -gc. Header Reference, Logos. Fixes #775, #594 , #564 , #563, #555 , #597 , #725 , #610#888
juanjemdIos wants to merge 24 commits intoKnowledgeCaptureAndDiscovery:devfrom
juanjemdIos:master

Conversation

@juanjemdIos
Copy link
Contributor

555 Solved in previous commits
725 dockerile parse solved previosly.
610 type in documentation solved previously

"programmingLanguage",
"releaseNotes",
"releaseDate"
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move this to constants

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added to constants with a small comment:

Schema.org properties accepted by Google for software metadata.

Any property not in this set will be prefixed as codemeta.

Just for -gc or --google_codemeta_out flag

SCHEMA_ORG_PROPERTIES = {
"@type",
.......

Copy link
Collaborator

@dgarijo dgarijo left a comment

Choose a reason for hiding this comment

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

Please see my comments


if constants.CAT_REQUIREMENTS in repo_data:
structured_sources = ["pom.xml", "requirements.txt", "setup.py", "environment.yml"]
structured_sources = ["pom.xml", "requirements.txt", "setup.py", "environment.yml", "pyproject.toml"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be declared in the constants, not buried here

if "affiliation" in result_owner and result_owner["affiliation"]:
author_obj["affiliation"] = result_owner["affiliation"]
if "email" in result_owner and result_owner["email"]:
author_obj["email"] = result_owner["email"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

The strings "email", "affiliation" etc should also be in constants. For example constants.PROP_AUTH_NAME

if "username" in result_maint and result_maint["username"]:
maint_obj["identifier"] = result_maint["username"]
if "email" in result_maint and result_maint["email"]:
maint_obj["email"] = result_maint["email"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

return "SoftwareSourceCode"
if "system" in t:
return "SoftwareSystem"
return "SoftwareApplication"
Copy link
Collaborator

Choose a reason for hiding this comment

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

All these strings should be categories in constants

if value_type == "Release":
return value

if value_type == "Url":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use constants for values (URL, releases)

"reference design",
"reference to this repository",
"reference to this library",
"reference in your project",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the one above. Remove it


# false positives for bibliographic citations
if category == constants.CAT_CITATION:
negative_patterns = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

negative patterns should be in constants

if user_info.get("company"):
maintainer_data["affiliation"] = user_info.get("company")
if user_info.get("email"):
maintainer_data["email"] = user_info.get("email")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, all the constants should be in constants

readme_source = "README.md"


print("Extracting regular expressions...")
Copy link
Collaborator

Choose a reason for hiding this comment

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

No prints. Add it to the log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants