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

DM-25430: Use absolute path when specifying gen2root in conversion #264

Merged
merged 2 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion python/lsst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import pkgutil
import lsstimport
__path__ = pkgutil.extend_path(__path__, __name__)
6 changes: 4 additions & 2 deletions python/lsst/obs/base/gen2to3/repoConverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from collections import defaultdict
from abc import ABC, abstractmethod
import fnmatch
import os.path
import re
from typing import (
Dict,
Expand Down Expand Up @@ -184,7 +185,8 @@ class RepoConverter(ABC):
task : `ConvertRepoTask`
Task instance that is using this helper object.
root : `str`
Root of the Gen2 repo being converted.
Root of the Gen2 repo being converted. Will be converted to an
absolute path, resolving symbolic links and ``~``, if necessary.
collections : `list` of `str`
Gen3 collections with which all converted datasets should be
associated.
Expand All @@ -205,7 +207,7 @@ class RepoConverter(ABC):
def __init__(self, *, task: ConvertRepoTask, root: str, run: Optional[str],
subset: Optional[ConversionSubset] = None):
self.task = task
self.root = root
self.root = os.path.realpath(os.path.expanduser(root))
self.subset = subset
self._run = run
self._repoWalker = None # Created in prep
Expand Down