Code Monkey home page Code Monkey logo

sherpa's Introduction

sherpa

Third-party libraries and dependencies for PhET Simulations

By PhET Interactive Simulations https://phet.colorado.edu/

List of the third-party code, fonts, images and audio

Documentation

The PhET Development Overview is the most complete guide to PhET Simulation Development. This guide includes how to obtain simulation code and its dependencies, notes about architecture & design, how to test and build the sims, as well as other important information.

License

See the license

Contributing

If you would like to contribute to this repo, please read our contributing guidelines.

sherpa's People

Contributors

aaronsamuel137 avatar andrewadare avatar chrisklus avatar denz1994 avatar jbphet avatar jessegreenberg avatar jonathanolson avatar liammulh avatar marlitas avatar mattpen avatar mbarlow12 avatar mjkauzmann avatar phet-dev avatar pixelzoom avatar samreid avatar saurabhtotey avatar twant avatar zepumph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sherpa's Issues

review the original BSD advertising clause

Two of our 3rd party licenses use the original BSD license, which includes this clause:

All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the .

The libraries that use this are:

  • Easing equations Copyright (c) 2001 Robert Penner under BSD license
  • seedrandom-2.2.js

use JSON for license info file?

sherpa/info.js contains license info and is read by the build process. Since this is a data file, why aren't we using json? It could be read with grunt.file.readJSON, as we're doing for package.json.

license spreadsheet and sherpa/info.json are out of sync

The license spreadsheet (on Google Drive) and sherpa/info.json are out of sync.

These are missing from info.json:

grunt
html5-shiv
modernizr
node.js
PxLoader
reveal.js
stats.min.js
uglify2

Also, stats.min.js has an entry in the spreadsheet, but no info associated with it.

Highly recommended to consolidate this info into info.json and delete the Google spreadsheet. Until that's done, these are more likely to be out-of-sync than in-sync.

restructure the sherpa repository

In IntelliJ IDEA, subdirectories of a repository can be excluded from a project, which is extremely useful for search/replace operations. Because all of the 3rd-party libraries are at the top-level of the sherpa repository, there is currently no way to exclude "unwanted" subdirectories while retaining "wanted" subdirectories. This has resulted in recent changes being missed in info.js, breaking the build process.

How about if we put all of the 3rd-party libraries under sherpa/libs/? The repo structure would look like this:

sherpa/
  .gitignore   
  info.js
  LICENSE 
  README.md
  licenses/
    almond.txt
    ...
    webgl-debug-2012.txt
  libs/
    syntaxhighlighter-3.0.38/
    almond-0.2.9.js
    ...
    webgl-debug-2012.js

@samreid @jonathanolson @jbphet please weigh in.

licensing URL for HTML5 sims?

HTML deliverables have this comment header (for example):

<!--
hookes-law
Copyright 2002-2015, University of Colorado Boulder
PhET Interactive Simulations
Licensed under GPLv3
http://phet.colorado.edu/en/about/licensing
-->

Does the URL http://phet.colorado.edu/en/about/licensing pertain to HTML5 sims? For example, it has language like this:

The executable versions of all PhET Interactive Simulations by PhET, University of Colorado (the *.jar files, the *.jnlp files, the *.swf files) are licensed under a Creative Commons Attribution 3.0 United States License, ....

... which doesn't mention the HTML5 executables.

Is this URL correct? Does the webpage need to be updated? Is there a different URL for HTML5 sims?

Rename the text plugin

The requirejs plugin currently does not contain version info in its name. It should be renamed to include the version in the filename, as per our convention for our other 3rd party dependencies. However, I noticed that many simulations are referring to sherpa/text in their config files (I see 66 occurrences across our sims). So I thought I'd check in with other developers before making a 66-repo commit. I already checked in text-2.0.12.js. This change would be to update all simulations config files to point to it, then to delete sherpa/text.js. Also, I was surprised to see so many simulations pointing to sherpa/text.js. Is that something we have been using, or vestigial?

Please chime in @pixelzoom @jbphet @jonathanolson @aaronsamuel137, thanks!

text.js appears twice

We have two identical copies of text.js with different filenames. We should remove the unversioned one.

Can we remove easel and jquerymobile?

Can we remove easel & jquerymobile from sherpa now? AFAIK we had it checked it for a comparison to scenery--and I'm not sure it's valuable any more.

EDIT: added 'jquerymobile'

Add BSD license for easing equations

Tween.js is attributed like so:

  "Tween-r12.js": {
    "text": [
      "Copyright (c) 2010-2012 Tween.js authors.",
      "Easing equations Copyright (c) 2001 Robert Penner under BSD license"
    ],
    "license": "The MIT License",
    "licenseURL": "see http://robertpenner.com/easing_terms_of_use.html",
    "projectURL": "https://github.com/tweenjs/tween.js/",
    "notes": "Used to smoothly animate the speedometer and accelerometer to the left and back in Forces and Motion Basics."
  }

However, the fact that part of tween.js is covered by MIT and part covered by BSD should be elucidated in our metadata. This will be complicated because our convention is thus far: one license per file.

no version number for many lib file names

The convention is to put the version number in the library's file name. For example: require-2.1.11.js, Tween-r12.js.

The following libs in sherpa don't follow this convention:

base64binary.js
FileSaver.js
has.js
qhint.js
rgbcolor.js
text.js
typedarray.js
webgl-debug-2012.js

Standardize the line breaks for the full license texts

If we want to show these license texts from within the simulation, we may wish to make sure they have consistent formatting with respect to line breaks. But I think adding a UI to show the licenses would warrant a redeploy anyways, so standardization for line breaks is not essential for S2015R.

