Skip to content

Conversation

@cadenmyers13
Copy link
Contributor

@sbillinge second half of commits for modified files

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

please see inline comments.


control = PDFGuiControl()
control.load("../../tests/testdata/ni.ddp")
control.load("src/diffpy/pdfgui/tests/testdata/ni.ddp")
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 test this? It is unlikely to work because this is a relative file-path.

from importlib import resources

from pkg_resources import Requirement, resource_filename
from pkg_resources import Requirement
Copy link
Contributor

Choose a reason for hiding this comment

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

I think pkg_resources is deprecated so we want to get rid of this. I would put pkg_resources fixes on a separate PR tbh.


# Resolve APPDATADIR base path to application data files.
_mydir = os.path.abspath(resource_filename(__name__, ""))
_mydir = os.path.abspath(str(resources.files(__name__).joinpath("")))
Copy link
Contributor

Choose a reason for hiding this comment

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

whenever we touch lines of code that do path munging, switch the code to using pathlib.Path. Then do it for the full module. This also on a separate PR because it will be harder to merge.

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.

2 participants