The code is Python 3.7
$ pipenv install
The site uses elsa.
pipenv install --dev
- Development server:
pipenv run serve
pipenv run test
Data and tests
The site is just a single HTML page rendered on top of some static data. However, the data can get quite complex and most of the texts need to be translated into two languages.
The data is stored in multiple YAML files. When these are read, whenever
an object has just
en properties, it is treated as a "translated text"
and the property corresponding to a currently selected language becomes
the actual value in place of the object.
Also, to keep the complex structure of the YAML files organized and tested, there are schemas written in JSON Schema (spec). In tests, the YAML files are validated against the schemas. There is also a couple of additional tests to ensure some logical rules which cannot be easily expressed by JSON Schema.
There are stats numbers in numbers.yml. They are not calculated on the fly, because for many of them it's either complicated or impossible. They need to be updated manually from time to time. Comments in the YAML file should give you guidance on when the last update has happened.
The number of GitHub contributors was calculated by a mighty one-off script made by @honzajavorek, which uses GitHub API as well as it clones and analyzes all relevant repositories. If you need to update the number,
- ask him to run the script,
- bother him to Open Source the script code.
To figure out correct URLs of Twitter avatars from Twitter usernames, the site
needs to perform an HTTP request for each of them. This is not really an issue,
because on production this is done only once - in the moment of deployment.
However, it can get very annoying during development. Set
environment variable to truthy value to disable Twitter avatars for development.
The site uses elsa. It gets automatically deployed
after any push to the