infrastructure

in-progress manuscript

https://github.com/sneakers-the-rat/infrastructure

Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

in-progress manuscript

Basic Info
  • Host: GitHub
  • Owner: sneakers-the-rat
  • License: mpl-2.0
  • Language: TeX
  • Default Branch: main
  • Size: 35.2 MB
Statistics
  • Stars: 9
  • Watchers: 2
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created almost 5 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

infrastructure

in-progress manuscript.

Rendered at https://jon-e.net/infrastructure

Contribution

Pull Requests

TODO

Chat

We're using gitter (which recently became a Matrix client) to chat, organize the paper, as well as have continuing dialogue after release.

Rooms

  • Gitter - Prerelease - drafting and organizing conversations before release
  • Join the chat at https://gitter.im/scientific-infrastructure/community - Community - general chat

Writing Syntax

TODO

  • normal markdown,
  • {% cite bibtex-key %} for citations
  • what else !??!?

Code Structure

  • The document is built using jekyll and also includes some page elements built using react.
  • The package.json file contains the scripts used to build and serve the document (described below)
  • Dependency management and building uses
    • yarn to manage node/javascript dependencies (for react). Yarn reads the dependencies in package.json and makes the yarn.lock file which is a full snapshot of exact dependencies used in the last installation.
    • bundler to manage the ruby dependencies. Bundler uses the Gemfile to generate the Gemfile.lock analogously to yarn.
    • webpack to compile React and other javascript into an included bundle

(all .md or .markdown files are rendered to html, so index.markdown becomes index.html on the final site.)

Main Text

  • index.markdown is the parent file that structures the document and imports its different sections.
  • _sections/ contains each of the sections included into the main document. The sections are numbered, but refer to the index for the definitive ordering.
  • assets/infrastructure.bib - a BibTeX file containing all references in the piece, add new references here and cite them with the @key.

Meta Text

  • todo.md - keeping track of things to do
  • trims.markdown - large sections of text removed from the main text to try and make it shorter that might find their way into future writing (see _trims/)

Jekyll-specific

  • _includes/ - short liquid templates to use in page
  • _layouts/ - whole-page layout templates to structure html, see the header of each .md/.markdown file
  • _plugins/ - jekyll plugins
  • _sass/ - compiled to css, control the look and feel of the site.

javascript & other web stuff

  • assets/ has vanilla css and javascript, as well as all any images
  • assets/notebooks will eventually be included in the document, but the rendering is turned off at the moment while it's being debugged.

etc.

  • tex/ see pdf-rendering
  • code contains supplementary code for calculating numbers for the paper/other meta-needs.
  • data contains any data referenced in the text.

Usage

Requirements

You will first need to have installed

  • node (working version: 17.2.0)
  • yarn (working version: 1.22.17)
  • ruby (working version: 3.0.2p107)
  • bundler (working version: 2.2.29)

On macOS:

```bash

install homebrew if needed

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

brew install node yarn ruby gem install bundler ```

Let me know of any other OS needs by raising an issue!

Installation

Clone the repository and enter the directory

bash git clone https://github.com/sneakers-the-rat/infrastructure cd infrastructure

Install the ruby and node dependencies

bash bundle install yarn install

Building

The build is in two stages, first webpack runs to compile the React and other javascript into a bundle, and then jekyll compiles the markdown, scss, and javascript into the final website. The website is built into the _site directory

bash npm run build

which just calls

bash npm run build_wp npm run build_jk

Serving

To write locally, you can run a development server which continuously rebuilds the page whenever the files are updated.

The local version is identical to the published version, except that hypothes.is is currently disabled locally by default because the bug that's slowing down the page on load is really excruciating with constant rebuilds and refreshes. I've opened an issue

Start the development server with

bash npm run start

and then open http://127.0.0.1:4000/infrastructure/ in your browser.

Deploying

When a new commit is pushed to main, the website is built with github actions (see .github/workflows/github-pages.yml) and deployed on the gh_pages branch, which is what https://jon-e.net/infrastructure points to.

PDF rendering

The script code/jekyll_to_tex.py converts the markdown to TeX. This part is currently under construction and not part of the automated build pipeline!

It uses pandoc and a pile of manual syntax conversion to make tex/decentralized_infrastructure_render.tex, which uses styles from tex/jls_base.sty.

The .pdf version may lag behind the site by several commits, and doesn't have the same versioning and metadata at the moment, but it is provided for choice of medium, and will be what is submitted to bioRxiv.

Versioning

Every time a new version is committed to main, the github action also stores a versioned build identified by the short 7-digit hash. They can be found at the url pattern https://jon-e.net/infrastructure/versions/<HASH>/, for example https://jon-e.net/infrastructure/versions/b7a7676/.

These versions, to the degree that they differ from the current version, might have their hypothesis annotations all over the place, or have other problems patched in later versions. I also warn that I might yank a version before official publication, but will strongly avoid doing so afterwards.

Slideshows

Derivative slideshows can also be made by using the slides layout, which uses reveal.js for animation.

The syntax is straightforward:

```markdown

layout: slides

title: CMHJC

contents rendered as HTML
# use markdown syntax! - make lists - or whatever **you want**

```

and see the reveal.js docs for more.

Owner

  • Name: Jonny Saunders
  • Login: sneakers-the-rat
  • Kind: user

