@classmodel/class

Web version of CLASS

https://github.com/classmodel/class-web

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

Web version of CLASS

Basic Info
Statistics
  • Stars: 0
  • Watchers: 5
  • Forks: 1
  • Open Issues: 30
  • Releases: 22
Created almost 2 years ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

CLASS-web

github repo badge Code quality npmjs.com Checked with Biome Research Software Directory Badge Documentation DOI

This is an implementation of the Chemistry Land-surface Atmosphere Soil Slab (CLASS) model that runs entirely in the browser.

For more information on CLASS, see https://classmodel.github.io/.

Web application

The CLASS web application (from apps/class-solid directory) is available at https://classmodel.github.io/class-web.

Command line usage

The class model can be run from the command line, see packages/class/README.md for more information.

Package usage

The class model can be used a package or library, see packages/class/README.md for more information.

The app uses a form component that has been generalized into a package, see packages/form/README.md for more information.

Developers

This repository is a so-called monorepo, where multiple packages and application can easily be developed in tandem.

We used TurboRepo for the initial setup, which uses pnpm workspaces under the hood. As such, it is possible to do advanced tricks with Turbo, such as "lint/test/build all apps/packages at once with turbo build", and share tooling configurations across packages/apps, but since this repo is small, we will not rely too much on these features.

Currently the repo is home to the following:

  • packages/
    • class: reimplementation of CLASS in typescript
  • apps/
    • class-solid: web application with a graphical user interface for CLASS

Publish package

To publish a new version of the class package:

  1. Bump version in **/package.json files. They should all have same version.
  2. Commit & push changes to main branch.
  3. Create a new GitHub release
    • Tag version and title should be the same as the version in the package.json file with v prefix.
    • Use Implementation of the Chemistry Land-surface Atmosphere Soil Slab (CLASS) model that runs entirely in the browser. as the description with generated release notes.
  4. A GitHub CI workflow will publish the package to npmjs

Local build

To run a local development version:

sh git clone git@github.com:classmodel/class-web.git cd class-web pnpm install pnpm dev

Linter & formatter

We use biome to lint and format the code. The following commands are available

```shell

To run linter and formatter use

pnpm format-and-lint

To fix formatting and some lint errors run

pnpm format-and-lint:fix

To run other biome comands use

pnpm exec biome --help ```

To check types, you can run the pnpm typecheck command as other commands ignore types.

Tests

The tests can be run with the following command:

shell pnpm test

Tech stack

The CLASS package is written in typescript. It uses a JSON schema to define the shape and constraints of a configuration. JSON schema is cross-langanuage and is ideal for sharing the configuration between web-app, library code, and perhaps other implementations of CLASS as well. To validate a configuration it uses the JSON schema together with ajv. Ajv is the reference JSON schema validator in then JS ecosystem.

The CLI uses Commander to parse the command line arguments. Commander is the most popular package for building command line interfaces with sub-command support in Mode.js.

The web application is build with solid.js. Solid is a relatively simple framework for building reactive web applications. With its metaframework SolidStart it is quite easy to pre-render the web application as static pages that can be hosted on github pages. To keep track of form state and errors it uses modular forms package.

We've chosen SolidUI as the basis for the UI. Build after ShadCN, SolidUI provides good-looking, accessible components (powered by Kobalte and tailwind) that can be copy-pasted into the web application and tweaked further as seen fit. It can also do charts, using chart.js, though we might deviate from that later.

To prevent the user interface from getting blocked by running the model we use a Web worker to run the computation in a background task/thread. We use comlink to wrap the Web Worker so it behaves the same as if the runner was used directly inside the main thread.

To format and lint the code, we use biome as it combines eslint, prettier in one package.

Further plans/ideas

  • Use auto for managing versions/releases
  • Use d3.js for more low-level charting
  • Use AssemblyScript or rust for a faster implementation of CLASS running on web assembly.
  • Use storybook for UI component package

Owner

  • Name: classmodel
  • Login: classmodel
  • Kind: organization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: CLASS-Web
message: >-
  Implementation of the Chemistry Land-surface Atmosphere
  Soil Slab (CLASS) model that runs entirely in the browser.
type: software
authors:
  - given-names: Peter
    family-names: Kalverla
    orcid: 'https://orcid.org/0000-0002-5025-7862'
    affiliation: Netherlands eScience Center
  - given-names: 'Stefan '
    family-names: Verhoeven
    affiliation: Netherlands eScience Center
    orcid: 'https://orcid.org/0000-0002-5821-2060'
  - given-names: Chiel
    name-particle: van
    family-names: Heerwaarden
    affiliation: Wageningen University and Research
    orcid: 'https://orcid.org/0000-0001-7202-3525'
  - given-names: Bart
    name-particle: 'van '
    family-names: Stratum
    orcid: 'https://orcid.org/0000-0002-7176-9875'
    affiliation: Wageningen University and Research
repository-code: 'https://github.com/classmodel/class-web'
url: 'https://classmodel.github.io/class-web/'
license: GPL-3.0-only

GitHub Events

Total
  • Create event: 51
  • Commit comment event: 1
  • Release event: 16
  • Issues event: 103
  • Delete event: 38
  • Issue comment event: 126
  • Push event: 205
  • Pull request event: 73
  • Pull request review event: 61
  • Pull request review comment event: 44
  • Fork event: 1
