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

[FIX] skip .git and few other files / directory during validation #63

Merged
merged 3 commits into from
Jul 9, 2024

Conversation

Remi-Gau
Copy link
Contributor

@Remi-Gau Remi-Gau commented Jul 9, 2024

Also comes with some refactoring.

  • http server is launched outside of the validate_dir function
  • validate_dir now works recursively by:
    1. validating files in a folder
    2. listing directories to validate in that folder and running itself on each.
  • list of folders / files to validate automatically exclude a specific list of files / folders

Comment on lines 8 to 9
DIR_TO_SKIP = [".git", "__pycache__", "env", "venv"]
FILES_TO_SKIP = [".DS_Store", ".gitignore", ".flake8", ".autorc", "LICENSE"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure we need to add more or actually remove some...

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Jul 9, 2024

Note that we may get into this weird behavior where validation return "x conforms" even if all files are skipped.

Possible improvement in another PR: run validation on ALL files and only report ALL errors content at the end. As a user I found it annoying to only get errors one after the other when validating large amounts of files.

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Jul 9, 2024

FYI: could run it directly on the whole repo of reproschema-library and cobidas_schema.

@djarecka
Copy link
Member

djarecka commented Jul 9, 2024

thank you, this looks good! Should I merge it or you want to add the exclude parameter?

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Jul 9, 2024

let's keep the PR small and add more features in follow up PR, if the current set up has too much friction.

@djarecka djarecka merged commit dd4ea02 into ReproNim:main Jul 9, 2024
7 checks passed
@Remi-Gau Remi-Gau deleted the fix/62 branch October 8, 2024 12:40
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.

Update validation to exclude .git files when validating directories
2 participants