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 bugs to run tutorial CLI, update python, matplotlib API #137

Merged
merged 11 commits into from
Oct 23, 2024

Conversation

bobleesj
Copy link
Contributor

@bobleesj bobleesj commented Oct 23, 2024

Closes #136
Closes #104

srmise data/Ag_nyquist_qmax30.gr --no-extract --plot renders:

Screenshot 2024-10-23 at 8 01 48 AM

srmise data/Ag_nyquist_qmax30.gr --no-extract --plot --range 2 3.5 renders:

Screenshot 2024-10-23 at 8 01 38 AM

print("Could not find ModelEvaluator '%s'. Exiting." % options.modelevaluator)
return

if options.bcrystal:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to use is not None since False is the default value.

if vals != range(self.npars):

# Check if the sorted values match the sequence from 0 to npars-1
if vals != list(range(self.npars)):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bug fix - compare list against list in the latest Python

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's dump an issue to handle this better too. It strikes me as a brittle design. But don't fix this in this release. Something for a new group member.

Copy link
Contributor Author

@bobleesj bobleesj left a comment

Choose a reason for hiding this comment

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

Ready for review @sbillinge

@bobleesj bobleesj marked this pull request as ready for review October 23, 2024 12:22
@bobleesj bobleesj mentioned this pull request Oct 23, 2024
7 tasks
options.peakfunction = eval("peaks." + options.peakfunction)
except Exception as err:
print(err)
print("Could not create peak function '%s'. Exiting." % options.peakfunction)
Copy link
Contributor

Choose a reason for hiding this comment

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

These error messages could be improved by giving the user hints about how to fix them. Let's make an issue to make them more informative for the user, but don't worry about closing that issue in this release.

In general we need tests in srmise (please can you make an issue for that too?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

issue created

if vals != range(self.npars):

# Check if the sorted values match the sequence from 0 to npars-1
if vals != list(range(self.npars)):
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's dump an issue to handle this better too. It strikes me as a brittle design. But don't fix this in this release. Something for a new group member.

@sbillinge sbillinge merged commit c053ab7 into diffpy:main Oct 23, 2024
3 checks passed
@bobleesj bobleesj deleted the test-func branch October 23, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants