Code Monkey home page Code Monkey logo

mofo-allhands-event-app-data-processor's Introduction

MoFo All-hands Schedule App Data Processor

This script is designed as a data processor helper for mofo-allhands repo. If you want to use this script as is make sure your Google Spreasheet is based on the Google spreadsheet template we designed.

This Schedule App Data Processor script handles the following tasks

  1. takes data from a Google spreadsheet,
  2. and converts it to a JSON array where each object has keys corresponding to the spreadsheet column names,
  3. then stores that JSON locally and/or automatically commits it to a GitHub repo (your schedule app repo, e.g., [MoFo All-hands schedule app](https://github.com/m ozilla/mofo- allhands)).

To run the script

  1. Create a Python virtual environment and install all the required packages. See create a Python virtual environment docs for instructions.
  2. Get API creds from GitHub and Google. See authentication docs for instructions.
  3. Share your Google Spreadsheet with the Google Service Account that you created in Step 2.
  4. Set values for environment variables and run source your-file-name.env
  5. Running update_schedule() will execute these methods in succession. You can trigger it from the command line: python update_schedule.py

mofo-allhands-event-app-data-processor's People

Contributors

flamingspaz avatar mmmavis avatar ryanpitts avatar

Stargazers

 avatar  avatar

Watchers

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

mofo-allhands-event-app-data-processor's Issues

on import, skip rows that do not have a githubIssueNumber

This will handle a couple things:

  • avoid importing rows like line 2, which is just usage notes for people editing spreadsheet
  • make sure we don't have broken sessions in the schedule app, which uses that ID number in a few ways

concatenate facilitator_1, facilitator_2, etc., into `facilitators` key in JSON

... or at least that's how the schedule app's js templates and search functions are currently set up.

e.g. https://github.com/mozilla/mozfest-schedule-app/blob/gh-pages/index.html#L87

That could be reconfigured depending on how we want to display these people's names on session detail pages. For instance, if they're supposed to be displayed as a bullet list, I could see just changing the templates there and leaving the JSON like it is now. @mmmavis any thoughts?

Turn a few configs into env vars with fallback values

  • TARGET_BRANCHES (default value: ['gh-pages'])
  • GOOGLE_SPREADSHEET_KEY (default value: empty string)
  • FETCH_MULTIPLE_WORKSHEETS (default value: True)
  • MAKE_LOCAL_JSON (default value: True)
  • COMMIT_JSON_TO_GITHUB (default value: False)

Update README.md

remember to mention

  • env vars
  • sample .env files (can start from copying this file)
  • share spreadsheet with the Google Service account
  • rename .sample-env to sample.env
  • ((... to be added)

and

  • break README.md into several files
  • put these files on the (to-be-created) docs dir

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.