Skip to content

Commit

Permalink
Merge pull request #29 from UCSD-E4E/25-as-a-user-i-would-like-e4edm-…
Browse files Browse the repository at this point in the history
…push-to-include-the-dataset-directory-so-that-i-do-not-lose-the-dataset-context

25 as a user i would like e4edm push to include the dataset directory so that i do not lose the dataset context
  • Loading branch information
ntlhui authored Mar 26, 2023
2 parents 0b6cc28 + b782ef6 commit f6242c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e4e_data_management/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ def push(self, path: Path) -> None:
self.active_dataset.validate()

# Duplicate to destination
self.duplicate([path])
destination = path.joinpath(self.active_dataset.name)
destination.mkdir(parents=True, exist_ok=False)
self.duplicate([destination])

def zip(self, output_path: Path) -> None:
"""This will zip the active and completed dataset to the specified path
Expand Down
2 changes: 2 additions & 0 deletions tests/test_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def test_push(single_mission_data: Tuple[Tuple[Mock, DataManager, Path], Tuple[P
push_path = Path(push_dir)
app.push(push_path)

assert push_path.joinpath(app.active_dataset.name).is_dir()

@pytest.mark.parametrize('readme_name', [
'readme.md',
'readme.MD',
Expand Down

0 comments on commit f6242c1

Please sign in to comment.