Closed bccrisan closed 5 years ago
Filename: modules/FIC_Core.py We have to go with a class + functional code, as we will need to init everything only once. Lets say we gonna call the class "Core", in that can we could use something alone those lines:
.integrity_check()
<-- Check that files and folders exist..start_git()
<-- Brings Git commits.start_hg()
<-- Brings HG commits.write()
<-- Write json files..markdown()
<-- Write the markdown stuff.Of course this can be further optimized if we, for example, introduce another method called ".start()
" which will call all git and hg functions.
In addition to the first comment, we can add these methods to FIC_Core.py:
core.one_repo()
which will call FICGithub.start_git()/start_hg()
only for a specific repo. (self.repo_name = "the name of the repository"core.all_repos()
to iterates through the repositories list and call `FICGithub.start_git()/start_hg() for all of themFICGithub.start_git() <-- it requires the self.repo_name attribute initialized and the logic will pull all the new commits ( only those that affect infra ) and then it will append them to the .json
About the core functionality:
Filename: modules/FIC_Core.py We have to go with a class + functional code, as we will need to init everything only once. Lets say we gonna call the class "Core", in that can we could use something alone those lines:
- core
.integrity_check()
<-- Check that files and folders exist.- core
.start_git()
<-- Brings Git commits- core
.start_hg()
<-- Brings HG commits- core
.write()
<-- Write json files.- core
.markdown()
<-- Write the markdown stuff.Of course this can be further optimized if we, for example, introduce another method called "
.start()
" which will call all git and hg functions.
+1
The idea of how it was implemented thus far seems good. All the tests have been positive thus far. +1
We should start working on the core class/function.
Main objectives:
.json
files)The most important aspect of the core:
it should gather together all of the other classes and methods
, all of them in a single place.The core can be a function/class that should be stored in a file. (Probably a class) We have to choose which one (class or function)?? We have to choose where to store it?
In the
client.py
we can probably have the the object creation of the core and have a method calledstart
to be called.There is also another question that needs to be raised. At some point this will be a service that will need to run on the server which will need monitoring. Probably the best way would be to make the script know about time and make the commits based on it's internal tick (thing that needs to be discussed in the next meeting) In this case, there will be a service running 24/7 on the server and we can check for running processes on it.
These are just a few of the ideas that came into my mind thinking of it. Please have a look over it and give us feedback on what we should do/don't.
I marked this as question (for obvious reasons), and priority: low. The second one is a bit tricky. We should not start implement on it right away, but I would prefer rather talk about it and see what comes next. Until the priority changes to something else, please do not start working on it.
DISCLAIMER: Please do not update this description, or if you do, please comment below the reasons.