nicobrenner / commandjobs

Command Jobs uses AI to help software engineers find the best jobs
Apache License 2.0
151 stars 14 forks source link

Test displaying the resume text #48(new) #54

Open AaryamanVyas opened 6 months ago

AaryamanVyas commented 6 months ago

Also removed line strip

AaryamanVyas commented 6 months ago

@nicobrenner hey, I think everything should be fine now !! I Thought it would be easier to just start a fresh repo😂

nicobrenner commented 6 months ago

Thank you @aaryamantriescode please check out comments on the PR, also always make sure the tests run before submitting the code

Looking forward to merging this PR soon

AaryamanVyas commented 6 months ago

Yeah, ok ill do the tests. I don't have docker installed, I will have to set it up.

nicobrenner commented 6 months ago

You don’t need to use docker, you can just run: python src/test_menu.py

You might need to install some python libraries

There are directions for setting up the app with python in the readme

On Mon, Mar 18, 2024 at 7:28 PM Aaryaman Vyas @.***> wrote:

Yeah, ok ill do the tests. I don't have docker installed, I will have to set it up.

— Reply to this email directly, view it on GitHub https://github.com/nicobrenner/commandjobs/pull/54#issuecomment-2005634425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARQXNCUKZY4CVPBET3RNL3YY6PD5AVCNFSM6AAAAABE22NZ2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBVGYZTINBSGU . You are receiving this because you were mentioned.Message ID: @.***>

AaryamanVyas commented 6 months ago

Yeah, I should probably try that because I am not getting how to do it in terminal I put the api key and followed the instructions but something is wrong

image
nicobrenner commented 6 months ago

Yeah, I should probably try that because I am not getting how to do it in terminal I put the api key and followed the instructions but something is wrong image

Oh, interesting, hadn't seen that

Looking around, it seems like it's an issue with the environment not setting a TERM variable: https://stackoverflow.com/questions/66834732/python-curses-doesnt-recognize-terminal

Given that the issue is happening inside of docker, make sure that when you run docker, that the docker-compose.yml has these two lines:

    tty: true  # Allocate a pseudo-TTY
    stdin_open: true  # Keep STDIN open

So that when the app runs, it has access to a terminal. If that doesn't work, maybe try setting the terminal-related environment variables inside docker-entrypoint.sh (if your docker-compose file includes it), or in the docker-compose.yml file (inside the environment section)

AaryamanVyas commented 6 months ago

Yeah, I should probably try that because I am not getting how to do it in terminal I put the api key and followed the instructions but something is wrong image

Oh, interesting, hadn't seen that

Looking around, it seems like it's an issue with the environment not setting a TERM variable: https://stackoverflow.com/questions/66834732/python-curses-doesnt-recognize-terminal

Given that the issue is happening inside of docker, make sure that when you run docker, that the docker-compose.yml has these two lines:

    tty: true  # Allocate a pseudo-TTY
    stdin_open: true  # Keep STDIN open

So that when the app runs, it has access to a terminal. If that doesn't work, maybe try setting the terminal-related environment variables inside docker-entrypoint.sh (if your docker-compose file includes it), or in the docker-compose.yml file (inside the environment section)

Yeah, I tried all that I don't know what to do now, even python isn't working. Can you check if my code works on your pc? image

nicobrenner commented 6 months ago

About the error you are getting, this is what I get in my terminal:

echo $TERM
xterm-256color

This is what chatgpt says (try doing export TERM=xterm before running docker): image

When running the code in the PR, I don't get the TERM error, but I do get an error having to do with the test code

AaryamanVyas commented 6 months ago

I'll try it in the evening now I have to prep for entrance exams😅I will try to get it working by tomorrow! Thank you for being helpful!

nicobrenner commented 6 months ago

Good luck, hope it works!

AaryamanVyas commented 6 months ago

image image I got the venv file to work now but python says I don't have the curses module, but I have it installed 🤦‍♂️its been 2 hours just trying to run this 🥲 i even tried the "export TERM=xterm" before running docker

nicobrenner commented 6 months ago

Sorry, haven't tried running it in windows. You are being a pioneer. Thank you for sharing your experience here, it's super valuable to learn how to make it work in more platforms

The suggestions I see online are to do either pip install windows-curses which looks like you already did, or bpython-curses (https://github.com/pmbarrett314/curses-menu/issues/18#issuecomment-436070434), I haven't tried it though

AaryamanVyas commented 6 months ago

Sorry, haven't tried running it in windows. You are being a pioneer. Thank you for sharing your experience here, it's super valuable to learn how to make it work in more platforms

The suggestions I see online are to do either pip install windows-curses which looks like you already did, or bpython-curses (pmbarrett314/curses-menu#18 (comment)), I haven't tried it though

Yeah, 😅 I'm planning to shift to Linux after my exams cause windows is wayy too slow :( . I'll try to look more into it by tomorrow, hopefully should find a way to run it !