drasil

Generate all the things (focusing on research software)

https://github.com/jacquescarette/drasil

Science Score: 46.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 50 committers (6.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.1%) to scientific vocabulary

Keywords

code-generation documentation-generator drasil-framework dsl haskell haskell-language knowledge scientific

Keywords from Contributors

interactive mesh interpretability profiles sequences generic projection standardization optim embedded
Last synced: 6 months ago · JSON representation

Repository

Generate all the things (focusing on research software)

Basic Info
Statistics
  • Stars: 158
  • Watchers: 15
  • Forks: 28
  • Open Issues: 452
  • Releases: 1
Topics
code-generation documentation-generator drasil-framework dsl haskell haskell-language knowledge scientific
Created over 11 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation Codeowners

README.md

Drasil Build Status

DOI

Generate all the Things! Visit our website to see all of the currently generated artifacts.

Drasil Tree

Table of Contents

  1. What is Drasil?
  2. Quick Start
  3. Building Specific Examples
  4. Running the Example(s)
  5. Finding / Building the Haddock Documentation
  6. Repository Contents

What is Drasil?

For well understood domains, building software ought to be a matter of engineering, based on solid scientific foundations. The ultimate test of "well understood" is being able to teach the domain language to a computer. Drasil is a framework for generating all of the software artifacts for (well understood) research software, from the natural knowledge base of the domain.

We take advantage of the inherent duplication of knowledge present in software artifacts (code, specification, tests, etc). More precisely, we capture the information present in software artifacts so that the particular view of that information in the artifacts can be reproduced by Drasil. For example, the equation F = ma will look different when rendered in documentation and in Java or Python, although it will mean the same thing. In this way, we obtain traceability: we know the exact relationship between information in the specification document and in the code and, furthermore, we know that they are coherent by construction.

Drasil is based on a combination of the following ideas:

  1. domain knowledge changes very slowly
  2. software in well-understood domains can be programmatically assembled from existing knowledge
  3. the various artifacts that make up software are different views on the same knowledge
  4. the most important information in crafting software are the design decisions and their rationale
  5. a lot of software lives for a very long time (10+ years, often as long as 40 years), which needs a different approach

To better understand the requirements for Drasil, we follow an example-driven approach, based on a set of case studies. This is akin to test-driven engineering but at the system level. The currently generated examples serve as a good introduction to what we mean.

We wrote a position paper detailing our original ideas - but this is getting somewhat obsolete now. You can also take a look at a poster. For more information on the details of Drasil, please see the Drasil Wiki. A collection of Drasil-related papers can be found here. To contribute to this project, visit the Contributor's Guide.

Quick Start

If you are on Windows, we recommend you use Cygwin. If you already have Git Bash installed, you can use that instead; you will just need to download util-linux-ng, which includes various system utilities (one of our scripts uses rev), and add its bin/ to your PATH. make is required as well and can be installed following these steps; on MacOS, you may need to install XCode to get that. Most Linux installs have it by default. You may also need to install git.

  1. Ensure you have Stack installed (if you have the Haskell Platform, you should already have Stack).
  2. If using Windows, you might need to add an exclusion to Windows Security for your bin/ folder where your stack.exe is to prevent Windows Security from blocking or even deleting the executable.
    • This can be done by going to Start > Settings > Update & Security > Windows Security > Virus & threat protection > Manage settings (under Virus & threat protection settings) > Add or remove exclusions (under Exclusions), then selecting the bin/ folder with your stack.exe
    • If Windows Security deletes the executable, simply reinstall it
    • This issue was encountered in Windows 10
  3. Run stack setup while in ./code/
    • Remember to change your working directory to ./code/ first
    • Use cd to change working directory, pwd to print your current working directory
    • Refer to File Directory for further help regarding file directory commands
    • e.g. ./Users/.../GitHub/Drasil/code (on MacOS)
  4. Use the basic make command to build Drasil and run all examples.
    • Run make help for a list of available commands.
    • Warning: this entire process takes around 10-15 minutes to complete (MacOS estimate)
  5. You can find the generated output in the build folder that appears in the ./code/ folder. Each example will have its own subdirectory.

