Skip to content

Conversation

@stevenhua0320
Copy link
Contributor

@zmx27 Ready for review

Copy link
Contributor

@zmx27 zmx27 left a comment

Choose a reason for hiding this comment

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

Some comments


# some convenience imports
from diffpy.confutils.config import ConfigBase
from diffpy.confutils.config import ConfigBase # noqa: F401
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you # noqa these lines because of another pre-commit conflict error?

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, it is because I'm worrying about whether deleting this module would affect the base functionality for the package. So, I put it here to silence for flake8 for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, after looking at the package again, I'm not quite sure what this confutils folder is for. It seems like a subpackage, but the code in this folder seems to just be taken from the main diffpy.srxconfutils package that was recently migrated. Maybe it's actually fine to delete this folder altogether? I'm not sure, so let's ask Simon to review

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbillinge Professor we are not sure whether we need to keep this?

Copy link
Contributor

Choose a reason for hiding this comment

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

it would be good to delete it if we can, but we would like to either verify that it doesn't break anything, or else verify that the code you are deleting is the same as what it is replaced with (or both).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zmx27 Would it be possible to check it by pulling it into the GUI test if I delete it? It it could, I would delete it and we could check if we would break anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

it would be good to delete it if we can, but we would like to either verify that it doesn't break anything, or else verify that the code you are deleting is the same as what it is replaced with (or both).

Yes, I do believe that the code in the confutils folder is taken directly from the srxconfutils package. @stevenhua0320 let's delete this folder and I'll get back to you on whether or not anything breaks from doing that.


# package version
from diffpy.srxplanar.version import __version__
from diffpy.srxplanar.version import __version__ # noqa: F401
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, why are you putting so many # noqa here? I'm not totally sure, but I think that skpkg has a way of silencing pre-commit errors that may be introduced when certain imports are unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I silent it here because now we are not at the stage of real migration, these imports are necessary after we migrate this file into right folder. So, I silence it for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean by migrating into the right folder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean similar to diffpy.srxplanargui's situation, here we are not at the stage of using these imports? But when we have done the migration this module import might become useful? I'm not very sure for that.

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right, this file doesn't matter too much at this point. We can probably keep this and wait for the skpkging

Copy link
Contributor

Choose a reason for hiding this comment

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

it is preferred not to noqa things that will be replaced. it is ok for pre-commit to fail on these as they will be changed later by the packaging step.

@stevenhua0320
Copy link
Contributor Author

@zmx27 I have deleted the confutils folder and you can now test it.

@sbillinge
Copy link
Contributor

I added an issue to revisit later and try and resolve the noqa's after we do the scikit package. With this done, I am happy to merge PRs with many noqa's if we think they may go away during the packaging process as we remove py2 things and other stuff.

That said, this PR is now conflicted....

@stevenhua0320
Copy link
Contributor Author

I added an issue to revisit later and try and resolve the noqa's after we do the scikit package. With this done, I am happy to merge PRs with many noqa's if we think they may go away during the packaging process as we remove py2 things and other stuff.

That said, this PR is now conflicted....

It conflicted because now I deleted the confutils folder. I did it because Zhiming said "the code in the confutils folder is taken directly from the srxconfutils package. @stevenhua0320 let's delete this folder and I'll get back to you on whether or not anything breaks from doing that." So, I'm waiting for whether it breaks functionality. If it does not break, then there should be no problem.

@stevenhua0320
Copy link
Contributor Author

@sbillinge I have seen the issue you set there, after considering it, I revert the deletion of the confutil folder for now since we can merge it even though there is noqa suppression there.

@sbillinge sbillinge merged commit 24ddd7c into diffpy:migration Oct 20, 2025
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.

3 participants