Skip to content

Commit

Permalink
Make changelog and ee dep file errors into warnings (#220)
Browse files Browse the repository at this point in the history
No-Issue
  • Loading branch information
awcrosby committed May 24, 2023
1 parent 5581c62 commit 56a7c1a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions galaxy_importer/loaders/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,6 @@ def _check_ansible_test_ignore_files(self): # pragma: no cover

def _check_collection_changelog(self):
"""Log an error when a CHANGELOG file is not present in the root of the collection."""
CHANGELOG_ERROR = (
"No changelog found. "
"Add a CHANGELOG.rst, CHANGELOG.md, or changelogs/changelog.yaml file."
)

changelog_rst_path = os.path.join(self.path, "CHANGELOG.rst")
changelog_md_path = os.path.join(self.path, "CHANGELOG.md")
changelog_yaml_path = os.path.join(self.path, "changelogs/changelog.yaml")
Expand All @@ -198,7 +193,10 @@ def _check_collection_changelog(self):
and not os.path.exists(changelog_md_path)
and not os.path.exists(changelog_yaml_path)
):
self.log.error(CHANGELOG_ERROR)
self.log.warning(
"No changelog found. "
"Add a CHANGELOG.rst, CHANGELOG.md, or changelogs/changelog.yaml file."
)

def _check_ee_yml_dep_files(self): # pragma: no cover
"""Check for python deps file and system deps file if they are listed in
Expand All @@ -210,7 +208,7 @@ def _check_ee_yml_dep_files(self): # pragma: no cover
try:
python_deps, system_deps = introspect.process_collection(self.path)
except FileNotFoundError as e:
self.log.error(
self.log.warning(
f"Error when checking meta/execution-environment.yml for dependency files: {e}"
)

Expand Down

0 comments on commit 56a7c1a

Please sign in to comment.