Code Monkey home page Code Monkey logo

Paradicms Collections Management System

This monorepo contains mot of the code and data for the Paradicms Collections Management System.

Getting started

For documentation on how to use Paradicms, see the Paradicms website.

For developer documentation, read on.

Repository organization

Code

The code in this repository is organized into three areas:

  • app/: Paradicms app implementations
  • lib/py/: Python libraries, which are primarily used by Paradicms GitHub Actions
    • lib/py/etl: code for transforming data from various sources (Airtable, Omeka, spreadsheets, et al.) into one of the logical data models supported by Paradicms
    • lib/py/ssg: code for statically generating websites (apps) from data adhering to one of the logical data models
  • lib/ts: TypeScript libraries used by app implementations

Data

The data/ directory contains synthetic data used in development and test data used in unit tests. It also contains generated Costume Core ontologies.

Scripts

There are standardized scripts for building and testing different parts of the code, following the Scripts to Rule Them All pattern. These scripts reside in (sub)directories named script/.

First-time setup

Python libraries

Dependencies

Setup

script/py/bootstrap

TypeScript libraries and apps

Dependencies

Setup

script/ts/bootstrap

Building

TypeScript libraries

yarn build-lib

TypeScript libraries and apps

export DATA_FILE_PATHS="$PWD/data/synthetic/synthetic_data_ts.trig"
yarn build

A single TypeScript app

export DATA_FILE_PATHS="$PWD/data/synthetic/synthetic_data_ts.trig"
cd app/work-search
yarn build

A single TypeScript library

cd lib/ts/models
yarn build

Running tests

Python libraries

script/py/test

TypeScript libraries and apps

script/ts/test

Debugging

Enabling source maps in TypeScript

Change inlineSourceMap to true in tsconfig.base.json, then yarn rebuild-lib.

URL source maps (sourceMap: true) don't currently work between Next.js and the TypeScript libraries.

Disable inlineSourceMap again before pushing to production.

Continuous Integration

This repository uses GitHub Actions for Continuous Integration and Deployment (CI/CD). See the .github/workflows directory for GitHub Actions workflow specifications.

Continuous Deployment

Merges to the default branch trigger a GitHub Actions workflow that:

  • builds a single Docker image from the Dockerfile in the root of the repository and
  • pushes the image to the GitHub Container registry for the organization

This Docker image is the working environment for the Paradicms GitHub Actions. It contains:

  • Python libraries and their dependencies installed in the image's system Python interpreter
  • TypeScript libraries and their dependencies
  • Ready-to-build Paradicms apps

Coding conventions and tools

Python

The Python libraries use type annotations throughout, and mypy for type checking.

Python code is formatted with the Black code formatter.

Flake8 is used for additional linting.

TypeScript

TypeScript code is formatted with Prettier.

License

GNU General Public License version 3 (GPLv3)

Paradicms's Projects

airtable-etl-action icon airtable-etl-action

GitHub Action that extracts, transforms, and loads data from a Paradicms-formatted Airtable base

native icon native

Experimental native (mobile) applications for Paradicms

paradicms icon paradicms

Linked Data-powered Collections Management System for small archives, libraries, and museums

ssg-action icon ssg-action

GitHub Action that generates a static website using Paradicms

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.