For more information, please visit the New Workspace Setup Wiki.

Building Specific Examples

Simply run: make argument to build and run the corresponding example, where argument is detailed below:

Argument | Example -------- | ------- gamephysicsdiff | 2D Rigid Body Physics Library swhsdiff | Solar Water Heating System with Phase Change Material glassbrdiff | Glass-BR hghcdiff | HGHC Toy Example sspdiff | Slope Stability Analysis swhsnopcmdiff | Minimal SWHS Example, with PCM Removed projectilediff | Projectile Motion Analysis pdcontrollerdiff | Proportional Derivative Controller dblpenddiff | Double Pendulum sglpenddiff | Single Pendulum

For more commands related to Drasil, use make help or check out the Makefile documentation.

Running the Example(s)

Please note that if make has been used, the Software Requirements Specification (SRS) documents are already generated automatically and can be found in build. Automated testing can be done on these examples.

After building, you can run the examples by using stack exec NAME where NAME is detailed below:

NAME | Example ------|------- gamephysics | 2D Rigid Body Physics Library swhs | Solar Water Heating System with PCM (SWHS) glassbr | Glass-BR hghc | HGHC toy example ssp | Slope Stability Analysis (SSP) swhsnopcm | SWHS without PCM (SWHSNoPCM) projectile | Projectile motion analysis pdcontroller | Proportional Derivative Controller dblpend | Double Pendulum sglpend | Single Pendulum

This runs the examples manually from the .stack-work folder after building, and the generated docs will appear in this folder (i.e. in the SRS folders). Due to this placement, these generated versions will not be subject to automated tests. The tex files are generated, but they are not automatically compiled. To compile the tex files, use the generated Makefile (in the same folder as the tex file).

Finding / Building the Haddock Documentation

You can run make docs from the ./code/ folder to build the documentation. Note: this process can take about 10-12 minutes (MacOS estimate).

See the README in ./code/ for more information.

Citation

Please use our provided CITATION.cff file for our preferred citation information. GitHub provides an export of it in BibTeX and APA if needed.

For Any Developers

Please note that we only add to our CITATION.cff/preferred citation file on a consensual basis. If you would like your name added, please submit a PR with your information added to the CITATION.cff file.


Summary of Folder Structure and File Contents


code

  • The main folder for Drasil source code and example implementations

