Skip to content

Add cover page with metadata - #180

Open
hranasit wants to merge 7 commits into
developfrom
feature/119-add-cover-page-with-metadata
Open

hranasit wants to merge 7 commits into
developfrom
feature/119-add-cover-page-with-metadata

Conversation

@hranasit

@hranasit hranasit commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator
  • Information required by the guidelines and aligned with the existing document templates in DSW has been added to the beginning of the document.
  • In the MS Word format, this information is placed on a separate first page or, if necessary, across the first few pages.
  • Some of the metadata is retrieved through additional API calls, while one part requires its own assignment.
  • Assignments related to the cover page are stored separately in the database.
  • The cover page is excluded from polishing.
  • Cover page translations are handled separately as well. Only field names are translated; field values are not.
  • The UI redesign can be postponed to the final issue, where we can come up with a larger, more coherent proposal that makes sense as a whole.
  • The cover page structure is defined in YAML, and the code responsible for generating it should be kept separately in the cover-page directory.
  • Contributors are users with EDIT permissions, as agreed with Marek.

Closes #119

  • MY PERSONAL TODO - delete other related branches after merge :) (feature/119-squashed, feature/119-add-a-guideline.......)

Cover page translations moved to branch https://github.com/ds-wizard/ai-document-plugin/tree/feature/119-backup-cover-page-translation

@hranasit
hranasit requested a review from MatejFrnka September 25, 2026 15:42
if value is None:
return ''
if isinstance(value, float) and math.isnan(value):
return ''

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think instead of writing this logic by hand, it would be better to use tabulate with dataframes (both dependencies already in the project). You can then do df.to_markdown

Comment thread plugin/src/components/ProjectTab.tsx Outdated
</span>
</label>

<CoverPagePreview

@MatejFrnka MatejFrnka Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this is more just an idea - you know the usecase better than me, but couldn't we merge this into the template - making each template either have it or not instead of specifying every time you run the dmp generation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Based on our meeting, we agreed to move the cover page checkbox to the template form.

Comment thread service/cover-page.yaml
value_key: description
preview: Named project versions and their descriptions, newest first. Empty if no versions are available.

sections:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think maybe we should add docs. I know there are parts of the project I worked on which should be documented and are not (such as the queueing mechanism). And i think this could also use documentation, because I have no idea what I am supposed to set here if I was someone trying to deploy this

Comment thread service/cover-page.yaml
sections:
- id: projects
title: Projects
content: >-

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would prefer to move this part into the user created template.

When creating a new template, users would be able to "add proects page"", it would then pre-fill the title and description for them, they would be able to edit it.

Upsides is that you would simplify the backend part since this change only touches frontend (don't know how we would handle multilingual support, maybe we would always use english for this part since the language is selected later anyway.)

Downside is that it would be harder to insert the page break. We would need to have an option to add page breaks into the template.

We can have a call about this and discuss

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Based on our meeting, we agreed to move the cover page checkbox to the template form.


async def translate(
self,
assignments: list[SerializedSectionAssignment],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is the translation necessary? Will user ever see the template text? If not, I would skip the translation, LLM should not care about the language of the template, it will simply produce the language specified by the user when generating based on a template. It does not matter what language the template is written in.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

or, if we keep it, it would be nice to run it in parallel with polishing to save time

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Based on our meeting, we agreed to keep the cover page in English and address the language setting more generally in a future issue.

)
serializable = [assignment.to_dict() for assignment in assignments]
serializable = (
existing_assignments

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would rather do explicit if existing_assignments is not None else ...

This is hard to read

'created_at': statement.excluded.created_at,
'assignments': statement.excluded.assignments,
**(
{'content_assignments': statement.excluded.content_assignments}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I dont like the way this looks, but maybe writing it in another more simple if/else way would take up too many lines :D

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.

Add a guideline-compliant cover page with document metadata

2 participants