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

Paths are hard to understand #64

Open
ledm opened this issue Nov 14, 2022 · 0 comments
Open

Paths are hard to understand #64

ledm opened this issue Nov 14, 2022 · 0 comments

Comments

@ledm
Copy link
Collaborator

ledm commented Nov 14, 2022

There are several places in paths, where it's not clear where code, working directories, and so on live. It would be better to simply use a "work_dir", "image_dir", like ESMValTool path in the user config settings.

At the moment, we general paths from combining several paths, and it's not obvious:

    root_dir = _normalize_path(jasmin_paths["general"]["root_dir"])
    user = getuser()
    shelves_dir = jasmin_paths["general"]["shelvedir"]
    data_dir = jasmin_paths["general"]["ModelFolder_pref"]
    jasmin_paths["general"]["shelvedir"] = os.path.join(
        root_dir,
        data_dir,
        user,
        shelves_dir
    )
    p2p_dir = jasmin_paths["general"]["p2p_ppDir"]
    jasmin_paths["general"]["p2p_ppDir"] = os.path.join(
        root_dir,
        data_dir,
        p2p_dir
    )
    images_dir = jasmin_paths["general"]["imagedir"]
    jasmin_paths["general"]["imagedir"] = os.path.join(
        root_dir,
        data_dir, user,
        images_dir
    )

(from bgcval2/_runtime_config.py)
Also in: bgcval2/Paths/paths.py

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

No branches or pull requests

1 participant