Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust method for getting cyclus installation directory #1689

Merged
merged 4 commits into from Mar 11, 2024

Conversation

bennibbelink
Copy link
Contributor

Closes #1688.

Instead of relying on the environment variable _ to get the path of the running application (which returns the python installation directory when cyclus is called via python) this calls which cyclus to find the location of the cyclus binary.

This assumes that the machine has the which utility and that the cyclus installation directory is in the PATH. Not 100% robust but I think these are assumptions we can safely make (or enforce on our users).

bennibbelink and others added 4 commits March 9, 2024 17:11
Signed-off-by: bennibbelink <79653949+bennibbelink@users.noreply.github.com>
Signed-off-by: bennibbelink <79653949+bennibbelink@users.noreply.github.com>
@bennibbelink bennibbelink marked this pull request as ready for review March 10, 2024 00:39
Copy link

Downstream Build Status Report

Build FROM cyclus_20.04_apt/cyclus
  • Cycamore: Success
  • Cymetric: Success
Build FROM cyclus_20.04_conda/cyclus
  • Cycamore: Success
  • Cymetric: Success
Build FROM cyclus_22.04_apt/cyclus
  • Cycamore: Success
  • Cymetric: Success
Build FROM cyclus_22.04_conda/cyclus
  • Cycamore: Success
  • Cymetric: Success

@coveralls
Copy link
Collaborator

coveralls commented Mar 10, 2024

Pull Request Test Coverage Report for Build 8218293399

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 15 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.001%) to 32.589%

Files with Coverage Reduction New Missed Lines %
src/env.cc 15 36.56%
Totals Coverage Status
Change from base Build 8194137311: 0.001%
Covered Lines: 52974
Relevant Lines: 128976

💛 - Coveralls

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

Seems like there must be a better way 😁 but this looks ok to me.

@gonuke gonuke merged commit ce4a156 into cyclus:main Mar 11, 2024
8 checks passed
@bennibbelink bennibbelink deleted the get-env branch March 11, 2024 01:58
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.

GetEnv bug finding cyclus installation dir
3 participants