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

Update references to non-Python files #44

Open
forsyth2 opened this issue May 14, 2021 · 0 comments
Open

Update references to non-Python files #44

forsyth2 opened this issue May 14, 2021 · 0 comments
Assignees
Labels
priority: low Low priority task

Comments

@forsyth2
Copy link
Collaborator

Update references to non-python files. In #36, using importlib.resources.path was discussed. While it is not strictly required, it is the preferred method.

Replace templateDir = os.path.join( os.path.dirname(__file__), 'templates' ) in zppy/__main__.py with something like https://github.com/MPAS-Dev/compass/blob/864ebf7425d5f076d4c18673b43d102308da7071/compass/landice/tests/enthalpy_benchmark/B/__init__.py#L44-L46:

from importlib.resources import path
[...]
        with path('compass.landice.tests.enthalpy_benchmark', 'README') as target:
            symlink(str(target), '{}/README'.format(self.work_dir))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Low priority task
Projects
None yet
Development

No branches or pull requests

1 participant