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 xgi_data.py #254

Merged
merged 10 commits into from
Dec 20, 2022
Merged

Update xgi_data.py #254

merged 10 commits into from
Dec 20, 2022

Conversation

acuschwarze
Copy link
Collaborator

*added a download_xgi_data function that download data from gitlab to a local directory
*changed load_xgi_data so that it can now load data from online sources and local files. For loading data from online sources, it is now using the index.json and the data stored on gitlab.
*some refactoring so that load_xgi_data and download_xgi_data can use the same code snippets

@maximelucas
Copy link
Collaborator

Nice thanks a lot Alice, looks good!
Couple of details I was wondering about, some of which you already fixed.

Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
elif path[-1]=='\\':
path = path.replace('\\', '/')

filepath = path + dataset + '.json'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you simplify this by doing something with os.path? Like os.path.join() or something like that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! just did

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you're missing the ".json" now if I'm not mistaken.

acuschwarze and others added 3 commits December 19, 2022 17:01
Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
@nwlandry
Copy link
Collaborator

Pending changing "jason" to "json", I would say that this is good to go! I'll add an issue for potentially changing _make_unix_file_path to os.path.join() in the future.

Copy link
Collaborator

@nwlandry nwlandry left a comment

Choose a reason for hiding this comment

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

Nice work! See comments in the main conversation! You should be able to squash and merge? Let me know if not.

@maximelucas maximelucas self-requested a review December 20, 2022 12:40
@maximelucas
Copy link
Collaborator

Nice, thanks!

@nwlandry nwlandry merged commit 49c462b into xgi-org:main Dec 20, 2022
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.

None yet

3 participants