Skip to content

Conversation

@beckyjackson
Copy link
Collaborator

Resolves #84

The vaidate_cogs_project() method now returns the abs path of the .cogs directory to allow calling cogs commands from child directories.

@jamesaoverton
Copy link
Member

If we're going to change all these function signatures now, I think we should future-proof this by using a config dict with a dir key rather than a cogs_dir string. What do you think?

@beckyjackson
Copy link
Collaborator Author

What other items could you see adding to a config dict? I'm not against it, I just can't think of what else would go in it.

@jamesaoverton
Copy link
Member

This code passes around the cogs_dir string so that you can call a utility function to read required configuration data out of some file in the .cogs/ directory. The alternative is to pass around the configuration data.

In our case, everything we need should be stored in a file somewhere in .cogs/, and there's no point in loading it until we need it. So after giving it some thought, now I think that passing around the cogs_dir string is better.

@beckyjackson beckyjackson merged commit 8b3fc5e into master Nov 11, 2020
@beckyjackson beckyjackson deleted the dirs branch November 11, 2020 15:26
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

Successfully merging this pull request may close these issues.

Consider climbing the file system hierarchy looking for .cogs/

3 participants