Bad at programming in beautiful Oregon

Citation (citations.csl)

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" default-locale="en-US">
  <info>
    <title>National Science Foundation (grant proposals) with minor revisions</title>
    <title-short>NSF</title-short>
    <id>http://www.zotero.org/styles/national-science-foundation-grant-proposals</id>
    <link href="http://www.zotero.org/styles/national-science-foundation-grant-proposals" rel="self"/>
    <link href="https://www.nsf.gov/pubs/policydocs/pappg19_1/pappg_2.jsp#IIC2e" rel="documentation"/>
    <author>
      <name>Paul Gugger</name>
      <email>pgugger@umces.edu</email>
    </author>
    <category citation-format="numeric"/>
    <category field="science"/>
    <updated>2019-02-06T14:09:00+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
  </info>
  <citation collapse="citation-number">
    <sort>
      <key variable="citation-number"/>
    </sort>
    <layout prefix="[" suffix="]" delimiter=", ">
      <text variable="citation-number"/>
    </layout>
  </citation>
  <bibliography>
    <layout>
      <names variable="author" suffix=" ">
        <name delimiter=". " name-as-sort-order="all" sort-separator=", " form="long" initialize="false" initialize-with="" font-weight="bold"/>
      </names>
      <date variable="issued" prefix="(" suffix=") ">
        <date-part name="year" form="long"/>
      </date>
      <text variable="title" suffix=". "/>
      <text variable="container-title" suffix=", " font-style="italic"/>
      <text variable="volume"/>
      <text variable="issue" prefix="(" suffix=")"/>
      <text variable="page" prefix=":" suffix=". "/>
    </layout>
  </bibliography>
</style>

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 9
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 months
  • Total issue authors: 0
  • Total pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.56
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • Trott (7)
  • gitter-badger (1)
  • sneakers-the-rat (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

package.json npm
  • @babel/core ^7.15.8 development
  • @babel/preset-env ^7.15.8 development
  • @babel/preset-react ^7.14.5 development
  • @fortawesome/fontawesome-free ^5.15.4 development
  • babel-loader ^8.2.3 development
  • babel-plugin-import ^1.13.3 development
  • concurrently ^6.3.0 development
  • webpack ^5.59.1 development
  • webpack-cli ^4.9.1 development
  • webpack-dev-server ^4.4.0 development
  • @emotion/react ^11.5.0
  • @emotion/styled ^11.3.0
  • @mui/icons-material ^5.1.0
  • @mui/material ^5.0.6
  • anchor-js ^4.3.1
  • buffer ^6.0.3
  • css-minimizer-webpack-plugin ^3.1.1
  • lodash ^4.17.21
  • lodash-es ^4.17.21
  • mini-css-extract-plugin ^2.4.3
  • react ^17.0.2
  • react-dom ^17.0.2
  • react-html-parser ^2.0.2
yarn.lock npm
  • 638 dependencies
Gemfile rubygems
  • jekyll-scholar >= 0 development
  • jekyll-seo-tag >= 0 development
  • liquid_reading_time >= 0 development
  • tale >= 0 development
  • jekyll ~> 4.2.0
  • minima ~> 2.5
  • profile >= 0
  • ruby-prof-flamegraph >= 0
  • tzinfo ~> 1.2
  • tzinfo-data >= 0
  • wdm ~> 0.1.1
  • webrick ~> 1.7
Gemfile.lock rubygems
  • addressable 2.8.0
  • bibtex-ruby 6.0.0
  • citeproc 1.0.10
  • citeproc-ruby 1.1.14
  • colorator 1.1.0
  • concurrent-ruby 1.1.10
  • csl 1.6.0
  • csl-styles 1.0.1.11
  • em-websocket 0.5.3
  • eventmachine 1.2.7
  • ffi 1.15.5
  • forwardable-extended 2.6.0
  • http_parser.rb 0.8.0
  • i18n 1.12.0
  • jekyll 4.2.2
  • jekyll-feed 0.16.0
  • jekyll-paginate 1.1.0
  • jekyll-sass-converter 2.2.0
  • jekyll-scholar 7.0.0
  • jekyll-seo-tag 2.8.0
  • jekyll-watch 2.2.1
  • kramdown 2.4.0
  • kramdown-parser-gfm 1.1.0
  • latex-decode 0.3.2
  • liquid 4.0.3
  • liquid_reading_time 1.1.3
  • listen 3.7.1
  • mercenary 0.4.0
  • minima 2.5.1
  • namae 1.1.1
  • nokogiri 1.13.7
  • pathutil 0.16.2
  • profile 0.4.0
  • public_suffix 4.0.7
  • racc 1.6.0
  • rb-fsevent 0.11.1
  • rb-inotify 0.10.1
  • rexml 3.2.5
  • rouge 3.29.0
  • ruby-prof 0.18.0
  • ruby-prof-flamegraph 0.3.0
  • safe_yaml 1.0.5
  • sassc 2.4.0
  • tale 0.2.3
  • terminal-table 2.0.0
  • unicode-display_width 1.8.0
  • webrick 1.7.0
.github/workflows/build-tex.yml.bak actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/github-pages.yml actions
  • actions/cache v2 composite
  • actions/checkout v3 composite
  • actions/setup-node v2 composite
  • helaili/jekyll-action master composite