vamseeachanta / assetutilities

Utilities for performing day to day tasks. Helps in automation of day to day business tasks
MIT License
0 stars 1 forks source link

Internship | Visualizations | Test and further programming #8

Open saiachanta2728 opened 6 months ago

saiachanta2728 commented 6 months ago

import pytest import deepdiff import os import sys import numpy as np

from assetutilities.engine import engine from assetutilities.common.yml_utilities import ymlInput

def run_visualization_polar(input_file, expected_result={}): if input_file is not None and not os.path.isfile(input_file): input_file = os.path.join(os.path.dirname(file), input_file) cfg = engine(input_file)

# obtained_result = cfg[cfg['basename']]['properties']
# expected_result = expected_result[cfg['basename']]['properties'].copy()

# assert not deepdiff.DeepDiff(obtained_result,
#                              expected_result,
#                              ignore_order=True,
#                              significant_digits=4)

def get_valid_pytest_output_file(pytest_output_file): if pytest_output_file is not None and not os.path.isfile( pytest_output_file): pytest_output_file = os.path.join(os.path.dirname(file), pytest_output_file) return pytest_output_file

def test_visualization_polar(): input_file = 'test_data/visualization/visualization_xy_line_matplotlib_input.yml'

# pytest_output_file = '../test_data/6d_buoy/buoy_6d_circular_px_0_pytest.yml'
# pytest_output_file = get_valid_pytest_output_file(pytest_output_file)
expected_result = {}
# expected_result = ymlInput(pytest_output_file, updateYml=None)

if len(sys.argv) > 1:
    sys.argv.pop()

run_visualization_polar(input_file, expected_result)

test_visualization_polar()

after runninng and instalation of some libraries we i am facing some errors once can u see and help to me to fix the error sir @vamseeachanta

Screenshot 2024-03-12 at 6 56 12 PM

This is the eroor facing with me

vamseeachanta commented 6 months ago

Ensure you have below file and then run : conda env update -f environment.yml

Conda list should have "assetutilities", "matplotlib", etc. etc.

name: assetutilities channels:

vamseeachanta commented 6 months ago

@saiachanta2728 , I tried the environment on mine and did not work. So updated and pushed the latest to the 2024 branch. Please can you take the latest code from branch 2024 and test it? See latest commit below.

https://github.com/vamseeachanta/assetutilities/commit/bc249fb33a5f78bf215e5e0e7fc422d25626b410

CC: @samdansk2 , @JayachandraJangiti

vamseeachanta commented 6 months ago

@saiachanta2728 , a reinforcing note, make sure you pull the latest code and run. Thank you.

vamseeachanta commented 6 months ago

@saiachanta2728 , after we finish running the code, we should fix the tests and make these work. See pipeline actions below: https://github.com/vamseeachanta/assetutilities/actions/runs/8330101633/job/22793990755#step:7:173