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

Ignore hidden files when parsing for components #286

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Conversation

treo
Copy link
Contributor

@treo treo commented Feb 5, 2024

Description

If someone has mac resource files around (usually starting with ._), the parsing of components crashes.

As we don't support hidden files as python files anyway, this change introduces a filter to skip any file that starts with ..

References

  • None

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

1. Reproduction Test

1. Create a file called `._foo.py` in a component directory and make it a invalid python file, ideally with some random binary data
2. Without Change: Notice that component list can't be loaded anymore
3. With Change: Notice things continue to work

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

If someone has mac resource files around (usually starting with `._`), the parsing of components crashes. 

As we don't support hidden files as python files anyway, this change introduces a filter to skip any file that starts with `.`.
@treo treo requested a review from MFA-X-AI February 5, 2024 12:34
Copy link
Member

@MFA-X-AI MFA-X-AI left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Looks like there's a bug in the jupyterlab 4.1.0 release, I've updated our dependency to use 4.0.x for now.
Otherwise, thing look good. Merging~

@MFA-X-AI MFA-X-AI merged commit 68651b1 into master Feb 5, 2024
8 checks passed
@MFA-X-AI MFA-X-AI deleted the treo-patch-1 branch February 5, 2024 16:07
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.

2 participants