Skip to content

Commit c9c2be2

Browse files
committed
Merge branch 'development' for 0.8.4
2 parents 480272b + d30c142 commit c9c2be2

File tree

114 files changed

+13175
-2887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+13175
-2887
lines changed

Docs/development/jasp-building-guide.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ JASP depends on:
2424
- [boost](http://boost.org)
2525
- [libarchive](http://libarchive.org/)
2626
- [zlib](http://zlib.net/)
27-
27+
2828
Links to specific versions for each platform are provided below.
2929

3030
Windows
@@ -33,7 +33,7 @@ Windows
3333
Building JASP under windows is the most temperamental, and the versions listed here are known to work; slight variations on these numbers probably won't work.
3434

3535
- [Qt 5.2.1 win64 GCC 4.8.2](https://static.jasp-stats.org/development/x64-Qt-5.2.1+QtCreator-3.0.1-(gcc-4.8.2-seh).7z)
36-
- [R 3.3.3 win64](https://static.jasp-stats.org/development/R3.3%20Win%20(2017-04-06).zip)
36+
- [R 3.3.3 win64](https://static.jasp-stats.org/development/R3.3%20Win%20JASP%200.8.4.zip)
3737
- [boost 1.64.0](https://static.jasp-stats.org/development/boost_1_64_0.zip)
3838
- [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Additional%20Binary%20Deps%20Win64%20for%20JASP%20(2017-06-06).zip)
3939

@@ -56,17 +56,17 @@ The directory structure should be as follows:
5656
- libarchive.dll.a
5757
- libarchive.dll
5858

59-
59+
6060
Mac OS X
6161
--------
62+
To build JASP on mac you need to clone the JASP repository and download the following five packages:
6263

63-
- [R 3.3.3](https://static.jasp-stats.org/development/R3.3%20OSX%20(2017-04-06).zip)
64-
- [boost 1.64.0](https://static.jasp-stats.org/development/boost_1_64_0.zip)
65-
- [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Additional%20Binary%20Deps%20OSX%20for%20JASP%20(2017-06-06).zip)
66-
67-
XCode: Qt on OS X relies on XCode to function, you can install this through the App Store. It's easiest if you install this, run it, accept the license agreement, and then close it down before installing Qt.
68-
69-
Qt: building JASP on OS X is pretty robust, and most versions work. We currently use 5.4.0, but newer versions will probably work too. You can download it from [here](https://qt-project.org/downloads).
64+
0. Clone the JASP repository
65+
1. [XCode](https://developer.apple.com/xcode/) Easiest would be via the App Store.
66+
2. [Qt 5.4.0](https://download.qt.io/archive/qt/) Newer version not supported yet.
67+
3. [R 3.3.3](https://static.jasp-stats.org/development/R3.3%20OSX%20JASP%200.8.3.zip) This contains R and the packages
68+
4. [boost 1.64.0](https://static.jasp-stats.org/development/boost_1_64_0.zip)
69+
5. [boost 1.64.0 binaries, libarchive binaries](https://static.jasp-stats.org/development/Additional%20Binary%20Deps%20OSX%20for%20JASP%20(2017-06-06).zip)
7070

7171
The directory structure should be as follows:
7272

@@ -80,6 +80,17 @@ The directory structure should be as follows:
8080
- libarchive.a
8181
- libz.a
8282

83+
0. **Clone** the JASP repository into a folder of your choice. Our default choice is *~/desktop/JASP/* and cloning results in the creating of *~/desktop/JASP/jasp-desktop*.
84+
1. **XCode**: Qt on OS X relies on XCode to function, you can install this through the App Store. It's easiest if you install this, run it, accept the license agreement, and then close it down before installing Qt.
85+
2. **Qt**: building JASP on OS X is pretty robust, but for the moment we're restricted to QT 5.4. We will upgrade to a newer version soon. **Note**: *For xcode 8 and above, to accept the license, Qt (v5.4) tries to find xcrun instead of xcodebuild, and the following has to be done,*
86+
- Open the file: *Qt_install_folder/5.4/clang_64/mkspecs/features/mac/default_pre.prf*
87+
- Replace the line *isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))* by *isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))*
88+
3. **R 3.3.3**: Create the folder */Frameworks* in the directory of your choice in step 0. For our default choice this results in *~/desktop/JASP/Frameworks/* first and subsequently *~/desktop/JASP/Frameworks/R.frameworks*.
89+
4. **boost 1.64.0**: Unzip these files in the JASP folder. In our case, this results in *~/desktop/JASP/boost_1_64_0/*
90+
5. **boost 1.64.0 binaries, libarchive binaries**: We're almost there! Fire up QT and try to build JASP. QT will automatically create a */build-JASP-....* directory. In our case this leads to *~/desktop/JASP/build-JASP-Desktop_Qt_5_5_1_clang_64bit-Debug*. QT will stop building JASP as it requires additional files. Thus, unzip the **boost 1.64.0 binaries, libarchive binaries** files and put them into the */build-JASP-....* directory that Qt created.
91+
6. Build JASP again from Qt. The first build might take a while, but after the first time it'll go very smoothly.
92+
93+
8394
Linux
8495
-----
8596

@@ -110,13 +121,13 @@ Under Fedora, you need these packages:
110121
- qt5-qtwebkit-devel
111122
- boost-devel
112123
- libarchive-devel
113-
124+
114125
And (under fedora only), in R (started as root so packages are installed systemwide), you need to install:
115126

116127
```
117128
install.packages(c("Rcpp","RInside"))
118129
```
119-
130+
120131
Finally, under Fedora only, you need to create a symlink so that R is found:
121132

122133
```
@@ -135,7 +146,7 @@ In order to run, you will need (Ubuntu and alike):
135146
- r-cran-logspline *
136147
- r-cran-hypergeo *
137148
- r-cran-rjson
138-
149+
139150
Those marked with asterisks are available from Jonathon's PPA.
140151

141152
### Fedora
@@ -144,5 +155,3 @@ It works under Fedora, if you install these R packages manually in R:
144155
```
145156
install.packages(c("BayesFactor","lme4","afex","car","effects","logspline","hypergeo","rjson"))
146157
```
147-
148-

JASP-Common/analysis.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ using namespace boost::uuids;
2828
using namespace boost;
2929
using namespace std;
3030

31-
Analysis::Analysis(int id, string name, Options *options, const Version &version, bool autorun, bool usedata)
31+
Analysis::Analysis(int id, string module, string name, Options *options, const Version &version, bool autorun, bool usedata)
3232
{
3333
_id = id;
34+
_module = module;
3435
_name = name;
3536
_options = options;
3637
_autorun = autorun;
@@ -131,6 +132,7 @@ Json::Value Analysis::asJSON() const
131132

132133
analysisAsJson["id"] = _id;
133134
analysisAsJson["name"] = _name;
135+
analysisAsJson["module"] = _module;
134136
analysisAsJson["progress"] = _progress;
135137
analysisAsJson["version"] = _version.asString();
136138
analysisAsJson["results"] = _results;
@@ -214,6 +216,11 @@ const string &Analysis::name() const
214216
return _name;
215217
}
216218

219+
const string &Analysis::module() const
220+
{
221+
return _module;
222+
}
223+
217224
int Analysis::id() const
218225
{
219226
return _id;

JASP-Common/analysis.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Analysis
3131

3232
enum Status { Empty, Initing, Inited, InitedAndWaiting, Running, Complete, Aborting, Aborted, Error, SaveImg, Exception };
3333

34-
Analysis(int id, std::string name, Options *options, const Version &version, bool isAutorun = true, bool usedata = true);
34+
Analysis(int id, std::string module, std::string name, Options *options, const Version &version, bool isAutorun = true, bool usedata = true);
3535
virtual ~Analysis();
3636

3737
Options *options() const;
@@ -51,6 +51,7 @@ class Analysis
5151
Json::Value asJSON() const;
5252

5353
const std::string &name() const;
54+
const std::string &module() const;
5455
int id() const;
5556
bool isAutorun() const;
5657
bool useData() const;
@@ -96,6 +97,7 @@ class Analysis
9697
private:
9798

9899
std::string _name;
100+
std::string _module;
99101
int _id;
100102
bool _autorun;
101103
bool _usedata;

JASP-Common/analysisloader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
using namespace std;
2828
using namespace boost;
2929

30-
Analysis *AnalysisLoader::load(int id, string analysisName, const Version &version, Json::Value *data)
30+
Analysis *AnalysisLoader::load(int id, string moduleName, string analysisName, const Version &version, Json::Value *data)
3131
{
3232
Options *options = new Options();
3333

@@ -54,8 +54,8 @@ Analysis *AnalysisLoader::load(int id, string analysisName, const Version &versi
5454

5555
file.close();
5656

57-
return new Analysis(id, analysisName, options, version, autorun, usedata);
57+
return new Analysis(id, moduleName, analysisName, options, version, autorun, usedata);
5858
}
5959

60-
throw runtime_error("Could not access analysis definition.");
60+
throw runtime_error(analysisName + " does not exist in your JASP version.");
6161
}

JASP-Common/analysisloader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AnalysisLoader
2525
{
2626
public:
2727

28-
static Analysis *load(int id, std::string analysisName, const Version& version, Json::Value* data = NULL);
28+
static Analysis *load(int id, std::string moduleName, std::string analysisName, const Version& version, Json::Value* data = NULL);
2929

3030
};
3131

JASP-Common/appinfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "appinfo.h"
1919

20-
const Version AppInfo::version = Version(0, 8, 3, 256);
20+
const Version AppInfo::version = Version(0, 8, 4, 255);
2121
const std::string AppInfo::name = "JASP";
2222
const std::string AppInfo::builddate = __DATE__ " " __TIME__ " (Netherlands)" ;
2323

JASP-Common/column.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,9 +1187,12 @@ Column::Doubles::DoublesStruct()
11871187

11881188
Column *Column::DoublesStruct::getParent() const
11891189
{
1190-
// Apparently there was a good reason to get the parent in this weird way.
1191-
// If I try to add a private _parent (initialized with the column),
1192-
// the engine crashes when it tries to get the dataset in the shared memory...
1190+
// This code seems quite weird... but this is a technique to get the address of the parent object from
1191+
// a member. We could have used offsetof function though.
1192+
// We cannot give in the constructor of DoublesStruct or IntsStruct the pointer to the parent object (the column):
1193+
// we are here in the shared memory, this means this object cannot contain pointer pointing to the process space.
1194+
// Even if the Column object is also in the shared memory, it is mapped in the process space so that the Column pointer
1195+
// still points to the process space.
11931196
Column *column = (Column*) NULL;
11941197
char* intsAddress = (char*)&column->AsDoubles;
11951198
char* baseAddress = (char*)column;

JASP-Common/ipcchannel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ IPCChannel::IPCChannel(std::string name, int channelNumber, bool isSlave)
3131
_channelNumber = channelNumber;
3232
_isSlave = isSlave;
3333

34-
_memory = new interprocess::managed_shared_memory(interprocess::open_or_create, name.c_str(), 4*1024*1024);
34+
_memory = new interprocess::managed_shared_memory(interprocess::open_or_create, name.c_str(), 8*1024*1024);
3535
tempFiles_addShmemFileName(name);
3636

3737
stringstream mutexInName;

JASP-Desktop/JASP-Desktop.pri

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ SOURCES += $$PWD/main.cpp \
5555
$$PWD/analysisforms/correlationpartialform.cpp \
5656
$$PWD/ribbons/ribbonwidget.cpp \
5757
$$PWD/ribbons/ribbonsem.cpp \
58+
$$PWD/ribbons/ribbonnetworkanalysis.cpp \
5859
$$PWD/ribbons/ribbonanalysis.cpp \
5960
$$PWD/ribbons/ribbonhome.cpp \
6061
$$PWD/widgets/boundtextedit.cpp \
@@ -181,6 +182,7 @@ SOURCES += $$PWD/main.cpp \
181182
$$PWD/analysisforms/SummaryStatistics/summarystatsbinomialtestbayesianform.cpp \
182183
$$PWD/analysisforms/SummaryStatistics/summarystatsregressionlinearbayesianform.cpp \
183184
$$PWD/analysisforms/SummaryStatistics/summarystatscorrelationbayesianpairsform.cpp \
185+
$$PWD/analysisforms/Network/networkanalysisform.cpp \
184186
$$PWD/analysisforms/R11tLearn/r11tlearnform.cpp \
185187
$$PWD/simplecrypt.cpp \
186188
$$PWD/importers/convertedstringcontainer.cpp \
@@ -190,7 +192,10 @@ SOURCES += $$PWD/main.cpp \
190192
$$PWD/importers/csvimportcolumn.cpp \
191193
$$PWD/preferencesdialog.cpp \
192194
$$PWD/analysisforms/regressionlogisticform.cpp \
193-
$$PWD/analysisforms/multinomialtestform.cpp
195+
$$PWD/analysisforms/multinomialtestform.cpp \
196+
$$PWD/ribbons/ribbonmeta_analysis.cpp \
197+
$$PWD/analysisforms/classicalmetaanalysisform.cpp \
198+
$$PWD/module.cpp
194199

195200
HEADERS += \
196201
$$PWD/aboutdialog.h \
@@ -250,6 +255,7 @@ HEADERS += \
250255
$$PWD/analysisforms/correlationpartialform.h \
251256
$$PWD/ribbons/ribbonwidget.h \
252257
$$PWD/ribbons/ribbonsem.h \
258+
$$PWD/ribbons/ribbonnetworkanalysis.h \
253259
$$PWD/ribbons/ribbonanalysis.h \
254260
$$PWD/ribbons/ribbonhome.h \
255261
$$PWD/widgets/boundtextedit.h \
@@ -375,6 +381,7 @@ HEADERS += \
375381
$$PWD/analysisforms/SummaryStatistics/summarystatsregressionlinearbayesianform.h \
376382
$$PWD/analysisforms/SummaryStatistics/summarystatscorrelationbayesianpairsform.h \
377383
$$PWD/analysisforms/R11tLearn/r11tlearnform.h \
384+
$$PWD/analysisforms/Network/networkanalysisform.h \
378385
$$PWD/simplecrypt.h \
379386
$$PWD/simplecryptkey.h \
380387
$$PWD/importers/convertedstringcontainer.h \
@@ -395,7 +402,10 @@ HEADERS += \
395402
$$PWD/importers/ods/odsxmlhandler.h \
396403
$$PWD/importers/ods/odsxmlmanifesthandler.h \
397404
$$PWD/analysisforms/regressionlogisticform.h \
398-
$$PWD/analysisforms/multinomialtestform.h
405+
$$PWD/analysisforms/multinomialtestform.h \
406+
$$PWD/ribbons/ribbonmeta_analysis.h \
407+
$$PWD/analysisforms/classicalmetaanalysisform.h \
408+
$$PWD/module.h
399409

400410
FORMS += \
401411
$$PWD/analysisforms/anovabayesianform.ui \
@@ -422,6 +432,7 @@ FORMS += \
422432
$$PWD/ribbons/ribbonhome.ui \
423433
$$PWD/ribbons/ribbonsem.ui \
424434
$$PWD/ribbons/ribbonanalysis.ui \
435+
$$PWD/ribbons/ribbonnetworkanalysis.ui \
425436
$$PWD/analysisforms/ttestbayesianindependentsamplesform.ui \
426437
$$PWD/analysisforms/ttestbayesianpairedsamplesform.ui \
427438
$$PWD/analysisforms/ancovabayesianform.ui \
@@ -438,6 +449,7 @@ FORMS += \
438449
$$PWD/analysisforms/binomialtestbayesianform.ui \
439450
$$PWD/analysisforms/bffromtform.ui \
440451
$$PWD/ribbons/ribbonsummarystatistics.ui \
452+
$$PWD/ribbons/ribbonmeta_analysis.ui \
441453
$$PWD/variableswidget.ui \
442454
$$PWD/backstage/authwidget.ui\
443455
$$PWD/aboutdialog.ui \
@@ -454,8 +466,10 @@ FORMS += \
454466
$$PWD/analysisforms/SummaryStatistics/summarystatsregressionlinearbayesianform.ui \
455467
$$PWD/analysisforms/SummaryStatistics/summarystatscorrelationbayesianpairsform.ui \
456468
$$PWD/analysisforms/R11tLearn/r11tlearnform.ui \
469+
$$PWD/analysisforms/Network/networkanalysisform.ui \
457470
$$PWD/analysisforms/regressionlogisticform.ui \
458-
$$PWD/analysisforms/multinomialtestform.ui
471+
$$PWD/analysisforms/multinomialtestform.ui \
472+
$$PWD/analysisforms/classicalmetaanalysisform.ui
459473

460474
RESOURCES += \
461475
$$PWD/backstage/backstage.qrc \

JASP-Desktop/analyses.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ Analyses::Analyses()
4444
//timer->start();
4545
}
4646

47-
Analysis *Analyses::create(const QString &name)
47+
Analysis *Analyses::create(const QString &module, const QString &name)
4848
{
49-
return create(name, _nextId++, AppInfo::version, NULL, Analysis::Empty);
49+
return create(module, name, _nextId++, AppInfo::version, NULL, Analysis::Empty);
5050
}
5151

52-
Analysis *Analyses::create(const QString &name, int id, const Version &version, Json::Value *options, Analysis::Status status)
52+
Analysis *Analyses::create(const QString &module, const QString &name, int id, const Version &version, Json::Value *options, Analysis::Status status)
5353
{
5454
if (id >= _nextId)
5555
_nextId = id + 1;
5656

57-
Analysis *analysis = AnalysisLoader::load(id, name.toStdString(), version, options);
57+
Analysis *analysis = AnalysisLoader::load(id, module.toStdString(), name.toStdString(), version, options);
5858
analysis->setStatus(status);
5959

6060
// if (options == NULL)

0 commit comments

Comments
 (0)