Last Year
  • Create event: 51
  • Commit comment event: 1
  • Release event: 16
  • Issues event: 103
  • Delete event: 38
  • Issue comment event: 126
  • Push event: 205
  • Pull request event: 73
  • Pull request review event: 61
  • Pull request review comment event: 44
  • Fork event: 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 51
  • Total pull requests: 29
  • Average time to close issues: 3 months
  • Average time to close pull requests: 19 days
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 0.98
  • Average comments per pull request: 0.76
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 49
  • Pull requests: 29
  • Average time to close issues: 3 months
  • Average time to close pull requests: 19 days
  • Issue authors: 3
  • Pull request authors: 3
  • Average comments per issue: 0.96
  • Average comments per pull request: 0.76
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Peter9192 (52)
  • sverhoeven (28)
  • Chiil (2)
Pull Request Authors
  • sverhoeven (35)
  • Peter9192 (32)
  • Chiil (1)
Top Labels
Issue Labels
priority (11) Layout (4) wontfix (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • npm 3 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 23
  • Total maintainers: 2
npmjs.org: @classmodel/form

Generate form from JSON schema with Solid UI components

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1 Last month
Rankings
Forks count: 12.4%
Stargazers count: 17.1%
Average: 22.6%
Dependent repos count: 25.0%
Dependent packages count: 36.1%
Maintainers (2)
Last synced: 8 months ago
npmjs.org: @classmodel/class

Chemistry Land-surface Atmosphere Soil Slab (CLASS) model

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2 Last month
Rankings
Dependent repos count: 25.6%
Average: 31.4%
Dependent packages count: 37.2%
Maintainers (2)
Last synced: 8 months ago

Dependencies

package.json npm
  • eslint ^8.57.0 development
  • prettier ^3.2.5 development
  • turbo ^2.0.6 development
packages/class/package.json npm
  • @repo/eslint-config workspace:* development
  • @repo/typescript-config workspace:* development
  • eslint ^8.57.0 development
  • typescript ^5.3.3 development
  • zod ^3.23.8
  • zod-to-json-schema ^3.23.1
packages/config-eslint/package.json npm
  • @typescript-eslint/eslint-plugin ^7.1.0
  • @typescript-eslint/parser ^7.1.0
  • eslint-config-prettier ^9.1.0
packages/config-typescript/package.json npm
pnpm-lock.yaml npm
  • android-arm64@0.19.7
  • android-arm@0.19.7
  • android-x64@0.19.7
  • config-array@0.11.14
  • darwin-arm64@0.19.7
  • darwin-x64@0.19.7
  • eslint-plugin@7.1.0
  • eslint-utils@4.4.0
  • eslintrc@2.1.4
  • freebsd-arm64@0.19.7
  • freebsd-x64@0.19.7
  • fs.scandir@2.1.5
  • fs.stat@2.0.5
  • fs.walk@1.2.8
  • js@8.57.0
  • json-schema@7.0.15
  • linux-arm64@0.19.7
  • linux-arm@0.19.7
  • linux-ia32@0.19.7
  • linux-loong64@0.19.7
  • linux-mips64el@0.19.7
  • linux-ppc64@0.19.7
  • linux-riscv64@0.19.7
  • linux-s390x@0.19.7
  • linux-x64@0.19.7
  • module-importer@1.0.1
  • netbsd-x64@0.19.7
  • object-schema@2.0.2
  • openbsd-x64@0.19.7
  • parser@7.1.0
  • pico@2.0.6
  • regexpp@4.10.0
  • rollup-android-arm-eabi@4.5.2
  • rollup-android-arm64@4.5.2
  • rollup-darwin-arm64@4.5.2
  • rollup-darwin-x64@4.5.2
  • rollup-linux-arm-gnueabihf@4.5.2
  • rollup-linux-arm64-gnu@4.5.2
  • rollup-linux-arm64-musl@4.5.2
  • rollup-linux-x64-gnu@4.5.2
  • rollup-linux-x64-musl@4.5.2
  • rollup-win32-arm64-msvc@4.5.2
  • rollup-win32-ia32-msvc@4.5.2
  • rollup-win32-x64-msvc@4.5.2
  • scope-manager@7.1.0
  • semver@7.5.6
  • structured-clone@1.2.0
  • sunos-x64@0.19.7
  • type-utils@7.1.0
  • types@7.1.0
  • typescript-estree@7.1.0
  • utils@7.1.0
  • visitor-keys@7.1.0
  • win32-arm64@0.19.7
  • win32-ia32@0.19.7
  • win32-x64@0.19.7
  • word-wrap@1.2.6
apps/class-solid/package.json npm
  • @kobalte/core ^0.13.3
  • @repo/class workspace:*
  • @solid-primitives/refs ^1.0.8
  • @solidjs/router ^0.14.1
  • @solidjs/start ^1.0.4
  • autoprefixer ^10.4.19
  • chart.js ^4.4.3
  • class-variance-authority ^0.7.0
  • clsx ^2.1.1
  • postcss ^8.4.38
  • solid-js ^1.8.18
  • tailwind-merge ^2.4.0
  • tailwindcss ^3.4.4
  • tailwindcss-animate ^1.0.7
  • vinxi ^0.3.14