Skip to content

Conversation

@fwkoch
Copy link
Member

@fwkoch fwkoch commented Oct 8, 2025

  • update myst libraries to latest
  • support community
  • allow depositing from a simple folder with just a myst.yml and other files, no md/ipynb article
  • hook up --publish flag

pages.map(({ file }) => file),
{ projectPath, imageExtensions: [] },
);
} catch (error) {
Copy link
Member Author

Choose a reason for hiding this comment

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

loadProject fails if myst does not find any .md/.ipynb/.myst.json files. This catch allows us to proceed with just metadata + files!

}
if (projectFrontmatter?.parts?.abstract) {
abstractPart = parseMyst(session, projectFrontmatter.parts.abstract.join('\n\n'), configFile);
const abstractContent = castSession(session).$getMdast(
Copy link
Member Author

Choose a reason for hiding this comment

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

Since the full MyST processing may not complete, getting the abstract is slightly less direct...

Comment on lines +442 to +444
if (community) {
data.communities = [{ identifier: community }];
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This directly adds the published deposit to this community.

Comment on lines +478 to +483
if (!filesToUpload?.length) {
filesToUpload = fs
.readdirSync(path.dirname(configFile))
.filter((file) => DEPOSIT_FILE_EXTENSIONS.find((ext) => file.toLowerCase().endsWith(ext)))
.map((file) => path.resolve(path.dirname(configFile), file));
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is another addition: If myst.yml does not specify downloads, we just grab all the files in the same folder with given extensions.

}
}
if (publish) {
const publishedData = await client.publishDeposition(zenodoDepositId);
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously, this method was defined but never used. Now, if you specify --publish, the deposit will be published!

project: { identifiers?: { zenodo?: string } };
};
const url = data?.project?.zenodo;
const url = data?.project?.identifiers?.zenodo;
Copy link
Member Author

Choose a reason for hiding this comment

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

Conforming to latest myst-frontmatter types.

* @param error Error object
*/
private handleError(error: any): void {
private handleError(error: any): never {
Copy link
Member Author

Choose a reason for hiding this comment

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

Nice trick for type safety when using a function that only throws errors.

@fwkoch fwkoch merged commit aa13918 into main Oct 9, 2025
3 checks passed
@fwkoch fwkoch deleted the updates-2025 branch October 9, 2025 16:53
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