- Notifications
You must be signed in to change notification settings - Fork 3
feat(doc): 📝 add CITATION file #163
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a CITATION file to the repository and updates the initialization script to support dynamic metadata such as project title and author details.
- Updated the init function to accept first name, last name, and project title.
- Added new functions reset_cff and read_to_char to process metadata files.
- Introduced CITATION.cff, CITATION.cff.template, and added a YAML schema mapping in VSCode settings.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test.m | Modified test call to adapt to new init function parameters. |
| init.m | Updated init function signature and internal logic; added reset_cff and read_to_char functions. |
| CITATION.cff.template | Added template file for citation metadata. |
| CITATION.cff | Added initial citation file with preset metadata. |
| .vscode/settings.json | Added YAML schema configuration for CITATION.cff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds citation support and enhances the init script to accept more metadata and reuse file‐reading logic
- Introduces a
CITATION.cff.templateand generatesCITATION.cffvia a newreset_cffhelper - Refactors file I/O into
read_to_charand extendsinitto takefirst_name,last_name, andproject_title - Updates VS Code settings to apply a YAML schema for
CITATION.cff
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test.m | Updated init invocation to split full name and include title |
| init.m | Refactored signature, added read_to_char and reset_cff |
| CITATION.cff.template | Added base template for citation metadata |
| CITATION.cff | New generated citation file |
| .vscode/settings.json | Registered YAML schema for the citation file |
Comments suppressed due to low confidence (2)
init.m:142
- [nitpick] The return variable
read_charis easily confused with thechartype; consider renaming it to something more descriptive likefile_contentorcontent.
function read_char = read_to_char(file_name) init.m:132
- [nitpick] Deleting the template may prevent regenerating the citation file later; consider keeping
CITATION.cff.templatein place or backing it up instead of removing it.
delete_file('CITATION.cff.template'); ef0f720 to 2d78ffd Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for generating a CITATION.cff file and extends the init script to accept first name, last name, and project title parameters, refactoring file I/O into reusable helpers.
- Introduce
CITATION.cff.templateand generateCITATION.cffduring initialization - Refactor reading logic into
read_to_charand addreset_cffhelper - Update
test.m, VSCode settings, and.gitattributesfor the new citation workflow
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test.m | Update init call to new signature with first/last name and project title |
| init.m | Extend function signature, add reset_cff, read_to_char, and refactor file operations |
| CITATION.cff.template | Add template for citation metadata |
| CITATION.cff | Add generated citation metadata file |
| .vscode/settings.json | Add YAML schema mapping for CITATION.cff |
| .gitattributes | Mark CITATION.cff as export-ignore |
Comments suppressed due to low confidence (4)
init.m:142
- [nitpick] The output variable
read_charis ambiguous; consider renaming it to something likefile_contentto clarify its purpose.
function read_char = read_to_char(file_name) test.m:1
- The test invocation was updated but there's no assertion for the new citation output; consider adding a test to verify
CITATION.cffgeneration.
init(1984, 'George', 'Orwell', '1984', self_delete=false, reset_test=false); CITATION.cff:26
- [nitpick] The keyword 'Github Actions' should be 'GitHub Actions' to match official branding.
- Github Actions init.m:132
- Deleting the template file prevents subsequent regenerations of
CITATION.cff. Consider preserving or renaming the template instead.
delete_file('CITATION.cff.template'); There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for generating a CITATION.cff file and refactors initialization logic for customizable metadata.
- Introduces
CITATION.cff.templateand auto-generatesCITATION.cffin the init script - Refactors file‐reading into a reusable
read_to_charhelper and updatesinitparameters to acceptfirst_name,last_name, andproject_title - Updates test invocation, README formatting, editor settings, and export rules for the new citation file
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test.m | Updated init call to use separate first/last name and project title |
| init.m | Extended signature, refactored file I/O, added reset_cff and read_to_char |
| README.md | Added blank line before Pages deployment section |
| CITATION.cff.template | New citation-file-format template |
| CITATION.cff | Example generated citation metadata |
| .vscode/settings.json | Added YAML schema mapping for CITATION.cff |
| .gitattributes | Marked CITATION.cff as export-ignore |
| .cspell.json | Added author names and ORCID to custom dictionary |
Comments suppressed due to low confidence (1)
test.m:1
- Consider adding a test case to verify that
CITATION.cffis created with the expected content after runninginit, covering the new citation-generation feature.
init(1984, 'George', 'Orwell', '1984', self_delete=false, reset_test=false); Add CITATION.cff and update init script for metadata Introduces a CITATION.cff file to provide citation metadata for the project, adhering to the citation-file-format standard. Enhances the `init` script to support customizable project title and author details, enabling dynamic updates to metadata files like LICENSE and CITATION. Improves maintainability by refactoring file reading logic into a reusable function and adding support for resetting the citation file template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for a CITATION.cff file and refactors the init script to bolster metadata customization and reuse.
- Introduces
CITATION.cff.templateand generatesCITATION.cffwithreset_cff - Refactors file-reading logic into a new
read_to_charhelper - Updates
initsignature to accept separate first/last names and a project title
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test.m | Updated init invocation to match new signature |
| init.m | Refactored file I/O, added read_to_char and reset_cff |
| README.md | Added blank line for formatting |
| CITATION.cff.template | Added new citation file template |
| CITATION.cff | Added generated citation metadata |
| .vscode/settings.json | Registered YAML schema for CITATION.cff |
| .gitattributes | Excluded CITATION.cff from exports |
| .cspell.json | Added author-specific terms for spell checking |
Comments suppressed due to low confidence (2)
init.m:130
reset_cffand its template-deletion behavior aren’t covered by existing tests. Add unit tests to verify CITATION.cff content and that the template file is properly removed.
function reset_cff(first_name,last_name,project_title) init.m:138
- There’s no concatenation operator (
+) before the continuation on the next line, causing a syntax error. Add a+at the start of the following line so the string fragments combine correctly.
+ " given-names: " + first_name + "\n"...
Add CITATION.cff and update init script for metadata
Introduces a CITATION.cff file to provide citation metadata for the project, adhering to the citation-file-format standard.
Enhances the
initscript to support customizable project title and author details, enabling dynamic updates to metadata files like LICENSE and CITATION.Improves maintainability by refactoring file reading logic into a reusable function and adding support for resetting the citation file template.
Closes #162