Skip to content

fix: shortened the test file and added README.md#7

Merged
PranshuSrivastava merged 4 commits intomainfrom
update-test-file
Feb 27, 2024
Merged

fix: shortened the test file and added README.md#7
PranshuSrivastava merged 4 commits intomainfrom
update-test-file

Conversation

@PranshuSrivastava
Copy link
Contributor

Issue that this pull request solves

The test file used to be unnecessarily long, making it difficult for users to work with it. There was also no README present so it made tough for users to use pytest.

Brief description of what is fixed or changed

Handled majority of the functionality of the test file in the sdk itself so as to shorten the length of the test file, also added a README file according to the current changes.

Types of changes

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please describe):

Checklist

Put an x in the boxes that apply

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have created new branch for this pull request
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • My changes does not break the current system and it passes all the current test cases.

Other information

Any other information that is important to this pull request

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Copy link

@charankamarapu charankamarapu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comments

Keploy.py Outdated
logger.error(f"Test set: {test_set} failed")
break
# If 1 minute has passed we exit.
if time.time() - startTime > 60:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if I have very large number of testCases in my test-set which will definitely take more than 60s

Keploy.py Outdated
FAILED = 3

def run(run_cmd):
global user_command_pid

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need a global variable..? we can just pass them in functions right..?

Keploy.py Outdated
logger = logging.getLogger('Keploy')

GRAPHQL_ENDPOINT = "/query"
HOST = "http://localhost:"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can include port in host

Keploy.py Outdated
@@ -1,12 +1,14 @@
import json
import psutil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally the folder structure followed by python libraries would be :

src/keploy

in this folder you can have run.py file which will have this content.

this folder may contain other files like init etc .

try to follow this convention.

import time

logger = logging.getLogger('KeployCLI')
logging.basicConfig(level=logging.info)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any requirements.txt file, this library to run locally don't I need any dependencies?

setup.py Outdated
from setuptools import setup, find_packages

VERSION = '0.0.1'
VERSION = '2.0.0-alpha11'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this version 2.0.0-alpha11?

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
@PranshuSrivastava PranshuSrivastava merged commit 04b857c into main Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants