Skip to content

Replace data space with workspace in docstrings #743

@cbkerr

Description

@cbkerr

New focus is on pinning down what "data space" means

#743 (comment)

Original issue description

Summary

Consider the following analogy: "The directory of the job's workspace is to job as the directory of the project's workspace is to project."
It is currently false!! Fixing this would break things, making it a good candidate for 2.0.

The fix would make the following analogies true:

  • "Job workspace is to job as project workspace is to project."
  • "Job directory is to job as project directory is to project"

Problem Details

What we have now is: "Directory of the job's workspace is to job as directory of the project is to project."
(If your head is spinning like mine was, read those again after reading the rest of the issue)

Some example usages in the documentation:

Here is an illustration of the problem. When developing dashboard, to display an image from a job or project, you need to get the job or project directory in a general way.
The way I found to do this was job_or_project.fn("") because currently the separate syntax is job.workspace() or project.root_directory(). Both are aliased to .path().

Solution

  1. Replace "job workspace", "job workspace directory", and job.workspace() with "job directory", or job.path() (also accessible with job.fn("")). The job directory is a directory containing files associated with a signac job.
    Currently job.workspace() is an alias for the job path. I prefer writing "job directory" rather than "job path" in the documentation, even if you would write job.path() in the code, because a directory is a container, which is a distinct concept from the path that identifies the container. This deprecation is announced in Additional deprecations #685.
  2. Reserve the word "workspace" as a directory containing directories and applies to entities that act like a signac project.

Schematic

# Current
project/                                       <-- the project directory
project/workspace/[jobid]/                     <-- the default, a job directory contained in project workspace


# What this enables in the future (aligning with what Vyas and Simon have brought up)
project/workspace/[jobid]/workspace/           <-- after upgrading a job to a project
project/workspace/[jobid]/workspace/[jobid]    <-- adding some new jobs in the sub project

Benefits

  • Makes these analogies true!
    • "Directory of the job workspace is to job as directory of the project workspace is to project."
    • "Job directory is to job as project directory is to project"
  • Fewer things to explain in the future glossary.
  • Saying "project workspace" parallels nicely with "project data space", the abstract concept we often use when talking about signac projects.
  • Job directory describes exactly what it is.
  • Project workspace describes exactly what this directory is called, especially after removing the ability to customize it in Remove configurable workspace directory  #714.
  • We can unambiguosly refer to the project directory and project workspace as two separate things.

Signac roadmap for context

I then realized that @vyasr already mentioned this idea in the tentative signac roadmap coming at it from a different angle. I think that means it's a good time to open a focused discussion on it. He suggested:

Using path instead of Project.root_directory and Job.workspace to facilitate a unified Directory interface for working with arbitrary filesystem layouts

Does this writeup capture your idea @vyasr?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions