Skip to content

Instantly share code, notes, and snippets.

View mmulich's full-sized avatar

Michael Mulich mmulich

View GitHub Profile
#!/bin/bash
script_name=$( basename ${0#-} ) #- needed if sourced no path
this_script=$( basename ${BASH_SOURCE} )
if [[ ${script_name} = ${this_script} ]] ; then
echo "running me directly"
else
echo "sourced from ${script_name}"
fi
echo '----------'
if [ "$(basename $0)" = "$(basename $BASH_SOURCE)" ]; then
"""
SQLAlchemy with Postgres schemas reflection
This experiment creates some tables across schemas and asks sqlalchemy to reflect those tables.
The tables are not connected with constraints as that would allow reflection to *just* work.
"""
import os
from pprint import pprint

CNX Pipeline

Broadly speaking, there are 2 parts to generate pdfs:

  1. cnxml -> single html

    1. module cnxml files -> module html files
    2. module html files -> epub -> one single html file
  2. single html -> pdf

  1. View of book in json representation, then transition to html representation. The reason for looking at one then the other is to note the collated value, then to to show the more human readable format. /contents/02040312-72c8-441e-a685-20e9333f3e1d%406.14.json
  2. Briefly talk about the tools and the workaround for collating an existing book.
    • internal epub exportation, because this is our single file representation of a book. All the data is wrapped up in a single ball. This is to be used in transformation services & content copy in the near future. It is currently used as the format for publishing material from an authoring tool into the archive.

Write up pro tools doc

Pro tools has been discussed in terms of cnxml and providing an interface on publishing to accept cnxml in a completezip type format.

How does this look from a DMS Point-of-View?

April 2016 CNX release

Two stage upgrade... First stage introduces a database change that will allow archive and zope to remain up at the same time. The second stage introduces the new features.

~~The first set of migration steps did take ~3hrs on cte-dev.~~ (Fixed in Remove warning info from the migration)

TODO Post a summary version of these changes to blog.openstax.org (O... I guess, I'll need to create blog.openstax.org first. 😉 )

Deployment

@mmulich
mmulich / cooked.html
Created April 14, 2016 23:33
testing easybake
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:lrmi="http://lrmi.net/the-specification">
<head itemscope="itemscope" itemtype="http://schema.org/Book">
<title>Book One</title>
<meta itemprop="inLanguage" data-type="language" content="">
<!-- These are for discoverability of accessible content. -->
<meta itemprop="accessibilityFeature" content="MathML">
<meta itemprop="accessibilityFeature" content="LaTeX">
<meta itemprop="accessibilityFeature" content="alternativeText">
# -*- coding: utf-8 -*-
import os
import json
here = os.path.abspath(os.path.dirname(__file__))
DEFAULT_VENDING_SIZE = (12, 4,) # 4 trays by 12 spaces
# class NoDataFound(Exception):
@mmulich
mmulich / gameplan.md
Last active March 14, 2016 20:15
Operation [Technical] Debt Collection

Roadmap -- Operation [Technical] Debt Collection

This operation is planned for two developers over the period of December into early January working in tandem on backend and devops features to better facilitate future developement by collecting and resolving elements of technical debt.

Topics of Interest

These are the topics we'd like to cover:

  • Continuous Deployment
  • Automated Data Migrations
diff --git a/tests/common/db/test_util.py b/tests/common/db/test_util.py
index 73bc090..76152de 100644
--- a/tests/common/db/test_util.py
+++ b/tests/common/db/test_util.py
@@ -3,6 +3,7 @@
:copyright: (c) 2015 Rice University.
:author: pumazi.
"""
+import pytest
import sqlalchemy as db