devosoft / cookiecutter-empirical-project Goto Github PK
View Code? Open in Web Editor NEWA template for creating a new Empirical-based project
Home Page: https://devosoft.github.io/cookiecutter-empirical-project
License: MIT License
A template for creating a new Empirical-based project
Home Page: https://devosoft.github.io/cookiecutter-empirical-project
License: MIT License
That gets catch and git inits etc... the stuff you need to set up the repo
Instead of overwriting the branch with a --force push, we should keep the history and apply the new deployed assets as a change relative to the existing assets.
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.
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
See https://github.blog/2019-06-06-generate-new-repositories-with-repository-templates/.
Hat tip to @emilydolson for pointing this out.
Not sure what this would look like, but probably something like the tests we have kicking around within Empirical itself, I assume.
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 😄
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.
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();
}
rst is the WORST
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.
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.
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.