Skip to content

Commit

Permalink
merge master to branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant13731 committed May 17, 2021
2 parents 4955870 + 699a9c4 commit 214a95c
Show file tree
Hide file tree
Showing 23 changed files with 162 additions and 278 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
on:
push:
branches: master
workflow_dispatch:
name: Build
defaults:
run:
shell: bash
working-directory: code
jobs:
auto-cancel:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ github.token }}
build:
needs: auto-cancel
name: "Build & Deploy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Update apt package list"
run: sudo apt-get update
- name: "Install system requirements"
run: sudo apt-get install -y libgmp-dev python3 graphviz doxygen fonts-lmodern texlive-bibtex-extra texlive-latex-extra texlive-science texlive-xetex texlive-luatex g++ default-jdk mono-devel
- name: "Install Stack"
uses: haskell/actions/setup@v1
with:
enable-stack: true
stack-no-global: true
stack-version: 'latest'
- name: "Update PATH"
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.swift/usr/bin" >> $GITHUB_PATH
- name: "HLint"
run: curl --max-time 60 -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .
- name: "Install dependencies"
run: stack --no-terminal test --bench --only-dependencies
- name: "Build"
run: make prog stackArgs="--no-terminal" GHCFLAGS="-Werror"
- name: "Stable"
run: make stackArgs="--no-terminal" NOISY=yes
- name: "TeX"
run: make tex SUMMARIZE_TEX=yes
- name: "Code"
run: make code
- name: "Doxygen"
run: make doxygen
- name: "Docs"
run: make docs haddockArgs="--no-haddock-deps --no-haddock-hyperlink-source"
- name: "Graphs"
run: make graphs
- name: "Build website"
run: |
LABEL_FILE=/tmp/ci_build_failures \
MANAGED_LABEL_FILE=/tmp/ci_managed_labels \
ALL_FUNCTIONS_FILE=$(mktemp) \
SHELL_OPTS_FILE=$(mktemp) \
bash scripts/deploy_wrapper.bash
- name: "Deploy 🚀"
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
git-config-name: ${{ secrets.BOT_NAME }}
git-config-email: ${{ secrets.BOT_EMAIL }}
token: ${{ secrets.BOT_TOKEN }}
branch: gh-pages
folder: code/deploy
commit-message: "${{ secrets.BOT_NAME }} deploy of master@${{ github.sha }}"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches: master
workflow_dispatch:
name: Drasil
name: Test
defaults:
run:
shell: bash
Expand Down Expand Up @@ -69,5 +69,3 @@ jobs:
run: make docs haddockArgs="--no-haddock-deps --no-haddock-hyperlink-source"
- name: "Graphs"
run: make graphs
- name: "Test Deploy"
run: sh scripts/maybe_test_deploy.sh
107 changes: 0 additions & 107 deletions .travis.yml

This file was deleted.

