Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1 - Running The Scripts #14

Merged
merged 6 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added debugme.sh
Empty file.
12 changes: 9 additions & 3 deletions dist/clean_env_before_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def clean_directory_content(script_dir: str, directory: str) -> None:
shutil.rmtree(directory_path)


if __name__ == "__main__":
print("Data mining for Living Documentation started")
def clean_environment():
print("Cleaning of env for Living Documentation started")

# Get the directory of the current script
script_dir = os.path.dirname(os.path.abspath(__file__))
Expand All @@ -50,4 +50,10 @@ def clean_directory_content(script_dir: str, directory: str) -> None:
# Clean the output directory
clean_directory_content(script_dir, MARKDOWN_PAGE_DIRECTORY)

print("Data mining for Living Documentation ended")
print("Cleaning of env for Living Documentation ended")


if __name__ == "__main__":
clean_environment()
# TODO - move dir variables definition to the controlling script - add them to the env_vars
# - to able to provide them to all rest scripts #Issue: https://github.com/AbsaOSS/living-doc-generator/issues/4
10 changes: 3 additions & 7 deletions dist/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import subprocess
import argparse
import sys
import re
from clean_env_before_mining import clean_environment


def extract_args():
Expand Down Expand Up @@ -48,24 +48,20 @@ def main():
print("Extracting arguments from command line.")
env_vars = extract_args()

# Clean environment before mining
print("Data mining for Living Documentation")
run_script('clean_env_before_mining.py', env_vars)

clean_environment()
miroslavpojer marked this conversation as resolved.
Show resolved Hide resolved

# Data mine GitHub features from repository
print("Downloading issues from GitHub")
run_script('github_query_issues.py', env_vars)

# Data mine GitHub project's state
print("Downloading project's state")
run_script('github_query_project_state.py', env_vars)

# Consolidate all feature data together
print("Consolidating mined feature data")
run_script('consolidate_feature_data.py', env_vars)

# Generate markdown pages
print("Converting features to markdown pages")
run_script('convert_features_to_pages.py', env_vars)


Expand Down
6 changes: 0 additions & 6 deletions notes.txt

This file was deleted.

6 changes: 2 additions & 4 deletions src/clean_env_before_mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def clean_directory_content(script_dir: str, directory: str) -> None:
shutil.rmtree(directory_path)


def clean_environment(env_vars):
def clean_environment():
print("Cleaning of env for Living Documentation started")

# Get the directory of the current script
Expand All @@ -54,8 +54,6 @@ def clean_environment(env_vars):


if __name__ == "__main__":
import sys
env_vars = sys.argv[1:]
clean_environment(env_vars)
clean_environment()
# TODO - move dir variables definition to the controlling script - add them to the env_vars
# - to able to provide them to all rest scripts #Issue: https://github.com/AbsaOSS/living-doc-generator/issues/4
Empty file added src/containers/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion src/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def main():

print("Data mining for Living Documentation")

clean_environment(env_vars)
clean_environment()

# Data mine GitHub features from repository
run_script('github_query_issues.py', env_vars)
Expand Down
Loading