doc

  • Documents related to Drasil (contains the Contributor's Test)

notes

  • Assorted general/administrative notes

Papers

  • Subdirectory for papers related to Drasil framework, GOOL

People

  • Contains contributions specific to some contributors (not necessarily to be implemented in Drasil)

Presentations

  • Presentations on Literate Scientific Software and Drasil

WindowsFix

  • Contains registry files for adding and removing the autorun of the command chcp 65001. This is to fix an issue with unicode characters. ONLY affects Windows machines.

.gitattributes

  • Used by git (set language attributes so GitHub Linguist calculates code statistics as desired)

.gitignore

  • Used by git (specifies which file(type)s to ignore when committing)

CITATION.cff

  • Used to cite Drasil

LICENSE

  • License information

README.md

  • This file

Owner

  • Name: Jacques Carette
  • Login: JacquesCarette
  • Kind: user
  • Location: Hamilton, Ontario, Canada
  • Company: McMaster University

GitHub Events

Total
  • Fork event: 3
  • Create event: 161
  • Commit comment event: 3
  • Issues event: 139
  • Watch event: 17
  • Delete event: 144
  • Member event: 3
  • Issue comment event: 507
  • Push event: 546
  • Pull request review comment event: 374
  • Gollum event: 7
  • Pull request review event: 486
  • Pull request event: 311
Last Year
  • Fork event: 3
  • Create event: 161
  • Commit comment event: 3
  • Issues event: 139
  • Watch event: 17
  • Delete event: 144
  • Member event: 3
  • Issue comment event: 507
  • Push event: 546
  • Pull request review comment event: 374
  • Gollum event: 7
  • Pull request review event: 486
  • Pull request event: 311

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 13,175
  • Total Committers: 50
  • Avg Commits per committer: 263.5
  • Development Distribution Score (DDS): 0.888
Past Year
  • Commits: 689
  • Committers: 9
  • Avg Commits per committer: 76.556
  • Development Distribution Score (DDS): 0.713
Top Committers
Name Email Commits
Dan Szymczak d****k@g****m 1,482
Jason Balaci j****i@g****m 1,373
Brooks MacLachlan b****4@h****m 1,361
Maryyam Niazi n****3@m****a 1,218
Jacques Carette c****e@m****a 1,208
Sam Crawford s****2@g****m 926
Daniel Scime d****e@g****m 650
njericha n****a@e****a 580
Henry h****j@g****m 457
Ant13731 6****1 415
cd155 g****b@p****p 398
AKM11 m****a@m****a 369
palmerst p****4@m****a 254
Spencer Smith s****s@m****a 211
Brandon Bosman b****n@g****m 198
Harmanpreet Singh Sagar h****8@g****m 189
Noah c****n@m****a 180
cd155 g****b@d****e 164
BilalM04 b****2@g****m 156
Gabriel D'Alimonte g****e@g****m 155
elwazana e****a@m****a 153
Olu o****o@m****a 140
tingyu528 w****4@g****m 117
Ricky Zhuang h****g@o****m 103
muhammad ali a****2@m****a 102
deviprasad135 d****5@g****m 86
Awurama Nyarko a****o@y****k 68
Peter Michalski m****p@m****a 64
Nathaniel-Hu h****4@m****a 64
Stardew y****u@o****m 57
and 20 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 333
  • Total pull requests: 470
  • Average time to close issues: 9 months
  • Average time to close pull requests: 13 days
  • Total issue authors: 25
  • Total pull request authors: 15
  • Average comments per issue: 3.24
  • Average comments per pull request: 1.27
  • Merged pull requests: 322
  • Bot issues: 0
  • Bot pull requests: 34
Past Year
  • Issues: 94
  • Pull requests: 280
  • Average time to close issues: 10 days
  • Average time to close pull requests: 5 days
  • Issue authors: 9
  • Pull request authors: 11
  • Average comments per issue: 1.09
  • Average comments per pull request: 0.85
  • Merged pull requests: 188
  • Bot issues: 0
  • Bot pull requests: 24
Top Authors
Issue Authors
  • balacij (68)
  • smiths (52)
  • szymczdm (32)
  • bmaclach (31)
  • B-rando1 (28)
  • JacquesCarette (26)
  • jackwyand (14)
  • BilalM04 (12)
  • lmawarid (12)
  • Sodaaaa (9)
  • sarrasoussia (8)
  • palmerst (8)
  • samm82 (6)
  • NoahCardoso (6)
  • Xinlu-Y (4)
Pull Request Authors
  • balacij (127)
  • jackwyand (73)
  • B-rando1 (69)
  • daijingz (58)
  • dependabot[bot] (34)
  • NoahCardoso (31)
  • BilalM04 (30)
  • Xinlu-Y (18)
  • sarrasoussia (12)
  • smiths (7)
  • JacquesCarette (4)
  • CSchank (2)
  • hrzhuang (2)
  • peter-michalski (2)
  • TRISHI-L (1)
Top Labels
Issue Labels
design (38) newcomers (24) question (19) bug (17) artifacts (15) enhancement (13) meeting (12) easy (10) documentation (8) needs-design (6) needs-action-items (6) Low Priority (6) Expressions (3) High Priority (3) potential-project (2) stable-fix (2) needs-clarification (2) student-related (1) help wanted (1) verify-fixed (1) dev tools (1) blocked (1)
Pull Request Labels
dependencies (34) student-related (6) github_actions (3) documentation (3) enhancement (2) newcomers (2) question (1) design (1) Low Priority (1) easy (1)

Dependencies

.github/workflows/Build.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/cache v3.2.3 composite
  • actions/checkout v3 composite
  • haskell/actions/setup v2 composite
  • styfle/cancel-workflow-action 0.11.0 composite
.github/workflows/Lint.yaml actions
  • actions/checkout v4 composite
.github/workflows/Wiki.yaml actions
  • actions/checkout v4 composite