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

Dcat 2.1.0 #85

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Dcat 2.1.0 #85

merged 1 commit into from
Nov 20, 2024

Conversation

hcvdwerf
Copy link
Collaborator

@hcvdwerf hcvdwerf commented Nov 19, 2024

🚀 Pull Request Checklist

  • Title:

    • [x] Upgrade to DCAT 2.1.0
  • Description:

    • [x] Upgrade to DCAT 2.1.0 where contact, creator and publisher are correctly mapped
  • Context:

    • [x] Changed are made to keep changes as much as possible upstream
  • Changes:

    • [x ] Removed obsolete test cases. Upgrade to 2.1.0
  • Testing:

    • [x ] old test cases which are now removed still works.
  • Checklist:

    • [x ] I have checked that my code adheres to the project's style guidelines and that my code is well-commented.
    • [ x] I have performed self-review of my own code and corrected any misspellings.
    • [ x] I have made corresponding changes to the documentation (if applicable).
    • [ x] My changes generate no new warnings or errors.
    • [ x] I have added tests that prove my fix is effective or that my feature works.
    • [ x] New and existing unit tests pass locally with my changes.

Summary by Sourcery

Enhance dataset parsing by updating metadata fields, remove redundant tests, update documentation for new dependencies, and adjust CI workflow to use updated dependencies.

Enhancements:

  • Improve dataset parsing by updating the publisher and contact fields to include additional metadata such as email, identifier, and type.

CI:

  • Update CI workflow to use newer versions of ckanext-harvest and ckanext-dcat dependencies.

Documentation:

  • Update README to reflect new dependency versions and correct the link to the GDI harvester test information.

Tests:

  • Remove outdated and redundant test cases related to contact points and creators, streamlining the test suite.

Copy link

sourcery-ai bot commented Nov 19, 2024

Reviewer's Guide by Sourcery

This PR updates the DCAT extension to version 2.1.0 and implements changes to simplify the codebase by removing redundant test cases and updating the metadata field handling. The implementation focuses on streamlining the contact point and creator handling while updating dependencies across the project.

ER diagram for updated dataset fields

erDiagram
    DATASET {
        string has_version
        string issued
        string modified
        string temporal_start
        string temporal_end
    }
    note for DATASET "Removed fields: creator"
Loading

Updated class diagram for FAIRDataPointDCATAPProfile

classDiagram
    class FAIRDataPointDCATAPProfile {
        +parse_dataset(dataset_dict: Dict, dataset_ref: URIRef) Dict
        +validate_tags(tags: List) List
    }
    note for FAIRDataPointDCATAPProfile "Removed methods: _contact_point_details, _parse_contact_point, _parse_creator"
Loading

File-Level Changes

Change Details Files
Simplified metadata field handling by removing custom parsing logic
  • Removed custom contact point parsing implementation
  • Removed custom creator parsing logic
  • Updated publisher field structure to include additional metadata fields
ckanext/fairdatapoint/profiles.py
Removed redundant test cases and test data
  • Removed tests for contact point URI handling
  • Removed tests for VCard contact point handling
  • Removed tests for creator parsing
  • Deleted unused test data files
ckanext/fairdatapoint/tests/test_profiles.py
ckanext/fairdatapoint/tests/test_data/contact_point_multiple_cards.ttl
ckanext/fairdatapoint/tests/test_data/contact_point_multiple_urls.ttl
ckanext/fairdatapoint/tests/test_data/contact_point_url.ttl
ckanext/fairdatapoint/tests/test_data/contact_point_vcard.ttl
ckanext/fairdatapoint/tests/test_data/creator_prisma.ttl
Updated project dependencies and documentation
  • Updated ckanext-harvest dependency to v1.6.0
  • Updated ckanext-dcat dependency to v2.1.0
  • Updated documentation links and dependency information
  • Modified CI workflow to use updated dependency versions
README.md
.github/workflows/test.yml
Reorganized schema field definitions
  • Reordered field definitions for better organization
  • Removed redundant creator field definition
ckanext/fairdatapoint/tests/test_data/scheming/schemas/gdi_userportal.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@hcvdwerf hcvdwerf marked this pull request as ready for review November 19, 2024 20:51
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @hcvdwerf - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding test coverage for the enhanced publisher and contact metadata fields to ensure the new functionality works as expected.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@hcvdwerf hcvdwerf merged commit f84abf4 into main Nov 20, 2024
2 checks passed
@hcvdwerf hcvdwerf deleted the dcat-2.1.0 branch November 20, 2024 16:03
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