extinctsion / easyPythonpi

A python library for the beginners. The program includes simple calulations. Genuine PRs will be merged without delays
https://pypi.org/project/easyPythonpi/
14 stars 36 forks source link

Restructure the library and adjust the importing in each file #55

Closed extinctsion closed 9 months ago

extinctsion commented 9 months ago

Note: The changes that are to be made is written in parentheses( )

Fix the importing errors.

The error we are getting while importing the files -

Error

The file structure that should be done - .github/workflows easyPythonpi -----------methods --------init.py --------basics.py . . ------------test ---------init.py ---------test_basics.py ---------test_linkedlist.py . . -------------init.py (if that's needed. If not dont include) -------------easyPythonpi.py (execution starts from here)

CONTRIBUTION.md (Change name from contributing to contribution.md) README.md setup.py

If your are not sure about any file structure, feel free to ping in this channel.

extinctsion commented 9 months ago

@AndrewHUNGNguyen I have created the issue. Have a look -

AndrewHUNGNguyen commented 9 months ago

@AndrewHUNGNguyen I have created the issue. Have a look -

@extinctsion

What do I need to do after pulling the most up-to-date code? I looked through the readme, and I don't see any clear way to tell if the code is running as supposed to, especially the test cases.

extinctsion commented 9 months ago

@AndrewHUNGNguyen readme is also outdated. Don't follow that. First we have to make a working library then we can write readme according to that code.

AndrewHUNGNguyen commented 9 months ago

@AndrewHUNGNguyen readme is also outdated. Don't follow that. First we have to make a working library then we can write readme according to that code.

Gotcha! A followup question that I have is how should I reproduce the steps to the error in the screenshot? I forgot to ask you to provide the steps to reproduce. The only thing I will have to figure on my own is how to do it on Mac I guess, since you got this error in a Windows Environment.

AndrewHUNGNguyen commented 9 months ago

@extinctsion actually I think I reproduced the steps via Mac, not sure if this is the exact error.

Screenshot 2023-10-08 at 5 35 17 AM
extinctsion commented 9 months ago

Come out of the test_cases dir. Then try again. Are u getting same error?

AndrewHUNGNguyen commented 9 months ago

Come out of the test_cases dir. Then try again. Are u getting same error?

Screenshot 2023-10-08 at 6 06 59 AM
extinctsion commented 9 months ago

Run command - python -m unittest

extinctsion commented 9 months ago

If it works then the structure for test cases is now ok.

AndrewHUNGNguyen commented 9 months ago

python -m unittest

Screenshot 2023-10-08 at 6 19 26 AM

Weirdly, if I cd into test_cases and run python3 -m unittest basics_test.py unit test cases seem to execute fine

extinctsion commented 9 months ago

@AndrewHUNGNguyen I'm also trying to figure out a solution.

extinctsion commented 9 months ago

image Hey! I'm very excited to tell that I have fixed that issue and also released new build on pypi.org. Now everyone can download new release and enjoy! Closing this issue now