Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make changelog and ee dep file errors into warnings #220

Merged
merged 1 commit into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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