initial commit/perceval test

This commit is contained in:
mjgaughan 2023-10-19 11:46:00 -05:00
commit 5111c3530f
3 changed files with 29 additions and 0 deletions

2
main.py Normal file
View File

@ -0,0 +1,2 @@
import perceval
import os

26
perceval_tasks.py Normal file
View File

@ -0,0 +1,26 @@
import perceval
import venv
import yaml
import subprocess
def main(manifest):
with open(manifest, 'r') as stream:
#try:
config = yaml.safe_load(stream)
get_perceval_log(config['Upstream_VCS'])
print(config['Upstream_VCS'])
#except yaml.YAMLOError as err:
# print(err)
def get_perceval_log(vcs_path):
print(vcs_path)
perceval_output = subprocess.run(['perceval', 'git', vcs_path[0], '--from-date', '2023-08-08'], capture_output=True)
print(type(perceval_output.__str__()))
with open('test_perceval_output.txt', 'w') as f:
f.write(perceval_output.__str__())
print('COMPLETE')
if __name__ == "__main__":
manifest = '../kaylea_dissertation/lifecycle/package_metadata/woof_manifest.yaml'
main(manifest)

1
test_perceval_output.txt Normal file

File diff suppressed because one or more lines are too long