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: bad symlink and add checks #640

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ jobs:
&& !cancelled()
run: |
make check_links
make check_symlinks

# Make sure all necessary steps passed. For build-docs and determinism steps, we only check for
# non-failures as the 'changed-files-in-pr' step might skip them
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ spcc:
PCC_DEPS := check_python_format check_finalize_nb python_linting mypy_ci pydocstyle shell_lint
PCC_DEPS += check_version_coherence check_licenses check_nbqa check_supported_ops
PCC_DEPS += check_refresh_notebooks_list check_refresh_use_cases_list check_mdformat
PCC_DEPS += check_unused_images check_utils_use_case gitleaks
PCC_DEPS += check_unused_images check_utils_use_case gitleaks check_symlinks

.PHONY: pcc_internal
pcc_internal: $(PCC_DEPS)
Expand Down Expand Up @@ -798,3 +798,12 @@ check_utils_use_case:
.PHONY: update_encrypted_dataframe # Update encrypted data-frame's development files
update_encrypted_dataframe:
poetry run python ./script/make_utils/update_encrypted_dataframe_files.py

.PHONY: check_symlinks # Check that no utils.py are found in use_case_examples
check_symlinks:
Copy link
Collaborator

Choose a reason for hiding this comment

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

needs to be added in the CI or as a sub target of something we already launch, no?

Copy link
Collaborator

Choose a reason for hiding this comment

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

could be done in the - name: Check links step

if [[ -z $$(find . -xtype l -name abc) ]]; then \
echo "All symlinks point to exiting files"; \
else \
echo "Bad symlinks found: " && echo $$(find . -xtype l) && \
exit 1; \
fi
Loading