Skip to content

Commit 2b4bc41

Browse files
committed
bump version; update NEWS and add docs for previous commits
1 parent 80d0de1 commit 2b4bc41

14 files changed

Lines changed: 252 additions & 27 deletions

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"Bash(R -q -e:*)",
3939
"WebFetch(domain:info.orcid.org)",
4040
"WebFetch(domain:orcid.org)",
41-
"WebFetch(domain:jpswalsh.github.io)"
41+
"WebFetch(domain:jpswalsh.github.io)",
42+
"WebFetch(domain:fontawesome.com)"
4243
],
4344
"deny": [],
4445
"ask": []

CLAUDE.md

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,63 @@ The package uses GitHub Actions for CI/CD. Check `.github/workflows/R-CMD-check.
4949

5050
When bumping the version in `DESCRIPTION`, add a new section to `NEWS.md` with the version number and date. Follow the existing format with `# codecheck X.Y.Z` headers.
5151

52+
## Design Principles
53+
54+
### Separation of Concerns: Data vs. Presentation
55+
56+
**CRITICAL PRINCIPLE**: R functions should focus on data preparation and logic, NOT HTML generation.
57+
58+
**✅ DO**:
59+
- Prepare data in R functions (e.g., extract metadata, create data structures)
60+
- Store HTML structure in template files (`.html`, `.md` with Mustache/Whisker placeholders)
61+
- Use R to populate template placeholders with data values
62+
- Return data objects (lists, data frames, strings) from R functions
63+
64+
**❌ DON'T**:
65+
- Generate HTML tags directly in R functions (e.g., `sprintf('<a href="%s">...</a>')`)
66+
- Build complex HTML structures using string concatenation in R
67+
- Mix presentation logic with data processing logic
68+
69+
**Example of correct approach**:
70+
71+
```r
72+
# R function - prepares data only
73+
generate_profile_data <- function(orcid) {
74+
profile <- get_profile(orcid)
75+
return(list(
76+
has_orcid = !is.null(profile$orcid),
77+
orcid = profile$orcid,
78+
has_github = !is.null(profile$github_handle),
79+
github_handle = profile$github_handle
80+
))
81+
}
82+
83+
# Template file (profile.html) - contains HTML structure
84+
# <a href="https://orcid.org/{{orcid}}">
85+
# <i class="ai ai-orcid"></i> {{orcid}}
86+
# </a>
87+
88+
# Rendering function - combines data with template
89+
render_profile <- function(orcid) {
90+
data <- generate_profile_data(orcid)
91+
template <- readLines("profile.html")
92+
whisker::render(template, data)
93+
}
94+
```
95+
96+
**Why this matters**:
97+
- **Maintainability**: HTML changes don't require R code changes
98+
- **Testability**: R functions can be tested without parsing HTML
99+
- **Readability**: Templates are easier to understand than R strings with escaped HTML
100+
- **Collaboration**: Designers can work on templates without touching R code
101+
- **Consistency**: CSS classes and HTML structure remain consistent across the codebase
102+
103+
**Current implementation**:
104+
- Template files in `inst/extdata/templates/` contain HTML structure
105+
- R functions use `whisker::render()` or `sprintf()` to fill placeholders
106+
- Functions like `generate_codechecker_profile_links()`, `generate_footer_build_info()`, and `generate_meta_generator_content()` return content strings without HTML wrapper tags
107+
- HTML wrapper tags (`<p>`, `<meta>`, etc.) are in template files
108+
52109
### Version Management
53110

54111
The package follows [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH):
@@ -254,7 +311,7 @@ The rendering process follows this sequence:
254311
- `render_register()` - Dispatches to format-specific renderer (MD, HTML, or JSON)
255312
- `generate_output_dir()` - Creates output directory path based on filter and subcategory
256313
- `generate_table_details()` - Creates metadata dict with name, slug, subcat, output_dir
257-
- `filter_and_drop_register_columns()` - Keeps only relevant columns per format (uses `CONFIG$REGISTER_COLUMNS`)
314+
- `filter_and_drop_register_columns()` - Selects and orders columns per filter and format (uses hierarchical `CONFIG$REGISTER_COLUMNS`)
258315
- `add_venue_hyperlinks_reg()` - Adds markdown links to venue pages
259316
- `add_venue_type_hyperlinks_reg()` - Adds markdown links to venue type pages
260317

@@ -315,13 +372,16 @@ The rendering process follows this sequence:
315372
The CONFIG environment stores all configuration as lists/vectors. Key elements:
316373

317374
**Table structure:**
318-
- `CONFIG$REGISTER_COLUMNS` - Columns to keep per output format (html, md, csv, json)
375+
- `CONFIG$REGISTER_COLUMNS` - Hierarchical column configuration: filter → file_type → columns
376+
- Special filter "default" used for main register and as fallback
377+
- Filter-specific configs (e.g., "venues", "codecheckers") can override defaults
378+
- Supports different column orders and selections per view
379+
- Example: `CONFIG$REGISTER_COLUMNS$default$html` or `CONFIG$REGISTER_COLUMNS$venues$json`
319380
- `CONFIG$MD_TABLE_COLUMN_WIDTHS` - Markdown column width specifications for register and non-register tables
320-
- `CONFIG$JSON_COLUMNS` - Column order for JSON output
381+
- `CONFIG$JSON_COLUMNS` - Column order for JSON output (featured.json and main register.json)
321382

