-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rename `cache` dir to `.cache` * Remove moving cache to .cache on newer versions * Add function for getting paths in cache dir * Fix tests * Refactor `paths` module
- Loading branch information
1 parent
7819c06
commit 5cc2d42
Showing
14 changed files
with
82 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
|
||
|
||
def get_cache_path(*paths): | ||
""" | ||
Function to get a path in the cache directory. Works the same as os.path.join. | ||
With no arguments, it returns the path to the cache directory. | ||
""" | ||
return os.path.join(os.getcwd(), ".cache", *paths) | ||
|
||
|
||
def get_executables_path(*paths): | ||
""" | ||
Function to get a path in executables directory. Works the same as os.path.join. | ||
With no arguments, it returns the path to the executables directory. | ||
""" | ||
return os.path.join(get_cache_path("executables"), *paths) | ||
|
||
|
||
def get_compilation_log_path(*paths): | ||
""" | ||
Function to get a path in compilation log directory. Works the same as os.path.join. | ||
With no arguments, it returns the path to the compilation log directory. | ||
""" | ||
return os.path.join(get_cache_path("compilation"), *paths) | ||
|
||
|
||
def get_executions_path(*paths): | ||
""" | ||
Function to get a path in executions directory. Works the same as os.path.join. | ||
With no arguments, it returns the path to the executions directory. | ||
""" | ||
return os.path.join(get_cache_path("executions"), *paths) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters