yetanalytics / datasim Goto Github PK
View Code? Open in Web Editor NEWxAPI Data Simulation Tools
Home Page: https://cljdoc.org/d/com.yetanalytics/datasim/
License: Apache License 2.0
xAPI Data Simulation Tools
Home Page: https://cljdoc.org/d/com.yetanalytics/datasim/
License: Apache License 2.0
Define command-line arguments (in the main
) fn to accept profile disk locations or URLs
I am unable to get the cli to validate my alignments file. I am following the rubric in the md file.
the file is as follows:
[{
"id":"mbox::mailto:[email protected]",
"type": "Agent",
"alignments":[
{
"component":"https://w3id.org/xapi/scorm#initialization",
"weight": -0.3
},
{
"component":"https://w3id.org/xapi/scorm#termination",
"weight": 0.6
}
]
},
{
"id":"mbox::mailto:[email protected]",
"type": "Agent",
"alignments":[
{
"component":"https://w3id.org/xapi/scorm#initialization",
"weight": -0.3
},
{
"component":"https://w3id.org/xapi/scorm#termination",
"weight": 0.6
}
]
},
{
"id":"mbox::mailto:[email protected]",
"type": "Agent",
"alignments":[
{
"component":"https://w3id.org/xapi/scorm#initialization",
"weight": -0.3
},
{
"component":"https://w3id.org/xapi/scorm#termination",
"weight": 0.6
}
]
},
{
"id":"mbox::mailto:[email protected]",
"type": "Agent",
"alignments":[
{
"component":"https://w3id.org/xapi/scorm#initialization",
"weight": -0.3
},
{
"component":"https://w3id.org/xapi/scorm#termination",
"weight": 0.6
}
]
},
{
"id":"mbox::mailto:[email protected]",
"type": "Agent",
"alignments":[
{
"component":"https://w3id.org/xapi/scorm#initialization",
"weight": -0.3
},
{
"component":"https://w3id.org/xapi/scorm#termination",
"weight": 0.6
}
]
},
{
"id":"mbox::mailto:[email protected]",
"type": "Agent",
"alignments":[
{
"component":"https://w3id.org/xapi/scorm#initialization",
"weight": -0.3
},
{
"component":"https://w3id.org/xapi/scorm#termination",
"weight": 0.6
}
]
}]
Where can I find the requirements for validating the alignments?
When providing a profile to DATASIM, I should be able to choose a local profile on disk
Define a schema (with spec
) for actor personae. This may just be the xAPI agent spec, depending on what is needed.
When a profile incorrectly forbids context activities in the templates using this rule
{
"location": "$.context.contextActivities",
"presence": "excluded"
}
No error is thrown, but it generates an empty array of statements. This should throw some form of error as this rule makes it impossible to send statements that comply to the profile.
In order to generate data, DATASIM will need to be able to read in xAPI profiles which the data will conform to.
Create a command line argument for DATASIM so a user can provide a JSON file w/actor personas
Moving this as it was submitted to the incorrect repository
I'm in an Azure instance, utilizing Ubuntu 16.04 LTS.
I've installed Java, Leiningen, Clojure, NodeJS and make
Building the API works with the following commands:
make clean
make bundle
cd target/bundle
/bin/server.sh > logfilename.txt &
But when I try to run sudo make clean, I run into this error:
ptadmin@ADL-DATASIM:~/datasim$ sudo make bundle
mkdir -p target/bundle/bin
cp -r scripts/*.sh target/bundle/bin
chmod +x target/bundle/bin
mkdir -p target/bundle
rm -f pom.xml
clojure -X:depstar uberjar :no-pom false :sync-pom true :aliases '[:cli]' :aot true :group-id com.yetanalytics :artifact-id datasim-cli :version '"0.1.0-SNAPSHOT"' :jar target/bundle/datasim_cli.jar :main-class com.yetanalytics.datasim.main
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-X:depstar (No such file or directory)
Full report at:
/tmp/clojure-15389642806237300545.edn
Makefile:12: recipe for target 'target/bundle/datasim_cli.jar' failed
make: *** [target/bundle/datasim_cli.jar] Error 1
We will add to this as we get more information
Hi there,
Can I get some clarification on Alignment.json. I need clarification specifically on the IRI part. For example, for the below Alignment:
{"mbox::mailto:[email protected]":
{"https://example.org/activity/a": 0.5,
"https://example.org/activity/c": -0.2}
}
What "https://example.org/activity/a" means ? Is it supposed to be always written in this format or it depends on the profile? And what do /a, /c mean?
I understand that the weight defines the propensity but I don't understand how the IRI defines a part of profile(because I don't see how the IRI relates to elements in the profile)
Thanks!
Morning team,
For an ideal simple deployment to support the upcoming TLA PlugFest, I'd like to avoid having weird ports exposed and preferably run on a single machine (some datasim.tla.adlnet.gov
).
We typically just stick everything into containers and route traffic through an nginx container, but that typically requires the containers having unique root paths for their requests etc. With the API not allowing for a root path config option like /api
and the containerized version having given us issues in the past, I'm curious what the best / recommended practice would be to get everything stood up without too much fuss etc.
Thanks!
-Trey
Morning team,
For the Docker deployment commands, the first command use the Makefile to generate the target
contents, which will then be pulled into the image by the Dockerfile. When I run that first command:
make clean bundle
it snags on -A:build (No such file or directory)
. Is there maybe another step involved that might've been excluded from the Makefile?
Thanks
While running a profile test, I noticed datasim is requiring 2 optional properties.
1 - When defining the profile, it expects the "seeAlso" property, an optional property at the profile definition level.
2 - In all primary patterns, it requires a definition object.
DS-125 As part of #53, we discovered that the TCCC profile dev-resources/profiles/tccc/cuf_hc_video_and_asm_student_survey_profile.jsonld
does not pass pan validation, because it contains alternates
with either zeroOrMore
or optional
members.
Additionally the acrossx
and activity_streams
profiles contain minor errors.
DATASIM must be able to accept a specification of one or more actors as input. These personae will become the actors in xAPI statements.
Hello,
I am currently developing an xAPI profile. As a means of profile validation I have been using DATASIM (CLI) to generate xAPI statements that conform to the profile.
I have tried adding an extension to the profile, using the "inlineSchema"
property to specify data type and some additional restrictions with JSON schema, but mostly DATASIM does not seem to be able to reflect the additional restrictions in the xAPI statements generated.
For instance I tried adding a (slightly modified) example JSON schema from the xAPI profiles specification (GitHub) to the extension in the profile:
"inlineSchema": "{ \"type\": \"object\", \"properties\":{ \"rank\": {\"type\": \"number\"},\"medal\":{\"type\": \"string\"}}, \"required\": [\"rank\", \"medal\"]}"
.
When generating statements based on the profile with an extension having such an inlineSchema
, the value of the xAPI statement extension is not as expected an object
with properties rank
(value of type number) and medal
(value of type string), but rather the extension value varies between string
(e.g. '1X6m9L94OQR'), number
(e.g. 1.2574462890625), empty object
({}) and empty array
([]).
Another example is that when setting the profile extension data type to string
, and specifying either a format
(e.g. uri, date-time) or pattern
(regular expression), I experienced that formats and patterns are not reflected in the generated xAPI statements.
In the future it would be great if the generated xAPI statements could reflect the full JSON schema for extensions (and document resources) that are specified in a profile.
Greetings!
I cloned the code and tried to build with the provided build docker command.
I received this error: rg.eclipse.jgit.api.errors.TransportException: [email protected]:yetanalytics/project-pan.git: UnknownHostKey: github.com.
I attempted these solutions:
https://codehopper.nl/2018/09/27/clojure-gitlab-deps/
https://medium.com/tokenmill/how-to-build-a-clojure-project-that-depends-on-private-git-repositories-in-docker-635c7a576726
but there was no change to the error code.
Following this link: https://stackoverflow.com/questions/13396534/unknownhostkey-exception-in-accessing-github-securely
I added ````StrictHostKeyChecking=noto
~/.ssh/config```
and the error code changed to: Cloning: [email protected]:yetanalytics/project-pan.git Error building classpath. [email protected]:yetanalytics/project-pan.git: Auth fail
Any ideas of how to best proceed with build would be greatly appreciated.
DATASIM must accept xAPI profile(s) from a URL or URLs
Generated Statements may not conform to a primary Pattern in the Profile they are based on.
Example: Run ./bin/run.sh -i ../../dev-resources/input/simple.json generate
from the command line. The Statements generated are supposed to conform to the primary Pattern in the cmi5 profile. The first three Statements will be as follows:
{
.....
"verb": {
"id": "http://adlnet.gov/expapi/verbs/satisfied"
}
},
{
.....
"verb": {
"id": "http://adlnet.gov/expapi/verbs/launched"
}
},
{
.....
"verb": {
"id": "http://adlnet.gov/expapi/verbs/satisfied"
}
}
However, in the cmi5 primary Pattern, any "launched" Activity must be followed by an "initialized" Activity, but that is not the case here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.