7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Drasil [![Build Status](https://travis-ci.com/JacquesCarette/Drasil.svg?branch=master)](https://travis-ci.com/JacquesCarette/Drasil)
Drasil [![Build Status](https://github.com/JacquesCarette/Drasil/actions/workflows/Build.yaml/badge.svg?branch=master)](https://github.com/JacquesCarette/Drasil/actions/workflows/Build.yaml)
[![DOI](https://zenodo.org/badge/23760783.svg)](https://zenodo.org/badge/latestdoi/23760783)
====================================================

Expand Down Expand Up @@ -117,14 +117,11 @@ See the [README](https://github.com/JacquesCarette/Drasil/tree/master/code#build
- Assorted general/administrative notes

.gitattributes
- Used by git
- 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)

.travis.yml
- Used for continuous integration with Travis CI

LICENSE
- License information

Expand Down
17 changes: 10 additions & 7 deletions code/drasil-data/Data/Drasil/Concepts/Math.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@ import Control.Lens ((^.))
mathcon :: [ConceptChunk]

mathcon = [amplitude, angle, area, axis, calculation, cartesian, centre, change, component,
constraint, diameter,equation, euclidN, euclidSpace, gradient, graph, laplaceTransform, law, line, matrix,
norm, normal, normalV, number, orient, parameter, perp, perpV, pi_, negInf, posInf, point,
probability, rOfChng, rate, rightHand, shape, surArea, surface, unitV, unit_, vector,
constraint, diameter, direction, equation, euclidN, euclidSpace, gradient, graph, laplaceTransform, law, line, matrix,
norm, normal, normalV, number, orient, origin, parameter, perp, perpV, pi_, negInf, posInf, positive, negative,
point, probability, rOfChng, rate, rightHand, shape, surArea, surface, unitV, unit_, vector,
xAxis, xCoord, xComp, xDir, yAxis, yCoord, yComp, yDir, zAxis, zCoord, zComp, zDir, iAngle]

mathcon' :: [CI]
mathcon' = [de, leftSide, ode, pde, rightSide]

amplitude, angle, area, axis, calculation, cartesian, centre, change, component, constraint,
diameter, equation, euclidN, euclidSpace, gradient, graph, laplaceTransform, law, line, matrix, norm,
normal, normalV, number, orient, parameter, perp, perpV, pi_, negInf, posInf, point, probability,
amplitude, angle, area, axis, calculation, cartesian, centre, change, component, constraint, diameter,
direction, equation, euclidN, euclidSpace, gradient, graph, laplaceTransform, law, line, matrix, norm, normal, normalV,
number, orient, origin, parameter, perp, perpV, pi_, negInf, posInf, positive, negative, point, probability,
rOfChng, rate, rightHand, shape, surArea, surface, unitV, unit_, vector, xAxis, xCoord, xComp, xDir,

yAxis, yCoord, yComp, yDir, zAxis, zCoord, zComp, zDir, iAngle :: ConceptChunk


Expand All @@ -44,6 +43,7 @@ component = dcc "component" (nounPhrase "component" "components") ("The sc
constraint = dcc "constraint" (cn' "constraint") "A condition that the solution must satisfy"
diameter = dcc "diameter" (cn' "diameter") ("Any straight line segment that passes through the center of the circle" ++
"and whose endpoints lie on the circle.")
direction = dcc "direction" (cn' "direction") "'which way' a vector points, extending from the tail to the tip"
equation = dcc "equation" (cn' "equation") "A statement that the values of two mathematical expressions are equal "
euclidSpace = dcc "euclidSpace" (cn' "Euclidean") ("Denoting the system of geometry corresponding to the geometry of ordinary" ++
"experience")
Expand All @@ -60,12 +60,15 @@ norm = dcc "norm" (cn' "norm") "the positive l
normal = dcc "normal" (cn' "normal" ) "an object that is perpendicular to a given object"
number = dcc "number" (cn' "number") "a mathematical object used to count, measure, and label"
orient = dcc "orientation" (cn' "orientation") "the relative physical position or direction of something"
origin = dcc "origin" (cn' "origin") "a fixed point of reference for the geometry of the surrounding space"
parameter = dcc "parameter" (cn' "parameter") "a quantity whose value is selected depending on particular circumstances"
--FIXME: Should "parameter" be in math?
perp = dcc "perp" (cn' "perpendicular") "At right angles"
pi_ = dcc "pi" (cn' "ratio of circumference to diameter for any circle") "The ratio of a circle's circumference to its diameter"
posInf = dcc "PosInf" (cn' "Positive Infinity") "the limit of a sequence or function that eventually exceeds any prescribed bound"
negInf = dcc "NegInf" (cn' "Negative Infinity") "Opposite of positive infinity"
positive = dcc "positive" (cn' "positive") "greater than zero"
negative = dcc "negative" (cn' "negative") "less than zero"
point = dccWDS "point" (pn' "point") $ S "An exact location, it has no size, only position" +:+
sParen (S "from" +:+ makeRef2S pointSource)
probability = dcc "probability" (cnIES "probability") "The likelihood of an event to occur"
Expand Down
8 changes: 4 additions & 4 deletions code/drasil-example/Drasil/DblPendulum/Assumptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Language.Drasil
import qualified Utils.Drasil.Sentence as S

import Data.Drasil.Concepts.Documentation (assumpDom)
import Data.Drasil.Concepts.Math (cartesian, xAxis, yAxis)
import Data.Drasil.Concepts.Math (cartesian, xAxis, yAxis, direction, origin, positive)
import Data.Drasil.Concepts.Physics (gravity, twoD, pendulum, motion)


Expand All @@ -26,12 +26,12 @@ cartCoordDesc :: Sentence
cartCoordDesc = S "A" +:+ (phrase cartesian `S.sIs` S "used")

cartCoordRightDesc :: Sentence
cartCoordRightDesc = S "The" +:+ phrase cartesian `S.sIs` S "right-handed where positive" +:+.
cartCoordRightDesc = S "The" +:+ phrase cartesian `S.sIs` S "right-handed where" +:+ phrase positive +:+.
phrase xAxis `S.sAnd` phrase yAxis +:+ S "point right up"

yAxisDirDesc :: Sentence
yAxisDirDesc = S "direction" `S.the_ofThe'` phrase yAxis `S.sIs` S "directed opposite to" +:+. phrase gravity
yAxisDirDesc = phrase direction `S.the_ofThe'` phrase yAxis `S.sIs` S "directed opposite to" +:+. phrase gravity

startOriginDesc :: Sentence
startOriginDesc = S "The" +:+. (phrase pendulum `S.sIs` S "attached" `S.toThe` S "origin")
startOriginDesc = S "The" +:+. (phrase pendulum `S.sIs` S "attached" `S.toThe` phrase origin)

8 changes: 4 additions & 4 deletions code/drasil-example/Drasil/DblPendulum/GenDefs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Utils.Drasil
import qualified Utils.Drasil.Sentence as S

-- import Data.Drasil.Concepts.Documentation (coordinate, symbol_)
import Data.Drasil.Concepts.Math (xComp, yComp, equation, component, angle)
import Data.Drasil.Concepts.Math (xComp, yComp, equation, component, direction, angle)
import Data.Drasil.Quantities.Physics(xPos, yPos, velocity, angularVelocity, xVel, yVel,
angularAccel, xAccel, yAccel, acceleration, force, tension, gravitationalAccel,
angularFrequency, torque, momentOfInertia, angularDisplacement, time,
Expand Down Expand Up @@ -63,7 +63,7 @@ velocityIXDerivSent2 = S "We also know the" +:+ phrase horizontal +:+ phrase pos
velocityIXDerivEqn2 = sy xPos $= sy lenRod * sin (sy pendDisplacementAngle)
velocityIXDerivSent3 = S "Applying this,"
velocityIXDerivEqn3 = sy xVel $= deriv (sy lenRod * sin (sy pendDisplacementAngle)) time
velocityIXDerivSent4 = E (sy lenRod) `S.sIs` S "constant with respect to time, so"
velocityIXDerivSent4 = E (sy lenRod) `S.sIs` S "constant" `wrt` S "time, so"
velocityIXDerivEqn4 = sy xVel $= sy lenRod * deriv (sin (sy pendDisplacementAngle)) time
velocityIXDerivSent5 = S "Therefore, using the chain rule,"

Expand Down Expand Up @@ -99,7 +99,7 @@ velocityIYDerivSent2 = S "We also know the" +:+ phrase vertical +:+ phrase posit
velocityIYDerivEqn2 = sy yPos $= negate (sy lenRod * cos (sy pendDisplacementAngle))
velocityIYDerivSent3 = S "Applying this again,"
velocityIYDerivEqn3 = sy yVel $= negate (deriv (sy lenRod * cos (sy pendDisplacementAngle)) time)
velocityIYDerivSent4 = E (sy lenRod) `S.sIs` S "constant with respect to time, so"
velocityIYDerivSent4 = E (sy lenRod) `S.sIs` S "constant" `wrt` S "time, so"
velocityIYDerivEqn4 = sy yVel $= negate (sy lenRod * deriv (cos (sy pendDisplacementAngle)) time)
velocityIYDerivSent5 = S "Therefore, using the chain rule,"

Expand Down Expand Up @@ -246,7 +246,7 @@ angFrequencyDerivSent1 = foldlSentCol [S "Consider the", phrase torque, S "on a"
phrase weight `S.the_ofThe` phrase pendulum), S "bob that acts along the" +:+. phrase arcLen,
(phrase torque `S.isThe` phrase len) `S.the_ofThe'` S "string", ch lenRod, S "multiplied by", S "component"
`S.the_ofThe` S "net", phrase force, S "that is perpendicular to", S "radius" `S.the_ofThe` (S "arc" !.),
S "The minus sign indicates the", phrase torque, S "acts in the opposite direction of the", phrase angularDisplacement]
S "The minus sign indicates the", phrase torque, S "acts in the opposite", phrase direction `S.ofThe` phrase angularDisplacement]


angFrequencyDerivEqn1 = sy torque $= negate (sy lenRod) * (sy mass * sy gravitationalAccel * sin (sy pendDisplacementAngle))
Expand Down
7 changes: 4 additions & 3 deletions code/drasil-example/Drasil/DblPendulum/IMods.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{-# LANGUAGE PostfixOperators #-}
module Drasil.DblPendulum.IMods (iMods, angularDisplacementIM) where

import Prelude hiding (cos, sin)
Expand Down Expand Up @@ -53,9 +54,9 @@ angularDisplacementDerivSent1 = foldlSentCol [S "When the", phrase pendulum `S.s
S "the", phrase equation `S.sOf` phrase motion, S "for the", phrase pendulum, S "may be obtained"]


angularDisplacementDerivSent2 = foldlSentCol [S "Where", ch torque +:+ S "denotes the", phrase torque `sC`
ch momentOfInertia +:+ S "denotes the", phrase momentOfInertia `S.sAnd` ch angularAccel +:+
S "denotes the", phrase angularAccel +:+ S "This implies"]
angularDisplacementDerivSent2 = foldlSentCol [S "Where", ch torque `S.denotes` phrase torque `sC`
ch momentOfInertia `S.denotes` phrase momentOfInertia `S.sAnd` ch angularAccel `S.denotes`
(phrase angularAccel !.), S "This implies"]


angularDisplacementDerivSent3 = foldlSentCol [S "And rearranged as" ]
Expand Down
2 changes: 1 addition & 1 deletion code/drasil-example/Drasil/SSP/Assumptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ monotonicF, slopeS, homogeneousL, isotropicP, linearS, planeS, largeN,
waterSIntersect, negligibleSlopeEffect, hydrostaticFMidpoint :: Sentence

monotonicF = foldlSent [S "The", phrase slpSrf,
S "is concave with respect to", S "the" +:+. phrase slopeSrf, S "The",
S "is concave" `wrt` S "the" +:+. phrase slopeSrf, S "The",
sParen (ch slipDist `sC` ch slipHght) +:+ S "coordinates", S "of a",
phrase slpSrf, S "follow a concave up function"]

Expand Down
4 changes: 2 additions & 2 deletions code/drasil-example/Drasil/SWHS/TMods.hs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ latentHtENotes :: [Sentence]
latentHtENotes = map foldlSent [
[ch latentHeat `S.isThe` S "change" `S.sIn` phrase thermalEnergy,
sParen (phrase latentHeat +:+ phrase energy)],
[E latHtEEqn `S.isThe` phrase rOfChng `S.sOf` ch latentHeat,
S "with respect to", phrase time, ch tau],
[E latHtEEqn `S.isThe` phrase rOfChng `S.sOf` ch latentHeat `wrt`
phrase time, ch tau],
[ch time `S.isThe` phrase time, S "elapsed" `sC` S "as long as the",
phrase phaseChange, S "is not complete"],
[S "status" `S.the_ofThe'` phrase phaseChange, S "depends on the",
Expand Down
4 changes: 2 additions & 2 deletions code/drasil-utils/Utils/Drasil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ module Utils.Drasil (
-- Phrase
and_, and_', andRT, compoundNC, compoundNC', compoundNC'', compoundNC''',
compoundNCP1, compoundNCPlPh, for, for', of_, of_',
of_'', of__, ofA, ofN_, the, the', the'', with, ofThe',
of_'', of__, ofA, ofN_, the, the', the'', inThe', with, ofThe',
-- Sentence
--andIts, andThe, fromThe, inThe, isExpctdToHv, isThe, ofGiv, ofGiv', ofThe, the_ofThe, the_ofThe',
--sOf, sOfA, sOr, sVersus, sAnd, sAre, sIn, sIs, toThe, sFor, sFor', sFor'', forTT, forTT'
-- Concepts
insertStringNP, prependStringNP, insertSentNP, prependSentNP,
theNP, theNP', aNP, aNP', ofTheNP, ofTheNP', ofTheNP'', the_ofTheNP, the_ofTheNP', the_ofTheNP'',
theNP, theNP', aNP, aNP', ofTheNP, ofTheNP', ofTheNP'', inTheNP, inTheNP', inTheNP'', the_ofTheNP, the_ofTheNP', the_ofTheNP'',
forNP, forNP', forNP'', ofNP, ofNP', ofNP'', ofNP''', withNP, andNP, andNP', andNP'', andNP'''
) where

Expand Down
Loading

0 comments on commit 214a95c

Please sign in to comment.