322383
**Filtering:**
323384
- `CONFIG$FILTER_COLUMN_NAMES` - Maps filter name to register column (venues→Venue, codecheckers→Codechecker)
324-
- `CONFIG$FILTER_COLUMN_NAMES_TO_DROP` - Columns to drop for specific filters
325385
- `CONFIG$FILTER_SUBCAT_COLUMNS` - Maps filter to subcat column (venues→Type)
326386
- `CONFIG$FILTER_SUBCATEGORIES` - Lists subcats per filter (venues→[community, journal, conference, institution])
327387

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: codecheck
22
Title: Helper Functions for CODECHECK Project
3-
Version: 0.22.0.9000
3+
Version: 0.23.0
44
Authors@R:
55
c(person(given = "Stephen",
66
family = "Eglen",

NEWS.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
1+
# codecheck 0.23.0 (2025-11-12)
2+
3+
## Register Enhancements
4+
5+
* **Navigation header with logo**: All register pages now feature a navigation header with the CODECHECK logo in the top left, which serves as a home link back to the main register. Overview pages (main register, all venues, all codecheckers) include a menu in the top right with links to "All Venues", "All Codecheckers", and "About" (linking to the main CODECHECK website) for quick navigation
6+
* **Breadcrumb navigation**: All register pages now include breadcrumb navigation at the top, enabling easy navigation from detail pages back to overview pages. Breadcrumbs show hierarchical paths (e.g., CODECHECK Register > Venues > Journals > GigaScience) with clickable links to parent pages (addresses codecheckers/register#108)
7+
* **Configurable field ordering**: Register views now support per-filter column configuration, allowing different field orders and selections for main register vs. filtered views (venues, codecheckers). Main register now displays columns in the order: Certificate, Report, Title, Venue, Type, Check date (addresses #101)
8+
* **Context-aware field filtering**: Filtered views automatically exclude redundant fields (e.g., venue/type columns hidden on venue-specific pages, codechecker column hidden on codechecker pages)
9+
* **Hierarchical column configuration**: New `CONFIG$REGISTER_COLUMNS` structure with filter-specific overrides and automatic fallback to defaults for maximum flexibility
10+
* **Relative asset links**: Favicon and CSS stylesheet links in HTML headers now use relative paths calculated based on each page's depth, eliminating hard-coded absolute URLs and improving portability
11+
* **Build metadata in footer**: All register pages now display build information in muted text at the bottom of the footer, including timestamp, package version, codecheck package commit, and register commit with GitHub links (addresses #105)
12+
* **Dual commit tracking**: Footer now displays both codecheck package commit and register repository commit as clickable links to respective GitHub commits
13+
* **Meta generator tag**: HTML pages now include a properly formatted `<meta name="generator">` tag with package version and commit information (fixed display issue)
14+
* **Build metadata JSON**: A `.meta.json` file is now generated at the root of the docs directory containing build metadata for both repositories
15+
* **Icon font usage**: Replaced inline SVG logos with academicons and Font Awesome icon fonts for ORCID, GitHub, and Zenodo for cleaner HTML and easier maintenance
16+
* **Template-based HTML generation**: Moved HTML structure from R functions to template files, keeping R code focused on data preparation
17+
* **Codechecker profile links**: Individual codechecker pages now display ORCID and GitHub profile links above the table, pulling data from the codecheckers/codecheckers repository (addresses #73)
18+
* **ORCID branding compliance**: Codechecker pages now use the official ORCID iD logo and display full ORCID URLs (https://orcid.org/...) as required by ORCID brand guidelines
19+
* **Simplified codechecker titles**: Removed ORCID identifier from codechecker page titles for cleaner display (titles now show just "Codechecks by [Name]")
20+
* **Zenodo community link**: Added link to CODECHECK Zenodo Community in footer of all register pages alongside the GitHub organization link
21+
22+
## Bug Fixes
23+
24+
* **Fixed venue label error**: Resolved "venue_label must be size 1, not 12" error by ungrouping data frame before venue_label mutation in `create_all_venues_table()`
25+
* **Fixed NA codechecker handling**: Codecheckers without ORCID identifiers are now properly filtered out during register rendering, preventing creation of invalid "NA" directories
26+
27+
## New Functions
28+
29+
* **`generate_navigation_header()`**: Generates navigation header HTML with CODECHECK logo and conditional menu (menu shown only on main register page)
30+
* **`generate_breadcrumb()`**: Generates Bootstrap-styled breadcrumb navigation HTML based on page context (filter type, table details, and relative path)
31+
* **`calculate_breadcrumb_base_path()`**: Calculates relative path to register root based on page depth for breadcrumb links
32+
* **`get_build_metadata()`**: Retrieves build metadata including timestamp, package version, and git commit information from both register and codecheck package repositories
33+
* **`generate_meta_generator_content()`**: Creates meta generator content value (replaces `generate_meta_generator_tag()` to separate content from HTML structure)
34+
* **`generate_footer_build_info()`**: Generates HTML for displaying build information in page footers including both codecheck and register commits with GitHub links
35+
* **`write_meta_json()`**: Writes build metadata to .meta.json file in specified directory
36+
* **`get_codecheckers_data()`**: Fetches and caches codecheckers registry from codecheckers/codecheckers repository
37+
* **`get_codechecker_profile()`**: Retrieves profile information (name, GitHub handle, ORCID, fields, languages) by ORCID
38+
* **`generate_codechecker_profile_links()`**: Generates HTML for horizontal list of profile links with icons
39+
40+
## Documentation
41+
42+
* **Comprehensive register rendering documentation**: Expanded CLAUDE.md with detailed documentation of the register rendering system, including:
43+
- Complete rendering pipeline flow
44+
- Detailed descriptions of all 13 utility files
45+
- Configuration system documentation
46+
- Template system details
47+
- Output directory structure
48+
- Important implementation details
49+
* **Version management guide**: Added version management section to CLAUDE.md with procedures for bumping versions and release workflow
50+
151
# codecheck (development version)
252

53+
## Certificate Page Improvements
54+
55+
* **Fixed codechecker links**: Codechecker names on certificate pages now link to their register landing pages (e.g., `/register/codecheckers/0000-0001-2345-6789/`) instead of ORCID profiles, making it easier to see all codechecks by that person (fixes #141)
56+
* **Added Type and Venue links**: Certificate pages now display clickable links for both the venue type and venue name in the CODECHECK Details section, enabling easier navigation to filtered register views (e.g., `/register/venues/journals/` and `/register/venues/journals/gigascience/`) (fixes #142)
57+
* **Venue-based breadcrumb navigation**: Certificate pages now include breadcrumb navigation showing the venue hierarchy (e.g., CODECHECK Register > Venues > Journals > GigaScience > 2024-001), enabling easy navigation to the venue's register page with a single click
58+
59+
## Visual Improvements
60+
61+
* **ORCID brand color**: ORCID icons on codechecker profile pages now display in the official ORCID green (#A6CE39) for proper brand compliance
62+
* **Updated Zenodo icon**: Replaced the Zenodo icon with the official blue "Z" SVG from EPFL, providing a more recognizable and polished appearance in register page footers
63+
* **Improved icon alignment**: Applied vertical alignment adjustments (`-5px`) to Zenodo, GitHub, and ORCID icons across all register pages for better alignment with adjacent text
64+
65+
## Infrastructure Improvements
66+
67+
* **Local library management**: Removed all external CDN dependencies (Bootstrap, Font Awesome, Academicons) and implemented local library management system
68+
* **New function**: Added `setup_external_libraries()` to download and install CSS/JS libraries locally in `docs/libs/`, ensuring reproducibility and offline capability
69+
* **Provenance tracking**: All external libraries now include comprehensive provenance information (version, license, date configured) stored in `docs/libs/PROVENANCE.csv`
70+
* **Automatic setup**: Libraries are automatically downloaded during register rendering if not already present
71+
* **Documentation**: Generated README.md in `docs/libs/` documenting all installed libraries and their licenses
72+
73+
## Bug Fixes
74+
75+
* **Fixed register rendering error**: Fixed "missing value where TRUE/FALSE needed" error when rendering register pages by adding proper NULL check for table_details[["name"]]
76+
* **Fixed venue type hyperlinks**: Fixed venue type links in venue lists that were rendering as Markdown syntax instead of proper HTML links due to missing closing parenthesis
77+
78+
## Venue Configuration and Label Integration
79+
80+
* **Dynamic venue configuration**: Venue information is now loaded from a `venues.csv` file instead of being hardcoded in `config.R`, making it easier to add and manage venues
81+
* **GitHub label integration**: Venue lists now include GitHub issue labels for each venue, enabling direct links to open checks
82+
* **Enhanced JSON output**: The venues JSON at `/register/venues/index.json` now includes an "Issue label" field for each venue
83+
* **Open checks links**: Venue HTML pages now display links to view open GitHub issues for each venue using their corresponding label
84+
* **New function**: Added `load_venues_config()` to load venue configuration from CSV files with columns: `name`, `longname`, and `label`
85+
* **Register repository**: Created `venues.csv` in the register repository to store venue metadata and GitHub labels
86+
* **Test updates**: All tests updated to work with the new venue configuration system using test fixtures
87+
* **Breaking change**: `register_render()` now requires a `venues_file` parameter (defaults to "venues.csv" in the working directory)
88+
389
## GitHub Issue Validation
490

591
* **New validation function**: Added `validate_certificate_github_issue()` to verify that certificate identifiers exist in the codecheckers/register GitHub repository

man/generate_codechecker_profile_links.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_meta_generator_content.Rd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/generate_meta_generator_tag.Rd

Lines changed: 0 additions & 17 deletions
This file was deleted.

man/get_build_metadata.Rd

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_codechecker_profile.Rd

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_codecheckers_data.Rd

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)