Two repos, one goal !
When I was a child, my mother used to tell nice bedtime stories. My favorite one was the The Tale of Two Repos. It goes like this :
"Once upon a time, in the CdeP, a little
core.dashboards_storerepo was born. The repo tried very hard to provide ETLs for all the schoolboards at once. But the schoolboards were many and the SQL capabilites to retrofit itself to a schoolboard's context were few. So thecore.dashboards_storerepo decided to split itself into many little repos, one for each schoolboard. And thecssXX.dashboard_storerepo was born. And thecssXX.dashboards_storerepo was granted the power to override anything fromcore.dashboards_store. And thecore.dashboards_storerepo was happy. And thecssXX.dashboards_storerepo was happy. And the CdeP was happy. And they all merged develop into master happily ever after."
The moral of the story is that the core.dashboards_store repo is the parent repo of all of the cssXX.dashboards_store repos. The core.dashboards_store repo contains all the ETLs that are common to all of the CSS. The cssXX.dashboards_store repo contains everything that is specific to cssXX, including, if needed, some SQL files overriding the ones in the core.
If you have already been exposed to Object-Oriented Programing, the core.dashboards_store repo is the parent class providing overridable methods, and the cssXX.dashboards_store repo is the child class, that might want to override some of the parent's methods.
core.dashboards_store containing everything that is shared between the schoolboards, and your own custom cssXX.dashboards_store implementing what can't be shared, such as the way to identify students enrolled in an adapted program.cssXX.dashboards_store repo. The core.dashboards_store repo schould never be modified as it is shared between all the schoolboards.Cloning the repo
<working directory> of your choice. If not, you will have to change the cssXX.dashboards_store/packages.yaml to reflect the new path.Bootstraping a working dashboards Store
- Start by cloning the Core : (You'll need a properly set up github account with an SSH key).
git clone git@github.com:Sciance-Inc/core.dashboards_core_dashboards_store.git- Checkout the master branch to get the last template revision
git checkout master- Create a
Poetry / Virtualenvfrom the Core. This will install every Python packages you need, including DBT.
cd core.dashboards_store
eval $(poetry env activate)
poetry install --no-root # The --no-root might not be needed, depending of your Poetry's version [#38](https://github.com/Sciance-Inc/core.dashboards_store/issues/38)- Bootstrap a new
cssXX.dashboards_storerepo from the Core's templateYou will be prompted for informations
cd ../
cookiecutter core.dashboards_store/tooling/template- Let's follow the best practices and use git to the repo you have just created
git init
git remote add origin <your remote's url>
git add .
git commit -m "feat: one commit to initiate them all, one commit to rule them all, one commit to bring them all and in the gitness bind them, in the land of Github where the bugs lie."
git push -u origin master- Go read the
cssXX.dashboards_store/README.mdto learn more about the post-configurations steps required to have everything working.
What did I just do ?
If everyhting worked well, you schould have the following directory structure :
<working directory>
โโโ core.dashboards_store
โโโ cssXX.dashboards_storeBoth subfolders schould contains git-ready DBT projects.
<working directory> will always design the path to the folder containing the two repos (unless mentioned otherwise)