/data-hub-foundation

Shared code for all of our dataservices

Primary LanguagePHPGNU Affero General Public License v3.0AGPL-3.0

Art Institute of Chicago

Data Hub Foundation

A shared package of base models and configurations used across all the Data Hub's data services

The data aggregator and related microservices all have a number of shared features and configurations. This repository is a composer package intended to consolidate all the shared functionality into a single place.

Features

  • Base model, controller, command and other common classes
  • Shared config files
  • Exception classes for commonly used errors
  • Commonly used middleware

Requirements

  • PHP 7.2.5 or greater
  • Laravel 7.0.0 or greater

Installing

To install in your project, run composer require aic/data-hub-foundation:dev-laravel-8-support, or add the following to the composer.json and then run composer update:

"require": {
    "aic/data-hub-foundation": "dev-laravel-8-support",
}

To utilize formatting and linting in your project, add the following to the composer.json:

"scripts" : {
    "format": [
        "@putenv COMPOSER=vendor/aic/data-hub-foundation/composer.json",
        "@composer format"
    ],
    "lint": [
        "@putenv COMPOSER=vendor/aic/data-hub-foundation/composer.json",
        "@composer lint"
    ]
}

These scripts can be run in your project with composer lint and composer format.

Developing

To start developing this project, install it on your app. Make modifications within the vendor/aic/data-hub-foundation folder to test-run your changes, then make and commit those changes after they've been confirmed to work ok.

Alternatively, you can install the package, then delete the vendor/aic/data-hub-foundation folder and create a symlink to the repo elsewhere on your workstation.

git clone https://github.com/art-institute-of-chicago/data-hub-foundation.git
cd data-hub-foundation/

Contributing

We encourage your contributions. Please fork this repository and make your changes in a separate branch. To better understand how we organize our code, please review our version control guidelines.

# Clone the repo to your computer
git clone git@github.com:your-github-account/data-hub-foundation.git

# Enter the folder that was created by the clone
cd data-hub-foundation

# Start a feature branch
git checkout -b feature/good-short-description

# ... make some changes, commit your code

# Push your branch to GitHub
git push origin feature/good-short-description

Then on github.com, create a Pull Request to merge your changes into our master branch.

This project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

We welcome bug reports and questions under GitHub's Issues. For other concerns, you can reach our engineering team at engineering@artic.edu

Licensing

This project is licensed under the GNU Affero General Public License Version 3.