Skip to content

Conversation

@PGijsbers
Copy link
Contributor

@PGijsbers PGijsbers commented Nov 21, 2024

Change

Add the source attribute to the News item.

How to Test

The unit test is updated. Manual tests can be performed with the REST API.
First, make sure you have a database that's up-to-date with develop (for example, by clean.shing the data directory, and uping the REST API). Upload a news item. Check out this feature branch, apply the migration, and test with the REST API (can you now add a source to the old item? create a new item with a source?).

Checklist

  • Tests have been added or updated to reflect the changes, or their absence is explicitly explained.
  • Documentation has been added or updated to reflect the changes, or their absence is explicitly explained.
  • A self-review has been conducted checking:
    • No unintended changes have been committed.
    • The changes in isolation seem reasonable.
    • Anything that may be odd or unintuitive is provided with a GitHub comment explaining it (but consider if this should not be a code comment or in the documentation instead).
  • All CI checks pass before pinging a reviewer, or provide an explanation if they do not.

Related Issues

@PGijsbers PGijsbers marked this pull request as ready for review November 21, 2024 10:08
assert (
response_json["source"]
== "https://tailor-network.eu/shaping-the-future-of-ai-within-the-eu/"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is ugly, but black formatting. I hope to change the formatter to a modern release, preferably also ruff instead of black, so don't feel like working around this right now.

@PGijsbers PGijsbers changed the title Metadata/news source Add source field to News asset Nov 21, 2024
While it is the default, I think important information like allowing
NULL values is better left explicit.
@PGijsbers PGijsbers force-pushed the metadata/news-source branch from 65d62fa to 14b5c42 Compare December 4, 2024 08:43
@PGijsbers PGijsbers requested a review from Taniya-Das December 4, 2024 08:49
Copy link
Collaborator

@Taniya-Das Taniya-Das left a comment

Choose a reason for hiding this comment

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

It looks good to me. Tested with the REST API by adding a source to an existing item, and by creating a new item with a source.

@PGijsbers PGijsbers merged commit 4317819 into develop Dec 16, 2024
1 check passed
@PGijsbers PGijsbers deleted the metadata/news-source branch December 16, 2024 12:08
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.

3 participants