-
-
Notifications
You must be signed in to change notification settings - Fork 73
Labels
help wantedOpen to participation from the communityOpen to participation from the community✨ goal: improvementImprovement to an existing featureImprovement to an existing feature🏁 status: ready for workReady for workReady for work💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🟩 priority: lowLow priority and doesn't need to be rushedLow priority and doesn't need to be rushed
Description
Problem
put shared code in a shared library
Description
Potential new shared module:
# Standard library
import datetime
import os.path
def setup():
# Datetime
datetime_today = datetime.datetime.today()
# Paths
path_work_dir = os.path.dirname(
os.path.abspath(os.path.realpath(__file__))
)
path_repo_root = os.path.dirname(
os.path.abspath(os.path.realpath(path_work_dir))
)
path_dotenv = os.path.abspath(
os.path.realpath(os.path.join(path_work_dir, ".env"))
)
return path_repo_root, path_work_dir, path_dotenv, datetime_todayused in scripts (assumes above is named quantify):
# First-party/Local
import quantify
# ...
PATH_REPO_ROOT, PATH_WORK_DIR, PATH_DOTENV, DATETIME_TODAY = quantify.setup()
load_dotenv(PATH_DOTENV)itisQaisar
Metadata
Metadata
Assignees
Labels
help wantedOpen to participation from the communityOpen to participation from the community✨ goal: improvementImprovement to an existing featureImprovement to an existing feature🏁 status: ready for workReady for workReady for work💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🟩 priority: lowLow priority and doesn't need to be rushedLow priority and doesn't need to be rushed