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 plotting entrypoint with folder support #58

Closed
wants to merge 2 commits into from
Closed

Update plotting entrypoint with folder support #58

wants to merge 2 commits into from

Conversation

jteijema
Copy link
Member

@jteijema jteijema commented Sep 7, 2023

No description provided.

@PeterLombaers
Copy link
Member

Just to make clear what your intention is: You would like to be able to pass either a directory or a list of file paths to the asreview_files argument. And in case of a directory, it should plot all the .asreview files in that directory. It should not recursively go into subdirectories looking for .asreview files?

@PeterLombaers
Copy link
Member

In #59 you moved the part that produces a list of files from the input to a separate function _get_files. That seems nicer.

@@ -80,11 +80,17 @@ def execute(self, argv):
)
args = parser.parse_args(argv)

asreview_files = [
str(file)
Copy link
Member

Choose a reason for hiding this comment

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

Personally I always get a bit confused when reading list comprehensions with many parts. I really have to think hard to make sense of it. I would prefer something like

filepaths = []
for path in args.asreview_files:
    path = Path(path)
    ...
    filepaths.append(some_filepath) 

@jteijema jteijema closed this by deleting the head repository Apr 8, 2024
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