virgo-modules 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of virgo-modules might be problematic. Click here for more details.
- virgo_modules-0.0.1/LICENSE +0 -0
- virgo_modules-0.0.1/PKG-INFO +37 -0
- virgo_modules-0.0.1/README.md +1 -0
- virgo_modules-0.0.1/setup.cfg +4 -0
- virgo_modules-0.0.1/setup.py +30 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules/__init__.py +0 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules/src/__init__.py +0 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules/src/aws_utils.py +23 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules/src/pull_artifacts.py +45 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules/src/re_utils.py +901 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules/src/ticketer_source.py +1993 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules.egg-info/PKG-INFO +37 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules.egg-info/SOURCES.txt +14 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules.egg-info/dependency_links.txt +1 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules.egg-info/requires.txt +20 -0
- virgo_modules-0.0.1/virgo_app/virgo_modules.egg-info/top_level.txt +1 -0
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: virgo_modules
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: data processing and statistical modeling using stock market data
|
|
5
|
+
Home-page: https://github.com/miguelmayhem92/virgo_module
|
|
6
|
+
Author: Miguel Mayhuire
|
|
7
|
+
Author-email: miguelmayhem92@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.9, <3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: feature-engine==1.6.1
|
|
16
|
+
Requires-Dist: matplotlib==3.6.3
|
|
17
|
+
Requires-Dist: mlflow==2.1.1
|
|
18
|
+
Requires-Dist: numpy==1.23.5
|
|
19
|
+
Requires-Dist: optuna==3.1.0
|
|
20
|
+
Requires-Dist: pandas==1.5.3
|
|
21
|
+
Requires-Dist: plotly==5.15.0
|
|
22
|
+
Requires-Dist: rsa==4.9
|
|
23
|
+
Requires-Dist: scikit-learn==1.2.1
|
|
24
|
+
Requires-Dist: scipy==1.10.0
|
|
25
|
+
Requires-Dist: seaborn==0.12.2
|
|
26
|
+
Requires-Dist: starlette==0.22.0
|
|
27
|
+
Requires-Dist: statsmodels==0.13.5
|
|
28
|
+
Requires-Dist: ta==0.10.2
|
|
29
|
+
Requires-Dist: yfinance==0.2.9
|
|
30
|
+
Requires-Dist: hmmlearn==0.3.0
|
|
31
|
+
Requires-Dist: boto3
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
|
+
|
|
35
|
+
# Virgo Package
|
|
36
|
+
|
|
37
|
+
complete me
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# complete me
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from setuptools import find_packages, setup
|
|
2
|
+
|
|
3
|
+
with open("virgo_app/README.md", "r") as f:
|
|
4
|
+
long_description = f.read()
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
name="virgo_modules",
|
|
8
|
+
version="0.0.1",
|
|
9
|
+
description="data processing and statistical modeling using stock market data",
|
|
10
|
+
package_dir={"": "virgo_app"},
|
|
11
|
+
packages=find_packages(where="virgo_app"),
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
url="https://github.com/miguelmayhem92/virgo_module",
|
|
15
|
+
author="Miguel Mayhuire",
|
|
16
|
+
author_email="miguelmayhem92@gmail.com",
|
|
17
|
+
license="MIT",
|
|
18
|
+
classifiers=[
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
],
|
|
23
|
+
install_requires=["feature-engine==1.6.1","matplotlib==3.6.3","mlflow==2.1.1","numpy==1.23.5","optuna==3.1.0","pandas==1.5.3",
|
|
24
|
+
"plotly==5.15.0","rsa==4.9","scikit-learn==1.2.1","scipy==1.10.0","seaborn==0.12.2","starlette==0.22.0","statsmodels==0.13.5",
|
|
25
|
+
"ta==0.10.2","yfinance==0.2.9","hmmlearn==0.3.0","boto3"],
|
|
26
|
+
extras_require={
|
|
27
|
+
"dev": ["pytest>=7.0"],
|
|
28
|
+
},
|
|
29
|
+
python_requires=">=3.9, <3.10",
|
|
30
|
+
)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import yaml
|
|
2
|
+
import boto3
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from io import StringIO
|
|
5
|
+
|
|
6
|
+
def upload_file_to_aws(bucket,key,input_path):
|
|
7
|
+
|
|
8
|
+
credentials = yaml.safe_load(Path('secrets.yaml').read_text())
|
|
9
|
+
session = boto3.Session(aws_access_key_id=credentials['AWS_ACCESS_KEY_ID'],aws_secret_access_key=credentials['AWS_SECRET_ACCESS_KEY'])
|
|
10
|
+
bucket = credentials[bucket]
|
|
11
|
+
s3 = session.resource('s3')
|
|
12
|
+
s3.meta.client.upload_file(Filename=input_path , Bucket=bucket, Key=key)
|
|
13
|
+
|
|
14
|
+
def upload_pandas_to_s3(data_frame,bucket,key):
|
|
15
|
+
|
|
16
|
+
csv_buffer = StringIO()
|
|
17
|
+
data_frame.to_csv(csv_buffer)
|
|
18
|
+
csv_buffer.seek(0)
|
|
19
|
+
|
|
20
|
+
credentials = yaml.safe_load(Path('secrets.yaml').read_text())
|
|
21
|
+
s3 = boto3.client("s3",region_name=credentials['AWS_DEFAULT_REGION'],aws_access_key_id=credentials['AWS_ACCESS_KEY_ID'],aws_secret_access_key=credentials['AWS_SECRET_ACCESS_KEY'])
|
|
22
|
+
bucket = credentials[bucket]
|
|
23
|
+
s3.put_object(Bucket=bucket, Body=csv_buffer.getvalue(), Key= key)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import yaml
|
|
3
|
+
from yaml import Loader, Dumper
|
|
4
|
+
|
|
5
|
+
def edit_content(doc, source, edit_yml = False, yml_path = False, ini_patern= None, end_patern = None, verbose = True):
|
|
6
|
+
content = doc.get(source,False)
|
|
7
|
+
if content:
|
|
8
|
+
if verbose:
|
|
9
|
+
print(f' {source} content: ',content)
|
|
10
|
+
|
|
11
|
+
if edit_yml:
|
|
12
|
+
new_value = doc[source].replace(ini_patern, end_patern)
|
|
13
|
+
doc[source] = f"{new_value}"
|
|
14
|
+
if verbose:
|
|
15
|
+
print(f' {source} new content: ', new_value)
|
|
16
|
+
with open(yml_path, 'w') as f:
|
|
17
|
+
yaml.dump(doc, f)
|
|
18
|
+
|
|
19
|
+
# root = r"C:\Users\Miguel\ImageFinder\app\mlruns"
|
|
20
|
+
# ini_patern = 'file:C:/Users/Miguel/ImageFinder/app'
|
|
21
|
+
# end_patern = 'file:///app'
|
|
22
|
+
# edit_yml = False
|
|
23
|
+
|
|
24
|
+
def pull_artifacts_from_mlflow(root_path, ini_patern, end_patern, verbose = True, edit_yml = False):
|
|
25
|
+
|
|
26
|
+
for path, subdirs, files in os.walk(root_path):
|
|
27
|
+
for name in files:
|
|
28
|
+
if name == 'meta.yaml':
|
|
29
|
+
if verbose:
|
|
30
|
+
print(os.path.join(path, name))
|
|
31
|
+
yml_path = os.path.join(path, name)
|
|
32
|
+
with open(yml_path) as f:
|
|
33
|
+
doc = yaml.load(f,Loader)
|
|
34
|
+
|
|
35
|
+
edit_content(doc, 'source', edit_yml, yml_path, ini_patern, end_patern, verbose)
|
|
36
|
+
edit_content(doc, 'artifact_uri', edit_yml, yml_path, ini_patern, end_patern, verbose )
|
|
37
|
+
edit_content(doc, 'artifact_location', edit_yml, yml_path, ini_patern, end_patern, verbose )
|
|
38
|
+
if edit_yml:
|
|
39
|
+
print('------------------------------------------------------------')
|
|
40
|
+
print('---------------artifacts were pulled-----------------------')
|
|
41
|
+
print(f'initial pattern: {ini_patern}')
|
|
42
|
+
print(f'new pattern: {end_patern}')
|
|
43
|
+
print('------------------------------------------------------------')
|
|
44
|
+
else:
|
|
45
|
+
print('----------------------just viz-------------------------')
|