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

Improved /TBFT function. #782

Merged
merged 17 commits into from
Dec 21, 2021
Merged

Improved /TBFT function. #782

merged 17 commits into from
Dec 21, 2021

Conversation

germa89
Copy link
Collaborator

@germa89 germa89 commented Dec 17, 2021

/TBFT does now upload the experimental data files. Close #725

It does know upload the experimental data files.
It does know upload the experimental data files.
@germa89 germa89 added the Bug label Dec 17, 2021
@germa89 germa89 self-assigned this Dec 17, 2021
Comment on lines 1002 to 1008
fname = 'expdata0.dat'
with open(fname, 'w') as fid:
fid.write("""0.819139E-01 0.82788577E+00
0.166709E+00 0.15437247E+01
0.253960E+00 0.21686152E+01
0.343267E+00 0.27201819E+01
0.434257E+00 0.32129833E+0""")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the tmpdir fixture instead of writing to the local directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Implementing this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mmhh... I cannot use tmpdir because that will create a file in a tmpdir, hence I would have to modify the @parametrize options, which are outside of that function. It probably can be done, but I feel like it is not worthy.

Also I want to check the option where only fname is given, hence it cannot be in a folder.

Other option is too forget the parametrize and use a more elaborated case.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Other option is too forget the parametrize and use a more elaborated case.

In this case it might be acceptable to create the file in the current working directory given the inflexibility of this command. What I would do instead is try...finally. That way we'll still capture all the AssertionError raised by our assert statements, but always remove the file in finally.

@germa89 germa89 marked this pull request as draft December 17, 2021 18:50
@germa89 germa89 marked this pull request as ready for review December 20, 2021 10:03
Copy link
Collaborator

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

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

This is good to go. Thanks!

@akaszynski akaszynski merged commit 2cafb93 into main Dec 21, 2021
@akaszynski akaszynski deleted the feat/tbft-file-improvements branch December 21, 2021 15:40
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/ TBFT is asking for a file which might be in mapdl.directory
2 participants