GithubHelp home page GithubHelp logo

mottaquikarim / spectacles Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 1.12 MB

initial spec for how content should be defined for problems / tests

JavaScript 93.13% HTML 2.88% CSS 0.77% Makefile 0.54% Shell 2.06% Dockerfile 0.63%

spectacles's Issues

Implement the `update-problem` script

User must supply valid (ie: in existence) UUID, something like:

$ npm run-script update-problem -uuid=XXX-XXXX-XXXX

If UUID is found, open FE with content displayed, ready for updates

Implement OAuth2.0

Replace personal access token approach with a github login

NOTE: this will require webtask and/or some other type of proxy

Set up codeclimate for test coverage

  • Configure cc to track test coverage metrics
  • May require istanbul / nyc npm projects to track test coverage locally
  • Set up webhooks on github project to ensure that on PR and merge test coverage is correctly calculated.

Implement unit tests and functional testing framework

For unit tests, ava.js seems quite attractive. However, open to other libs as well - as long as we have a good case for why to use. We should implement unit tests across the board, for the scripts, the server and the FE

As part of this task, put together a reasonable framework for functional testing - Robot Framework is quite attractive - there may be a version for NodeJS as well. We want to functional test the API endpoints and the scripts, minimally.

Implement webhook to generate .compiled versions of each problem

Essentially, on git commit / push, we want to walk through all existing content items and regenerate .compiled files that concatenate all the subfiles that exist in it.

This is mainly a measure for efficiency, should we need it in the future.

As an alternative, this could be just a script that is run in CI/CD pipeline on deployment to "prod".

Set up Travis CI pipeline with dockerization

  • Set up docker image to pull in latest NodeJS and run unit tests.
  • Set up Travis to run these tests within pipeline.
  • Set up webhooks on gitproject so that every PR kicks off Travis build as does every merge to master.

Write Functional tests

Given that functional tests framework is up and running, write ftests that assert:

  • local express API endpoints work as expected
  • scripts run as expected
  • validate content folder spec requirements

Functional Tests Framework

  • Propose a framework for handling ftests, Robot Framework is great for python - is there something similar for node?
  • If not, what are the tradeoffs for using Robot Framework for this project as well...?
  • Set up CI level configs required to make ftests run on every build
  • Set up way for devs to run ftests locally as well

envvars vs envvars.sample

Currently, we have an envvars.sample that is supposed to be a template for any required / important envvars that docker environment needs to run.

As of now, this is mainly empty, project is super simple rn but if we ever wanted to pull out envvars from Travis CI and pipe into build, this would be the way to do it.

The main issue is, docker requires envvars file, not envvars.sample, the sample extension exists mainly to discourage accidental pushes of sensitive secrets to scm. This should not be a problem when using make and npm-scripts targets for various processes, but it may become an issue if one wants to run docker compose cmds directly /do something custom.

The ALTERNATIVE would be to simple commit envvars to SCM and tack on a bid ol' warning on top of file to NOT commit sensitive material.

Whatdoyathink? I can go both ways.

@mmosayed? Anyone else? (@crymall already looked at this, wanted to defer to community at large).

Implement CI/CD pipeline

Implement a CI pipeline, travis/buildkite are both good options (travis being quite popular).

There should be a testing stage and a deployment stage involved.

Implement tagging support

Add field to FE for user to load in, search, and apply existing or new tags to a problem. The act of adding a tag should call a separate API endpoint which updates .contentrc as appropriate.

ALSO: implement this API endpoint

Create static FE that consumes the express GET/POST endpoints

In public, we wish to create a simple FE app that will allow a user to edit all content per problem.

  • Query param pointing to valid UUID must be passed to URL, otherwise throw error message
  • If found, perform a GET request to server and display results on page
  • User is able to edit and have edits stored locally in localstorage
  • On save, make a POST request to update the actual files themselves

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.