Skip to content

Conversation

@sbillinge
Copy link
Member

closes #192
closes #193

@codecov
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.35%. Comparing base (41a2788) to head (2517751).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #215   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files           5        5           
  Lines          85       85           
=======================================
  Hits           70       70           
  Misses         15       15           

@sbillinge sbillinge mentioned this pull request Jan 27, 2025
Copy link

@ludivintchokote ludivintchokote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greetings @sbillinge,
I added your changes locally and tried running the code with the --version argument. i had a circular import error. I attached the image of the output file below
Capture

@ludivintchokote
Copy link

Logically what you added should give, but even without the code in that main.py doesn't run due to the import error previously stated.

@sbillinge
Copy link
Member Author

sbillinge commented Jan 27, 2025

Thanks for this. @ludivintchokote did you try running pytentiostat --version? This fix is supposed to work when someone runs the app itself. Do you still get that error? This is what I am getting:
image

@ludivintchokote
Copy link

ludivintchokote commented Jan 27, 2025 via email

@ludivintchokote
Copy link

ludivintchokote commented Jan 27, 2025 via email

@sbillinge
Copy link
Member Author

Yeah i did, in my case running the command opened an empty text file named "--version"

On Mon, Jan 27, 2025, 13:37 Simon Billinge @.> wrote: Thanks for this. @ludivintchokote https://github.com/ludivintchokote did you try running pytentiostat --version? This fix is supposed to work when someone runs the app itself. Do you still get that error? — Reply to this email directly, view it on GitHub <#215 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BNJCXPCNHMUG7FVPQ4YTC432MYR67AVCNFSM6AAAAABV5AGSCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJVGY2DQMJSHA . You are receiving this because you were mentioned.Message ID: @.>

it looks as if you maybe don't have the package installed correctly. Please can you copy-paste the commands you used to set up your virtual environment?

@ludivintchokote
Copy link

ludivintchokote commented Jan 28, 2025 via email

@ludivintchokote
Copy link

I tried uninstalling the package and reinstalling it again. Below is the output I get
Capture2

@ludivintchokote
Copy link

even when i try installing it specifying the version name. it gives the following error
image

@ludivintchokote
Copy link

Thanks for this. @ludivintchokote did you try running pytentiostat --version? This fix is supposed to work when someone runs the app itself. Do you still get that error? This is what I am getting: image

Good it works there!

@sbillinge
Copy link
Member Author

@ludivintchokote since we are developing on the code you have to install it in editable mode or you won't be testing the latest version. i.e., install by first going to the .../pytentiostat/ directory and then typing pip install -e .

@ludivintchokote
Copy link

ludivintchokote commented Jan 28, 2025 via email

@sbillinge
Copy link
Member Author

The -e installs the package in your environment in editable mode, which means that when you run it, it runs the version that it finds checked out on your local hard-drive. This means you can make edits or check out a different branch and rerun the code and it will run the latest vesrsion you have checked out. We use this for development. This does not have a "version" per se because it is changing dynamically. So when we run the version() function, it just goes and gets the latest version number it knows about. In my case it was 0.0.5. I am not sure why you are getting 0.0.1. It may make sense for you to make a clean checkout of everything and build a new virtual environment and paste into the comment thread all the coomands and what you get back and we can maybe get to the bottom of what is going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: pytentiostat --help implemented fix: --version option implemented

2 participants