From c360f9bc00b400600da3f5654b2da51c8f1df01b Mon Sep 17 00:00:00 2001 From: karoel2 Date: Wed, 15 Jun 2022 11:28:52 +0200 Subject: [PATCH] finalv1 --- system/apimock.py | 20 +++++++++++++++++--- system/generator_jezyka_nautalnego.py | 12 ++++++++---- system/taktyka_dialogu.py | 6 +++--- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/system/apimock.py b/system/apimock.py index 74eb311..8749bfc 100644 --- a/system/apimock.py +++ b/system/apimock.py @@ -1,5 +1,5 @@ -repositoriesMock = ["repo1", "repo2", "repo3"] -issuesMock = [ +repositoriesMock = ["repo1", "repo2", "repo3", "repo4"] +repositoriesPublicMock = ["repo1", "repo2", "repo3"]issuesMock = [ { "name": "Issue 1", "description": "Description of issue 1", @@ -46,6 +46,17 @@ testMock = [ }, ] +brefingMock = [ + { + "name": "brefing1", + "description": "brefing1 description" + }, + { + "name": "brefing2", + "description": "brefing2 description" + } +] + def createRepository(repositoryName): pass @@ -56,7 +67,7 @@ def listRepositories(): return repositoriesMock def listPublicRepositories(): - return repositoriesMock + return repositoriesPublicMock def listRepositoryIssues(repositoryName): return issuesMock @@ -69,3 +80,6 @@ def listNotifications(): def listRepositoryTests(repositoryName): return testMock + +def getBrefing(): + return brefingMock diff --git a/system/generator_jezyka_nautalnego.py b/system/generator_jezyka_nautalnego.py index ee27fde..7e75f97 100644 --- a/system/generator_jezyka_nautalnego.py +++ b/system/generator_jezyka_nautalnego.py @@ -72,13 +72,17 @@ def generator_jezyka_nautalnego(frame, tactic, state, text): elif tactic[0] == False: #ASK _, required_empty, act, req_args, opt_args = tactic - print('DEBUG: ', act, 'req', req_args, opt_args,sep = '\n') - print(f'Proszę podaj {required_empty[0]}') - print() + # print('DEBUG: ', act, 'req', req_args, opt_args,sep = '\n') + if required_empty[0] == 'repo': + print("Dodaj nazwę repozytorium na końcu komendy") + print("np. w nazwarepozytorium") + else: + print(f'Proszę podaj {required_empty[0]}') + print() elif tactic[0] == True: _, act, req_args, opt_args = tactic - print('DEBUG: ', act, 'req', req_args, opt_args,sep = '\n') + # print('DEBUG: ', act, 'req', req_args, opt_args,sep = '\n') if act == 'help': print(random.choice(help)) diff --git a/system/taktyka_dialogu.py b/system/taktyka_dialogu.py index c2bf0e9..5394916 100644 --- a/system/taktyka_dialogu.py +++ b/system/taktyka_dialogu.py @@ -51,10 +51,10 @@ def taktyka_dialogu(state, frame): def validate_repo(repo): if repo not in listRepositories(): - return 'repo not in listRepositories' + print('repo not in listRepositories') if repo not in listPublicRepositories(): - return 'repo not in listPublicRepositories' - + print('repo not in listPublicRepositories') + def long_thread(state): act = state['current_context'] if act == None: