Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create new concept map #70

Closed
bxie opened this issue Jun 26, 2018 · 7 comments
Closed

create new concept map #70

bxie opened this issue Jun 26, 2018 · 7 comments
Assignees
Labels
bug incorrect implementation that results in undesired behavior enhancement an improvement to a pre-existing feature or component (that is not a bug fix)

Comments

@bxie
Copy link
Collaborator

bxie commented Jun 26, 2018

Replace old concept map with new one and add property of type (semantic, template).

Steps:

  1. Create a new branch called "content-quad"
  2. Within ConceptMap.js, comment out all of the current conceptInventory constant
  3. Create a new conceptInventory constant. This new constant will have the same schemas as the previous except a type property is added to each concept. This type property will either be {concept, template}
  4. Populate the new conceptInventory with a concept hierarchy as defined in the image below

Ensure the explanations properties exist but feel free to leave them empty (e.g. empty string, empty list).

Ensure test for parent/dependency in tests/data.test.js passes.

image

EDIT: Clarifying some ambiguities in requirements

  • Have should_teach be true for all concepts.
  • Have container be true for all concepts as well.
  • Change the world view to display concepts where container is true (currently set to false)
  • Add a type onboarding and have the "How Code Runs" concept be of type onboarding. Everything else is of type concept or type template as specified in the figure above.
@bxie bxie added the enhancement an improvement to a pre-existing feature or component (that is not a bug fix) label Jun 26, 2018
@kwokwilliam kwokwilliam self-assigned this Jun 26, 2018
@kwokwilliam
Copy link
Contributor

Are these all going to have the properties:

should_teach: true
container: true

?

@kwokwilliam
Copy link
Contributor

kwokwilliam commented Jun 26, 2018

The plan will be to change the g variable under ConceptAbbreviations.js to support the new grammar labels, and then modify ConceptMap with should_teach and container = true.

@kwokwilliam
Copy link
Contributor

I meant to say container = false. That is how it's being filtered for the WorldView.

@kwokwilliam
Copy link
Contributor

kwokwilliam commented Jun 26, 2018

Running yarn test or npm run test puts me into a tool that gives me no tests found.

jestjs/jest#3793 (comment)
This guy pointed out a test difference between mac and windows. I tested with Harshitha's mac and she got further, and was able to find the tests. The tests failed due to something else. Will be looking into this more.

@kwokwilliam
Copy link
Contributor

Currently, I have it such that the parent is the top one (ie data types) and the dependency is the bottom one (ie how code runs). This is seen in the code.

I was a bit unsure about if dependencies was defined as "we need these to have access to this topic" or "this is a dependency of these topics". I believe it is the first after some looking at the existing conceptInventory.

  [g.howCodeRuns]: {
    dependencies: [],
    parents: [g.dataTypes],
    explanations: {
      name: "How Code Runs",
      definition: "",
      examples: [],
      future: []
    },
    should_teach: true,
    container: false,
    type: t.semantic
  },
  [g.dataTypes]: {
    dependencies: [g.howCodeRuns],
    parents: [],
    explanations: {
      name: "Data Types",
      definition: "",
      examples: [],
      future: []
    },
    should_teach: true,
    container: false,
    type: t.semantic
  },

@kwokwilliam kwokwilliam added the bug incorrect implementation that results in undesired behavior label Jun 26, 2018
@bxie
Copy link
Collaborator Author

bxie commented Jun 27, 2018

we'll call this jest-related bug for Windows low priority for now until we get to testing next week or week after. admittedly, everyone developed on a mac last summer.

kwokwilliam added a commit that referenced this issue Jun 27, 2018
kwokwilliam added a commit that referenced this issue Jun 28, 2018
@kwokwilliam
Copy link
Contributor

kwokwilliam commented Jun 28, 2018

Got it working! Tests passed too!

Here is what I did:

  1. npm install jest
  2. npm install jest-cli
  3. Modified .babelrc to contain this content:
{
  "env": {
    "test": {
      "presets":[
        ["es2015", { "modules": false }],
        "react",
        "stage-0",
        "flow"
      ],
      "plugins": [
        "transform-es2015-modules-commonjs",
        "dynamic-import-node"
      ]
    }
  }
}
  1. npm install babel-preset-es2015

Now I just run jest and it works. It also builds correctly. npm run test doesn't work, though.

Used these pages:
jestjs/jest#3202
babel/gulp-babel#93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug incorrect implementation that results in undesired behavior enhancement an improvement to a pre-existing feature or component (that is not a bug fix)
Projects
None yet
Development

No branches or pull requests

2 participants