INNER CODE UNIT · Python

copy_properties

intermine/intermine · config/lib/install_intermine.py:95

    def copy_properties(self, source_name: str, dest_name: str) -> None:
        dot_intermine_dir = os.path.join(Path.home(), ".intermine")
        os.makedirs(dot_intermine_dir, exist_ok=True)

        source_file = os.path.join(self.checkout, "config", source_name)
        dest_file = os.path.join(dot_intermine_dir, dest_name)

        if os.path.exists(dest_file):
            print(f"Skipping {dest_file} as it already exists")
            return

        with open(dest_file, "w") as f_out:
            f_out.write(
                "# FILE AUTOMATICALLY GENERATED FROM "
                f"{source_file}. DO NOT EDIT!\n"
            )
            with open(source_file) as f_in:
                for line in f_in:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…