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

fix: allow global error flag variable to be changed inside function #138

Merged
merged 3 commits into from
May 17, 2023

Conversation

ninsch3000
Copy link
Collaborator

@ninsch3000 ninsch3000 commented May 12, 2023

Description

allow global error flag variable to be changed inside function. Added global keyword before variable inside the function definition, in order to allow the function to assign something to that variable. Additionally, changed test for nan to numpyesque call.

Fixes #136

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Conventional Commits guidelines

Checklist:

  • My code changes follow the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • I have updated the project's documentation

@ninsch3000 ninsch3000 requested review from uniqueg and balajtimate May 12, 2023 14:32
uniqueg
uniqueg previously approved these changes May 15, 2023
balajtimate
balajtimate previously approved these changes May 16, 2023
Copy link
Contributor

@balajtimate balajtimate left a comment

Choose a reason for hiding this comment

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

I still seem to get the same error when running the workflow on some normal SE samples (other than the test samples). I think the issue is that the variable also gets assigned in the htsinfer_to_zarp function; adding global before variable inside that fixes it. Could you please look into that?

@ninsch3000 ninsch3000 dismissed stale reviews from balajtimate and uniqueg via 1714279 May 17, 2023 09:40
@ninsch3000
Copy link
Collaborator Author

Thanks a lot @balajtimate ! I tagged the e_flag as global in all functions now, hope this solves the problem.

@balajtimate balajtimate merged commit b608864 into dev May 17, 2023
@balajtimate balajtimate deleted the fix_eflag branch May 17, 2023 10:07
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: e-flag accessed before defined error
3 participants