Git Product home page Git Product logo

cookiecutter-empirical-project's People

Contributors

amlalejini avatar lemniscate8 avatar mmore500 avatar oliver-be avatar perryk12 avatar rodsan0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookiecutter-empirical-project's Issues

Fix templated docs

e.g., {{cookiecutter.project_slug}}/docs

Right now they (a) don't build and (b) aren't helpful.

When they do build, they should deploy at https://cookiecutter-empirical-project.readthedocs.io/en/latest/. It's set to build from the cut-cookie branch, which is generated by Travis.

It would be a good idea to link into the Hello World Empirical docs (i.e., how to compile with Empirical natively and for web) at https://empirical.readthedocs.io/en/latest/QuickStartGuides/1-HelloWorld.html.

Add Code Coverage to Tests

Alex slapped code coverage on an instantiated cookie cutter project here.

We should add this to the cookie cutter template!

We might consider using Emily Dolson’s force-cover.

Tie the cookiecutter into Empirical docs

e.g., plug it in the quickstart section and change the existing ProjectTemplate to just be HelloWorld... also we should probably build the cookiecutter template as part of Empirical tests

Add templated native test suite

Not sure what this would look like, but probably something like the tests we have kicking around within Empirical itself, I assume.

Add macro to notify user if debug mode is on?

I'm not sure what balance between keeping the default files simple and adding useful features you want to strike, but it just occurred to me that you could make it clear when debug mode is on by add the following to main():

#ifndef NDEBUG
std::cout << "Running in debug mode << std::endl;
#endif

This idea brought to you be the fact that I just spent 20 minutes timing a run of a program and then realized I wasn't sure whether I compiled with debug mode on or off 😄

Cookiecutter auto-generated readme should probably mention Empirical

If someone is using this template, we can assume they're using Empirical. So it would be nice if the Readme.md file included a Dependencies section that list Empirical as a dependency and explains how to install it (i.e. by cloning the repo).

It might also make sense to list Empirical in the Credits section with a little blurb about why it's good and others should use it.

Add templated Nightmare tests for web

Right now, the templated tests are really simple, clunky Puppeteer stuff. Nightmare allows programatic clicking and other UI stuff! Here's a link with some cool Nightmare code.

https://github.com/segmentio/nightmare

A default test might just check for an expected html value in a certain part of the document (e.g., "Hello, browser!" got printed.

Add new web testing framework

It would be awesome to add the new web testing stuff into the cookiecutter! The most important things to include are TestRunner.html, run_tests.sh, and a testing file stub.

A testing file stub could look a lot like this:

#include "../third-party/Empirical/source/web/Document.h"
#include "../third-party/Empirical/source/web/_MochaTestRunner.h"
struct ExampleTest : emp::web::BaseTest {
  int testValue;
  ExampleTest() { Setup(); }
  void Setup() {
    testValue = 2;
  }
  void Describe() override {
    EM_ASM({  
      const testValue = $0;
      describe("an example test", function() {
        it("should pass in a test value correctly", function() {
          chai.assert.equal(testValue, 2); 
        });
      });
    }, testValue);
  }
};
emp::web::MochaTestRunner test_runner;
int main() {
  emp::Initialize();
  test_runner.AddTest<ExampleTest>("ExampleTest");
  test_runner.Run();
}

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.