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

lint_er.py: if there's no metadata folder, script doesn't run til the end #18

Open
hshiue opened this issue Aug 21, 2023 · 3 comments
Open

Comments

@hshiue
Copy link
Contributor

hshiue commented Aug 21, 2023

functions with "metadata_path.iterdir()" would throw FileNotFoundError because the metadata path doesn't exist.

@nkrabben
Copy link
Collaborator

nkrabben commented Aug 21, 2023

Since we allow empty metadata folders, maybe the simplest solution is to put in an empty metadata folder when this happens.

Otherwise, something like

def metadata_folder_has_one_or_less_file(package: Path) -> bool:
should return True if the metadata folder is missing.

Maybe we should add a block to all metadata folders like this

if not metadata_path.exists():
    logging.info('no metadata folder'
    return True

Although that would be pretty repetitive.

The other option is to put some more logic in lint_package that first tests if a metadata folder exists and then chooses which functions to run.

@hshiue
Copy link
Contributor Author

hshiue commented Aug 21, 2023 via email

@nkrabben
Copy link
Collaborator

Edited my response, since my first idea was nonsensical

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

No branches or pull requests

2 participants