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

Consider a catalog-update command to update assets specifically #431

Closed
jsheunis opened this issue Mar 5, 2024 · 0 comments
Closed

Consider a catalog-update command to update assets specifically #431

jsheunis opened this issue Mar 5, 2024 · 0 comments
Labels
wontfix This will not be worked on

Comments

@jsheunis
Copy link
Member

jsheunis commented Mar 5, 2024

Currently, running catalog-create --force on an existing catalog will overwrite a bunch of files:

https://github.com/datalad/datalad-catalog/blob/main/datalad_catalog/webcatalog.py#L78-L106

        # Create package-related paths/content
        if not (self.metadata_path.exists() and self.metadata_path.is_dir()):
            Path(self.metadata_path).mkdir(parents=True)
        content_paths = {
            "assets": cnst.catalog_path / "assets",
            "artwork": cnst.catalog_path / "artwork",
            "html": cnst.catalog_path / "index.html",
            "readme": cnst.catalog_path / "README.md",
            "schema": cnst.catalog_path / "schema",
            "templates": cnst.catalog_path / "templates",
        }
        out_dir_paths = {
            "assets": Path(self.location) / "assets",
            "artwork": Path(self.location) / "artwork",
            "html": Path(self.location) / "index.html",
            "readme": Path(self.location) / "README.md",
            "schema": Path(self.location) / "schema",
            "templates": Path(self.location) / "templates",
        }
        for key in content_paths:
            copy_overwrite_path(
                src=content_paths[key], dest=out_dir_paths[key], overwrite=force
            )
        # Copy / write config file
        self.write_config(force)
        # Reset STATE and SCHEMA
        self.is_valid_catalog = self.is_created()
        self.schema_store = self.get_schema_store()
        self.schema_validator = self.get_schema_validator()

But this is not always desired. Often, only updates related specifically to the javascript and html components are needed, and one would want to specify this.

A catalog-update command could form the basis of new functionality to specify updates more granularly. Or otherwise the existing -create can be amended to include such functionality.

@mslw it would be great if you can share your experience in terms of what you typically want to achieve when updating a catalog (not its metadata), and how the existing commands and complexities currently prevent you form achieving that.

@jsheunis jsheunis added the wontfix This will not be worked on label Jun 7, 2024
@jsheunis jsheunis closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant