pub async fn dataset_metadata_update(
        &self,
        name: impl AsRef<str>,
        path: Option<PathBuf>,
    ) -> anyhow::Result<serde_json::Value> {
        let name = name.as_ref();
        let metadata = if let Some(path) = path {
            Self::read_dataset_metadata_file(path).await?
        } else {
            let (owner_slug, dataset_slug) = self.get_user_and_identifier_slug(name)?;
            Self::read_dataset_metadata_file(
                self.download_dir
                    .join(format!("datasets/{}/{}", owner_slug, dataset_slug)),
            )
            .await?
        };

        let settings = metadata.into();
        Ok(self.metadata_post(name, &settings).await?)
    }
/// Update the metadata for a dataset
Update the metadata for a dataset
Update the metadata for a dataset
pub async fn dataset_metadata_update(
        &self,
        name: impl AsRef<str>,
        path: Option<PathBuf>,
    ) -> anyhow::Result<serde_json::Value> {
        let name = name.as_ref();
        let metadata = if let Some(path) = path {
            Self::read_dataset_metadata_file(path).await?
        } else {
            let (owner_slug, dataset_slug) = self.get_user_and_identifier_slug(name)?;
            Self::read_dataset_metadata_file(
                self.download_dir
                    .join(format!("datasets/{}/{}", owner_slug, dataset_slug)),
            )
            .await?
        };
        let settings = metadata.into();
        Ok(self.metadata_post(name, &settings).await?)
    }
pub async fn dataset_metadata_update ( & self , name : impl AsRef < str > , path : Option < PathBuf > , ) -> anyhow :: Result < serde_json :: Value > { let name = name . as_ref ( ) ; let metadata = if let Some ( path ) = path { Self :: read_dataset_metadata_file ( path ) . await ? } else { let ( owner_slug , dataset_slug ) = self . get_user_and_identifier_slug ( name ) ? ; Self :: read_dataset_metadata_file ( self . download_dir . join ( format ! ( " " owner_slug dataset_slug ) ) , ) . await ? } ; let settings = metadata . into ( ) ; Ok ( self . metadata_post ( name , & settings ) . await ? ) }
Update the metadata for a dataset
Update the metadata for a dataset
&self
name
impl AsRef<str>
path
Option<PathBuf>
&self
name
impl AsRef<str>
path
Option<PathBuf>