8000 Sort reader names after adding plugins by domna · Pull Request #271 · FAIRmat-NFDI/pynxtools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Sort reader names after adding plugins #271

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

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pynxtools/dataconverter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_names_of_all_readers() -> List[str]:
path_prefix = (
f"{os.path.dirname(__file__)}{os.sep}" if os.path.dirname(__file__) else ""
)
files = sorted(glob.glob(os.path.join(path_prefix, "readers", "*", "reader.py")))
files = glob.glob(os.path.join(path_prefix, "readers", "*", "reader.py"))
all_readers = []
for file in files:
if f"{os.sep}base{os.sep}" not in file:
Expand All @@ -92,7 +92,7 @@ def get_names_of_all_readers() -> List[str]:
file[index_of_readers_folder_name:index_of_last_path_sep]
)
plugins = list(map(lambda ep: ep.name, entry_points(group="pynxtools.reader")))
return all_readers + plugins
return sorted(all_readers + plugins)


def get_nxdl_root_and_path(nxdl: str):
Expand Down
0