Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Add an exists method #328

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Add an exists method #328

merged 1 commit into from
Jun 9, 2022

Conversation

cdmatters
Copy link
Contributor

@cdmatters cdmatters commented Jun 9, 2022

Maybe this is overkill, but i think it enables a good idiom:

import nle.dataset as nld

if not nld.db.exists():
    nld.db.create()
    nld.add_nledata_directory(path_to_dir, name)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 9, 2022
@nmurraygit nmurraygit self-requested a review June 9, 2022 16:53
Copy link

@nmurraygit nmurraygit left a comment

Choose a reason for hiding this comment

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

Reasonable os.path check added.

@cdmatters cdmatters merged commit d19075c into main Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants