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
Repository
Web version of CLASS
Basic Info
- Host: GitHub
- Owner: classmodel
- License: gpl-3.0
- Language: TypeScript
- Default Branch: main
- Homepage: https://classmodel.github.io/class-web
- Size: 1.26 MB
Statistics
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 30
- Releases: 22
Metadata Files
README.md
CLASS-web
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:
- Bump version in
**/package.jsonfiles. They should all have same version. - Commit & push changes to main branch.
- Create a new GitHub release
- Tag version and title should be the same as the version in the package.json file with
vprefix. - 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.
- Tag version and title should be the same as the version in the package.json file with
- 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
- Repositories: 6
- Profile: https://github.com/classmodel
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
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
- Homepage: https://github.com/classmodel/class-web#readme
- License: Apache-2.0
-
Latest release: 0.3.0
published 11 months ago
Rankings
Maintainers (2)
npmjs.org: @classmodel/class
Chemistry Land-surface Atmosphere Soil Slab (CLASS) model
- Homepage: https://classmodel.github.io/class-web
- License: GPL-3.0-only
-
Latest release: 0.3.0
published 11 months ago
Rankings
Maintainers (2)
Dependencies
- eslint ^8.57.0 development
- prettier ^3.2.5 development
- turbo ^2.0.6 development
- @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
- @typescript-eslint/eslint-plugin ^7.1.0
- @typescript-eslint/parser ^7.1.0
- eslint-config-prettier ^9.1.0
- 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
- @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