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

Feature suggestion: .cartaignore file #1334

Open
lh-astro opened this issue Aug 1, 2023 · 4 comments
Open

Feature suggestion: .cartaignore file #1334

lh-astro opened this issue Aug 1, 2023 · 4 comments

Comments

@lh-astro
Copy link

lh-astro commented Aug 1, 2023

Some directories can sometimes be very crowded with files not intentioned to view in CARTA. It might be useful to defines two ignore settings/files in a similar way as the popular .gitignore file which can be used to hide files in the CARTA file browser:

  1. A global ".cartaignore" file or setting within the CARTA interface and
  2. a local .cartaignore file in the respective directory, which overwrites the global setting.

In addition the CARTA file browser could have a button or key shortcut the toggle between the ignore state.

@Jordatious
Copy link

Hey @lh-astro, this is an interesting idea, and I can see how this could be useful! Would you want to include image files that are readable by CARTA (FITS, CASA, etc) in your .cartaignore file(s)? If you didn't know, you can change how CARTA generates the file list in your global preferences (see attached), where "Filter by extension" will only list image files readable by CARTA based on their extension, which I think in the case of CASA (and miriad?) files is based on the directory contents. But including legitimate image files that you want to ignore sounds useful as well!
image

@veggiesaurus
Copy link
Collaborator

@confluence this looks similar to the issue we were discussing yesterday

@confluence
Copy link
Collaborator

This sounds like a good idea. Our use case can be solved with a per-directory file, but for this use case it would be more useful to define defaults in a single central location (a git-like model). I think it makes sense for a per-directory .cartaignore to override the global settings.

The question is:

  1. where to put this global per-user file (the location should be immutable and accessible to the user both on SDM and UDM)
  2. how easy it would be for us to resolve and match paths against patterns in a global file (rather than just per-directory) -- perhaps something like this package?

I considered the starting directory, but that should be able to have its own local .cartaignore which should not double as global config, and also the starting directory varies depending on how the backend is launched. Off the top of my head, the most consistent and appropriate place would be a .carta/cartaignore, but SDM users don't have access to local config like this. Is there a more sensible location for user preferences that would work for an SDM install?

@kswang1029 kswang1029 transferred this issue from CARTAvis/carta Nov 28, 2023
@veggiesaurus
Copy link
Collaborator

veggiesaurus commented Nov 28, 2023

but SDM users don't have access to local config like this. Is there a more sensible location for user preferences that would work for an SDM install?

My feeling is that SDM users would manage things using a per-directory cartaignore file. As an example, a user might create a .cartaignore file in a shared directory, masking out the logs directory and all .log files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Icebox
Status: Icebox
Development

No branches or pull requests

4 participants