Skip to content

Commit

Permalink
added setup.py for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
shashank-boyapally committed Jan 15, 2024
1 parent c01a7cc commit a23066f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
1 change: 0 additions & 1 deletion fmatch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
"""This file is the init file of the matcher package
which is used as to match and query data from elastic server"""
from fmatch.matcher import Matcher
8 changes: 2 additions & 6 deletions fmatch/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from elasticsearch.exceptions import NotFoundError
# pylint: disable=import-error
import pandas as pd
import yaml



Expand All @@ -16,13 +15,10 @@
class Matcher:
""" Matcher
"""
def __init__(self, configpath="config.yaml", index="perf_scale_ci"):
def __init__(self, index="perf_scale_ci"):
self.index = index
self.es_url = ES_URL
with open(configpath, 'r',encoding='UTF-8') as file:
data = yaml.safe_load(file)
self.es = Elasticsearch([self.es_url], http_auth=[
data['username'], data['password']], timeout=30)
self.es = Elasticsearch(self.es_url, timeout=30)
self.data = None

def get_metadata_by_uuid(self, uuid, index=None):
Expand Down
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""
setup file for fmatch package
"""
from setuptools import setup, find_packages


VERSION = '0.0.1'
DESCRIPTION = 'Common package for matching runs with provided metadata'
# pylint: disable= line-too-long
LONG_DESCRIPTION = "A package that allows to match metadata and get runs and create csv files with queried metrics"

# Setting up
setup(
name="fmatch",
version=VERSION,
author="sboyapal",
author_email="[email protected]",
description=DESCRIPTION,
long_description_content_type="text/x-rst",
long_description=LONG_DESCRIPTION,
packages=find_packages(),
install_requires=['elasticsearch7==7.13.0', 'elasticsearch', 'pyyaml','pandas'],
keywords=['python', 'matching', 'red hat', 'perf-scale', 'matcher', 'orion'],
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]
)

0 comments on commit a23066f

Please sign in to comment.