Skip to content

Commit

Permalink
Kernel smoothing and better parallelization for phase transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
leifeld committed Feb 4, 2024
1 parent ef85c08 commit 38eac00
Show file tree
Hide file tree
Showing 15 changed files with 791 additions and 161 deletions.
52 changes: 13 additions & 39 deletions bibliography/build.gradle
@@ -1,9 +1,7 @@
task bibliographyMarkdown {
inputs.dir '.'
doLast {
exec {
workingDir '.'
commandLine 'mkdir', "-p", "$rootDir/build"
}
mkdir "$rootDir/build"
exec {
workingDir '.'
commandLine 'pandoc', "-t", "gfm", "-s", "--csl", "apa-numeric-superscript-brackets.csl", "--citeproc", "-o", "$rootDir/build/bibliography.md", "bibliography.tex"
Expand All @@ -12,59 +10,35 @@ task bibliographyMarkdown {
}

task bibliographyPdflatex {
inputs.dir '.'
doLast{
exec {
workingDir '.'
commandLine 'mkdir', "-p", "temp"
}
exec {
workingDir '.'
commandLine 'mkdir', "-p", "$rootDir/build"
mkdir "./temp"
mkdir "$rootDir/build"
copy {
from 'bibliography.tex', 'bibliography.bib'
into 'temp'
}
exec {
workingDir '.'
commandLine 'cp', "bibliography.tex", "temp/"
}
exec {
workingDir '.'
commandLine 'cp', "bibliography.bib", "temp/"
}
}

doLast {
exec {
workingDir 'temp'
commandLine 'pdflatex', "bibliography.tex"
}
exec {
workingDir 'temp'
commandLine 'bibtex', "bibliography"
}
exec {
workingDir 'temp'
commandLine 'pdflatex', "bibliography.tex"
}
exec {
workingDir 'temp'
commandLine 'pdflatex', "bibliography.tex"
}
}

doLast {
exec {
workingDir '.'
commandLine 'mv', "temp/bibliography.pdf", "$rootDir/build/"
}
exec {
workingDir '.'
commandLine 'rm', "-r", "temp"
copy {
from 'temp/bibliography.pdf'
into "$rootDir/build/"
}
delete 'temp'
}
}

task build {
dependsOn bibliographyMarkdown
dependsOn bibliographyPdflatex
inputs.dir '.'
def outputDir = file("$rootDir/build/")
outputs.dir outputDir

Expand Down
2 changes: 1 addition & 1 deletion build/bibliography.md
Expand Up @@ -4,7 +4,7 @@ author:
bibliography:
- bibliography.bib
csl: apa-numeric-superscript-brackets.csl
date: 2024-01-10
date: 2024-02-04
title: "Discourse Network Analysis: Bibliography"
---

Expand Down
4 changes: 4 additions & 0 deletions dna/build.gradle
Expand Up @@ -5,6 +5,8 @@ plugins {

// create jar file, not just .class files
jar {
inputs.dir '.'

// point the manifest to the right class
manifest {
attributes 'Main-Class': 'dna.Dna'
Expand Down Expand Up @@ -77,4 +79,6 @@ dependencies {
implementation group: 'me.tongfei', name: 'progressbar', version: '0.9.4'
// https://mvnrepository.com/artifact/org.ojalgo/ojalgo
implementation group: 'org.ojalgo', name: 'ojalgo', version: '51.4.1'
// https://mvnrepository.com/artifact/org.apache.commons/commons-math3
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
}
2 changes: 1 addition & 1 deletion dna/src/main/java/dna/Dna.java
Expand Up @@ -17,7 +17,7 @@ public class Dna {
public static Dna dna;
public static Logger logger;
public static Sql sql;
public static final String date = "2024-01-01";
public static final String date = "2024-02-04";
public static final String version = "3.0.11";
public static final String operatingSystem = System.getProperty("os.name");
public static File workingDirectory = null;
Expand Down
300 changes: 198 additions & 102 deletions dna/src/main/java/export/Exporter.java

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions rDNA/build.gradle
@@ -1,4 +1,5 @@
task rDNADocument {
inputs.dir 'rDNA'
doLast {
exec {
workingDir 'rDNA'
Expand All @@ -9,26 +10,25 @@ task rDNADocument {

task rDNABuild {
dependsOn rDNADocument
inputs.dir 'rDNA'
def outputDir = file("$rootDir/build/")
doFirst {
delete fileTree(dir: outputDir, includes: ['*.tar.gz'])
}
doLast {
exec {
workingDir '.'
commandLine 'mkdir', "-p", "$rootDir/build"
}
mkdir "$rootDir/build"
exec {
workingDir "$rootDir/build/"
commandLine 'R', "CMD", "build", "../rDNA/rDNA"
}
}
def outputDir = file("$rootDir/build/")
outputs.dir outputDir
}

task rDNACheck {
inputs.dir 'rDNA'
doLast {
exec {
workingDir '.'
commandLine 'mkdir', "-p", "$rootDir/build"
}
mkdir "$rootDir/build"
exec {
workingDir "rDNA"
commandLine 'R', "-e", "devtools::check(manual = TRUE, check_dir = '../../build/')"
Expand All @@ -39,11 +39,9 @@ task rDNACheck {
}

task rDNATest {
inputs.dir 'rDNA'
doLast {
exec {
workingDir '.'
commandLine 'mkdir', "-p", "$rootDir/build"
}
mkdir "$rootDir/build"
exec {
workingDir "rDNA"
commandLine 'R', "-e", "devtools::test()"
Expand All @@ -57,6 +55,7 @@ task rDNATest {

task build {
dependsOn rDNABuild
inputs.dir 'rDNA'
def outputDir = file("$rootDir/build/")
outputs.dir outputDir
doLast {}
Expand Down
2 changes: 1 addition & 1 deletion rDNA/rDNA/DESCRIPTION
@@ -1,6 +1,6 @@
Package: rDNA
Version: 3.0.11
Date: 2023-10-15
Date: 2024-02-04
Title: Discourse Network Analysis in R
Authors@R:
c(person(given = "Philip",
Expand Down
2 changes: 2 additions & 0 deletions rDNA/rDNA/NAMESPACE
Expand Up @@ -20,6 +20,7 @@ export(dna_barplot)
export(dna_closeDatabase)
export(dna_evaluateBackboneSolution)
export(dna_getAttributes)
export(dna_getHeadlessDna)
export(dna_getVariables)
export(dna_init)
export(dna_jar)
Expand All @@ -28,6 +29,7 @@ export(dna_network)
export(dna_openConnectionProfile)
export(dna_openDatabase)
export(dna_phaseTransitions)
export(dna_phaseTransitions2)
export(dna_printDetails)
export(dna_queryCoders)
export(dna_sample)
Expand Down

0 comments on commit 38eac00

Please sign in to comment.