diff --git a/news.yml b/news.yml index 900fa04..d50b191 100644 --- a/news.yml +++ b/news.yml @@ -74,7 +74,7 @@ - date: 2025-12-16 07:59:00-0400 description: >2+ - A new peer-community initiative [(PCI) in statistics and machine learning](A new https://statml.peercommunityin.org/), of which Computo is a partner, has launched! + A new peer-community initiative [(PCI) in statistics and machine learning](https://statml.peercommunityin.org/), of which Computo is a partner, has launched! We accept papers recommended by this PCI without further scientific evaluation, provided they pass the reproducibility test by formatting the article in accordance [with our guidelines](https://computo-journal.org/site/guidelines-authors.html). @@ -89,4 +89,3 @@ description: >2+ The next [2026 French Statistics Days](https://jds2026.sciencesconf.org/) is fast approaching and will take place in Clermont-Ferrand. To mark the occasion, [François-David Collin](https://fradav.perso.math.cnrs.fr/) is running a [workshop](https://computo-journal.org/jds2024-workshop/) on how to use Computo templates to help you prepare your submission with ease. - diff --git a/site/board.qmd b/site/board.qmd index 45d4e93..951c0fb 100644 --- a/site/board.qmd +++ b/site/board.qmd @@ -10,8 +10,8 @@ page-layout: article ## Chiefs Editors -- [Julien Chiquet](https://jchiquet.github.io), -Statistical learning for life science +- [Julien Chiquet](https://jchiquet.github.io), +Statistical learning for life science [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-3629-3429) *Université Paris-Saclay, AgroParisTech, INRAE, Paris, France* - [Pierre Neuvial](https://www.math.univ-toulouse.fr/~pneuvial/). Statistics. [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0003-3584-9998). *CNRS, Institut de Mathématiques de Toulouse, Toulouse, France* @@ -24,7 +24,7 @@ Topological data analysis. [![ORCID](https://orcid.org/sites/default/files/image - [Marie-Pierre Etienne](https://marieetienne.github.io/) Statistical methods for ecology. [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-2097-2267). *ENSAI CREST, Rennes, France* -- [Aymeric Stamm](https://astamm.github.io/) +- [Aymeric Stamm](https://astamm.github.io/) Research Engineer, Statistics.[![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-8725-3654). *Laboratoire de Mathématiques Jean Leray, Nantes› CNRS, France* - [Nelle Varoquaux](https://nellev.github.io/) @@ -32,18 +32,18 @@ Machine learning and causal inference for genomics [![ORCID](https://orcid.org/s ## Technical Support -- [François-David Collin](https://fradav.github.io/) -Research Engineer, Biostatistics. [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-8374-7163). *Institut Montpelliérain Alexander Grothendieck, CNRS, France* +- [François-David Collin](https://fradav.github.io/) +Research Engineer, IA applied to Micro-electronics. [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-8374-7163). *Laboratoire d’Informatique, de Robotique et de Microélectronique de Montpellier, CNRS, France* ## Community Management -- [Chloé-Agathe Azencott](https://cazencott.info/) +- [Chloé-Agathe Azencott](https://cazencott.info/) Machine learning for therapeutic research [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0003-1003-301X). *Mines ParisTech, Institut Curie and INSERM, Paris, France* ## Former contributors - [Mathurin Massias](https://mathurinm.github.io/) -Optimization for Machine Learning. +Optimization for Machine Learning. Mathurin greatly contributed to the initial launch of the journal and the technical aspects [![ORCID](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-8950-0356). diff --git a/src/PublicationUpdater/PublicationUpdater.fs b/src/PublicationUpdater/PublicationUpdater.fs index 817d35f..da1daf7 100644 --- a/src/PublicationUpdater/PublicationUpdater.fs +++ b/src/PublicationUpdater/PublicationUpdater.fs @@ -37,15 +37,19 @@ module Generator = let private publishedRe = Regex(@"^published(_|-)\d+") let private redirectStringRe = Regex(@"URL='(.*)'") - let normalizeDraftValue (raw: string) = - if String.IsNullOrWhiteSpace(raw) then - "false" - elif raw.Equals("true", StringComparison.OrdinalIgnoreCase) then - "true" - elif raw.Equals("false", StringComparison.OrdinalIgnoreCase) then - "false" - else - raw.ToLowerInvariant() + let (|Empty|True|False|Other|) (raw: string) = + match raw with + | _ when String.IsNullOrWhiteSpace raw -> Empty + | _ when raw.Equals("true", StringComparison.OrdinalIgnoreCase) -> True + | _ when raw.Equals("false", StringComparison.OrdinalIgnoreCase) -> False + | _ -> Other raw + + let normalizeDraftValue raw = + match raw with + | Empty -> "false" + | True -> "true" + | False -> "false" + | Other s -> s.ToLowerInvariant() let buildRssTitle (title: string) (authors: string) = if String.IsNullOrWhiteSpace(authors) then @@ -120,8 +124,10 @@ module Generator = HtmlDocument.Load(page + p)) |> Option.defaultValue htmlFirst + let bibtexCls = ".bibtex" + try - html.CssSelect(".bibtex").Head.InnerText() + html.CssSelect(bibtexCls).Head.InnerText() |> DirtyParser.bibTeXFromString |> _.Head |> Result.Ok diff --git a/src/QuartoInspect/QuartoClient.fs b/src/QuartoInspect/QuartoClient.fs index 325850f..bd92984 100644 --- a/src/QuartoInspect/QuartoClient.fs +++ b/src/QuartoInspect/QuartoClient.fs @@ -16,6 +16,16 @@ module QuartoClient = stdout: string executionTime: TimeSpan } + /// Utility function for erroring with about missing fields + let errorMissingFields (has: string -> bool) (fields: string list) = + let missingFields = fields |> List.filter (fun f -> not (has f)) + + if missingFields.Length > 0 then + let missingFieldNames = missingFields |> String.concat ", " + Result.Error $"Missing required fields: {missingFieldNames}" + else + Ok() + /// Run quarto inspect on a given path let runInspect (path: string) : Async> = async { @@ -74,14 +84,9 @@ module QuartoClient = let mutable elem = Unchecked.defaultof root.TryGetProperty(key, &elem) // Check required fields - if not (has "quarto") then - Result.Error "Missing required field: quarto" - elif not (has "engines") then - Result.Error "Missing required field: engines" - elif not (has "formats") then - Result.Error "Missing required field: formats" - else - Ok root + [ "quarto"; "engines"; "formats" ] + |> errorMissingFields has + |> Result.bind (fun () -> Ok root) with ex -> Error $"Invalid JSON: {ex.Message}" @@ -95,16 +100,9 @@ module QuartoClient = let mutable elem = Unchecked.defaultof root.TryGetProperty(key, &elem) // Check required fields - if not (has "quarto") then - Result.Error "Missing required field: quarto" - elif not (has "dir") then - Result.Error "Missing required field: dir" - elif not (has "engines") then - Result.Error "Missing required field: engines" - elif not (has "files") then - Result.Error "Missing required field: files" - else - Ok root + [ "quarto"; "dir"; "engines"; "files" ] + |> errorMissingFields has + |> Result.bind (fun () -> Ok root) with ex -> Error $"Invalid JSON: {ex.Message}"