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

Added csv parser to Tabledoc #275

Merged
merged 31 commits into from
Jan 3, 2025
Merged

Added csv parser to Tabledoc #275

merged 31 commits into from
Jan 3, 2025

Conversation

jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Dec 19, 2024

Description

Added csv parser to Tabledoc (using the built-in csv module).

Note: This PR builds on top of PR #273

Type of change

  • Bug fix and code cleanup
  • New feature
  • Documentation update
  • Testing

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?
  • Is the code properly tested?

jesper-friis and others added 12 commits December 15, 2024 19:18
  - Allow to add other types of entries to the triplestore that are not
    datasets. Ex: samples, models, instruments, people, projects...
  - Renamed list_data_iris() to search_iris(). It can now be use to search
    for all types of entries.
  - Renamed prepare() to as_jsonld() and made it part of the public API
@jesper-friis jesper-friis changed the title Added csv parser to Tabledoc (using the built-in csv module) Added csv parser to Tabledoc Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.66%. Comparing base (c84bae1) to head (85a51ae).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
+ Coverage   78.46%   78.66%   +0.20%     
==========================================
  Files          21       21              
  Lines        2206     2222      +16     
==========================================
+ Hits         1731     1748      +17     
+ Misses        475      474       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jesper-friis jesper-friis changed the base branch from master to tabledoc December 19, 2024 12:24
Copy link
Contributor

@torhaugl torhaugl left a comment

Choose a reason for hiding this comment

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

Verify that test works

Comment on lines 84 to 86
# if True:
def test_parse_csv():
"""Test parsing a csv file."""
Copy link
Contributor

Choose a reason for hiding this comment

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

The output of this tests seems wrong?

@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix emmo: <https://w3id.org/emmo#> .

<https://he-matchmaker.eu/data/sem/SEM_cement_batch2> a dcat:Dataset,
        emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a .

<https://he-matchmaker.eu/data/sem/SEM_cement_batch2/77600-23-001> a dcat:Dataset,
        emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a .

<https://he-matchmaker.eu/data/sem/SEM_cement_batch2/77600-23-001/77600-23-001_5kV_400x_m001> a dcat:Dataset,
        emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a .

<https://he-matchmaker.eu/sample/SEM_cement_batch2/77600-23-001> a dcat:Dataset,
        emmo:EMMO_194e367c_9783_4bf5_96d0_9ad597d48d9a .

Copy link
Contributor Author

@jesper-friis jesper-friis Dec 30, 2024

Choose a reason for hiding this comment

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

The output of this tests seems wrong?

Well spottet! It is corrected now.

@jesper-friis jesper-friis mentioned this pull request Dec 30, 2024
10 tasks
Base automatically changed from tabledoc to master January 3, 2025 22:25
@jesper-friis jesper-friis merged commit 415fa4f into master Jan 3, 2025
21 checks passed
@jesper-friis jesper-friis deleted the tabledoc-csv branch January 3, 2025 22:34
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