FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cookiecutter: modified files pt2 by cadenmyers13 · Pull Request #154 · diffpy/diffpy.pdfgui · GitHub

Repository navigation

cookiecutter: modified files pt2 - #154

Closed
cadenmyers13 wants to merge 5 commits into
diffpy:cookiefrom
cadenmyers13:mod_test2
Closed

cadenmyers13 wants to merge 5 commits into
diffpy:cookiefrom
cadenmyers13:mod_test2

Conversation

Copy link
Copy Markdown
Contributor

@sbillinge second half of commits for modified files

sbillinge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

please see inline comments.


control = PDFGuiControl()
control.load("../../tests/testdata/ni.ddp")
control.load("src/diffpy/pdfgui/tests/testdata/ni.ddp")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL