title | author | institute | description | urlcolor | linkstyle | aspectratio | createDate | updateDate | pubDate | place | date | section-titles | toc | keywords | url | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CMTools, CodeMeta driven builds |
R. S. Doiel, <[email protected]> |
Caltech Library,
Digital Library Development
|
Caltech Library Digital Development Group presentation |
blue |
bold |
169 |
2025-01-13 |
2025-01-13 |
TBD |
TBD |
2025-01-13 |
false |
true |
|
CMTools provides a means of generating and maintain various software artifacts based on the contents of your CodeMeta file.
Software Artifacts : Project related files that related to development, build and release processes
Example: about Markdown page, CITATION.cff, version files
- CodeMeta is a maturing spec supporting metadata about projects
- We already use it when we import software to our data repository
- It is a superset of CITATION.cff used for search and discovery on GitHub
- Initial projects setup
- Maintenance of CodeMeta driven software artifacts
- Avoid the challenges of hand editing GitHub template documents
- Avoid copy edit cycles
In the old days ....
- go to GitHub
- clone a template repository to get basic software artifacts
- edit all the artifact (tedious, often not done)
- start documenting and coding the project (the real work)
- go to GitHub
- clone template repository
- edit three artifacts (e.g. codemeta.json, README, INSTALL)
- generate artifacts with CMTools
- start documenting and coding the project (the real work)
The generated artifacts can be maintained with the same command that generated them.
The artifact are easy to keep up to date.
Go through each artifact and edit it
- very tedious
- often incomplete done
- lower quality -> higher maintenance
One command for each supported language:
- Python
cmt codemeta.json CITATION.cff about.md version.py
- Go
cmt codemeta.json CITATION.cff about.md version.go
- JavaScript
cmt codemeta.json CITATION.cff about.md version.js
- TypeScript
cmt codemeta.json CITATION.cff about.md version.js
One command versus hand editing!
- CITATION.cff
- about.md
- version.(ts|go|js|py)
- page.(tmpl|hbs)
cmt
can managecmt
Deno tasks- Deno tasks can be used to build non-Deno projects
- Deno works the same on Windows, macOS and Linux
CodeMeta file could be used to generate
- README.md
- INSTALL.md
- install scripts for Windows, macOS and Linux
- .gitignore
CodeMeta .otherRequiredSoftware
attribute could be used to check if your dev environment is setup correctly.
Many times it's easy to forget to update your CodeMeta file until you're trying to import it into the data repository. A better approach is to have the codemeta file actually be part of your build and release process. That way version information is consistent and specific. It can also be easily reflected in the documentation of your project's website. Having/maintaining a project website becomes trivial for each new release.
The overhead of manually editing files or maintaining complex scripts to editor those files is problematic.
Just generating the files and refreshing the generated files is easier and simpler.
CMTools highly experimental. Build from source.
- Install deno
- Clone the CMTools
- Change into the cloned directory
- Run
deno install npm:handlebars
- Run
deno task build
- Copy the resulting
bin/cmt
orbin/cmt.exe
to you home "bin" directory
For macOS and Linux
curl -L https://caltechlibrary.github.io/CMTools/installer.sh | sh
For Windows (using Powershell)
irm https://caltechlibrary.github.io/CMTools/installer.ps1 | iex
Software lives longer than expected, long lived software requires maintenance
- CMTools: https://caltechlibrary.github.io/CMTools
- on GitHub: https://github.com/caltechlibrary/CMTools
- CodeMeta: https://codemeta.github.io
- Deno: https://deno.com
Thank you!