Discovered in #33

can has.js be deleted?

has.js has this dubious license in info.json:

"license": "Tentatively available under The MIT License.",

We probably shouldn't be using anything that is "tentatively" licensed. Investigate whether we really need has.js.

delete howler

I asked @jbphet if we could delete howler. Perhaps it has served its purpose in its experiment file.

Switch to modern bootstrap

In #20 @pixelzoom identified that the bootstrap license changed from Apache to MIT. I think it simplifies things somewhat to move more of our 3rd party libraries to MIT, so perhaps it would be good for @jonathanolson to update bootstrap usages to use a more modern bootstrap (unless it is too complicated).

Remove require-i18n things

In #25 @pixelzoom identified that require-i18n has an entry in info.json but no license specified. @samreid pointed out that we are no longer using require-i18n since we have created our own string plugin for internationalization. We need to remove the entry from info.json and an entry from chipper/build.json.

Update all libraries

At yesterday's meeting we decided to update all of our dependencies in sherpa.

specify common licenses in info.json ?

Perhaps info.json could also be responsible for specifying which licenses need to be included in the HTML deliverable for all sims.

Currently these specified are in setLicenseText.js, and there's an opportunity for the keys to get out of sync with info.son:

var licenseKeys = [
    // dependencies common to all sims that are NOT preloaded
    'almond-0.2.9',
    'font-awesome',
    'pegjs-0.7.0',
    'require-i18n',
    'text-2.0.12'
  ];

Update all sherpa libs

Before redeploying all of our simulations, we decided it would be nice to update our sherpa dependencies, since the sims will be fully retested. @jonathanolson said to delete old versions of libs, instead of keeping them around.

The License URLs are problematic

I have been including the license URLs in the MD output, but there are some problems:

  1. In many cases, the simulation doesn't have a custom or hosted license, just a pointer to a generic license. In these cases, I am pointing to the page that states the license, not the URL of the license itself. Hence it is not really a LicenseURL but rather a URLthatStatesTheLicense, which is kind of confusing.
  2. Many of the license URLs are "live versions" (e.g., master of a repo) which could change at any time. We have snapshots of the correct license in our sherpa repo, we should probably link to those instead.

Therefore I think we should link to our snapshots of the correct licenses. I recommend to leave the "LicenseURL" as an internal metadata to help us when trying to track down licenses for future versions, but suppressing them from the MD file. I also recommend to hyperlink the license name to the license text, to make it a bit cleaner.

no license details specified for some 3rd-party libraries

The following entries in info.json contain no details about how they are licensed:

howler-1.1.11
iframe-phone-7680a25185
jshint-2.5.0
jsondiffpatch 0.1.31
qhint-1.1
numeric-1.2.6
pixi-v3.0.0-rc1-dev
poly2tri-1.3.5.min

And typedarray-44f09cf is specifying a "selectedLicense" but has no indication of what the license choices are. The "selectedLicense" fields is used when there are multiple license options.

delete sherpa/licenses/ ?

What is the purpose of sherpa/licenses/ ?
Looks like these can easily get out of sync with info.json license links.
And there are things in here that aren't in info.json.
Can we just delete the entire directory, or are they needed by something?

Assigning to @samreid for comment, since I believe he create this dir.

Remove Box2D

We are no longer using box2d or box2dweb for John Travoltage. The emscriptened box2d will be evaluated for Sugar and Salt Solutions "Water" screen, and if it works, we will add that in the future.

Update jquery

BTW there looks to be an IE specific exception in the following apps which prevents them from being loaded in the context of an iframe.

Molarity

Ohm’s Law

Balloons and Static

Resistance in a Wire

Gravity Force

On this piece of code:

if(parent && parent.frameElement) {

                parent.attachEvent("onbeforeunload", function () {

                    setDocument();

                });

            }

IE looks to be throwing since the parent is in a different domain, rather than returning null, which is I think what chrome does.

I think you guys had a fix for this, but maybe it just hasn’t made it to production yet. Or if there hasn’t been a fix we can try to push a fix.

add version number to rgbcolor.js

Some discussion about this in #14, but I don't know how to proceed. Assigning this to @jonathanolson as a separate issue, since he added this library. Please update both sherpa/info.json and the 3rd-party license spreadsheet on Google Drive.

Remove version numbers from sherpa library filenames.

Some of the sherpa libs have versions in their filenames, such as require-2.1.8.js. This makes it easy to see the version number but difficult to upgrade multiple sims to new versions. For many of the libraries (including requirejs), the version number is readily available in the top few lines of the code. Also, we probably do not want to support multiple versions of libraries in a single runtime (such as a sim using both require 2.1.8 and require 2.1.9). Also, the file provided by require.js is named require.js and updating files 'in-place' can make diffs slightly easier (to see what changed between versions). So I am leaning toward stripping the version numbers. Since this has been controversial in the past, I won't proceed without further discussion.

clean up license info for base64binary.js

sherpa/base64binary.js has this comment that was added to it by @jbphet:

TODO: I (jblanco) don't think that this is licensed such that PhET can just
use it. Its use is temporary while exploring ways to handle the audio.

sherpa/info.js indicates that base64binary.js is used by sims:

40 usage: ['sim']

The 3rd-party spreadsheet indicates that it's used by vibe. See https://docs.google.com/spreadsheets/d/1XWlHFidztUT6ARb7yHQ1Naepd6L0x9LF94AAoKHGaWg/edit#gid=0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.