Skip to content

astrogewgaw/whoswho

Repository files navigation

whoswho



Header Image

License Gitmoji

Last Updated

Count Contactable Tweeters


This script is used to manage the Who's Who in Astrochemistry database, a contact list of astrochemists from around the globe. If you are seeing this help message, you have probably cloned the original repository, or an original fork of it, on your local machine. You have installed all the dependencies (probably because you saw a requirements.txt file) and you figured out how to display this help message. Whether you were just ideally curious, or you were thinking of contributing, you will find all the answers you desire here.

First of all, what does this script do? Well, if you have this repository on your system, you probably rummaged through the folders and saw a lot of YAML files. These files power the entire Who's Who website, thanks to the awesome Lowdefy framework. I use this script to build those YAML files from a bunch of Mako templates, locally serve the Who's Who app (to see if everything is working as intended), and update my local copy of the database that ultimately makes it into the Github repository. This script also calculates a few statistics about the database, such as the total number of astrochemists, how many can be contacted (via their email or Twitter), and how many of them are tweeting.

We use the invoke package to power the entire script. invoke is a framework for running use-defined tasks. These tasks can be anything: Python functions, shell commands, etc. In this simplest scenario (which is what we user here), all the user needs to do is define the tasks in a tasks.py file, and then invoke any task using the invoke CLI. The settings for the invoke CLI are customized through the invoke.yaml file.

To see how the site looks, just type:

invoke serve

This will start a local server and serve the Who's Who web application. As you carry out your changes, you will be able to see them show up instantly! To make a change, it is recommended that you change the templates (in the templates directory) rather than the YAML pages themselves (which you will find in the pages directory), because otherwise all your changes will vanish anytime you recompile your changes with:

invoke compile

Run the above command everytime you wish to see your changes show up in the YAML files andf in the web application. You can check out some stats about the database by typing:

invoke statistics

If you wish to update your copy of the database, just run:

invoke update

Releases

No releases published

Packages

No packages published