Skip to content

emfcamp/TiDAL-Hatchery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badge.Team Hatchery

Build Status Maintainability Test Coverage Codacy Badge Codecov FOSSA Status Known Vulnerabilities Github Actions

Simple micropython software repository for Badges.

Live Site | API Playground | Documentation | GitHub

Installation

  • Requires PHP 8.0 or later
  • Requires Python 3.6 or later
  • Requires Node.js 16.14 or later
  • Requires Redis 3.2 or later
  • Requires Git 2.8 or later

For deployment on a server.

cp .env.example .env

Edit your database, mail and other settings..

Or copy the local dev environment config.

cp .env.dev .env

Install and configure required items.

pip install pyflakes
composer install
php artisan key:generate
php artisan migrate
yarn
yarn production

Install the async websocket server.

Global install

yarn global install @soketi/soketi

or just install/run via docker (see below)

Compiling and installing the patched minigzip.

wget http://zlib.net/zlib-1.2.12.tar.gz
tar xvf zlib-1.2.12.tar.gz
cd zlib-1.2.12
./configure
echo -e "#define MAX_WBITS  13\n$(cat zconf.h)" > zconf.h
make
sudo make install

If you would like to have Verilog support.

Install Icarus Verilog 0.9 or later.

TODO more info ;)

Services

You'll need a be running Laravel Horizon service.

For the websocket server. docker

docker run -p 6001:6001 -p 9601:9601 \
    -e SOKETI_DEFAULT_APP_ID='soketi' \
    -e SOKETI_DEFAULT_APP_KEY='soketi' \
    -e SOKETI_DEFAULT_APP_SECRET='soketi' \
    quay.io/soketi/soketi:1.0-16-debian

or if installed global

SOKETI_DEFAULT_APP_ID=soketi SOKETI_DEFAULT_APP_KEY=soketi SOKETI_DEFAULT_APP_SECRET=soketi soketi start

Running the development server locally

After going through the steps

php artisan serve

If you don't want to install things and do the above steps, Docker makes all the above as easy as:

docker-compose up # -d for daemon mode
docker-compose exec laravel php artisan migrate --seed
docker-compose exec laravel yarn dev
docker-compose exec laravel php artisan horizon

Enjoy your Hatchery at http://localhost:8000

See: https://badge.team/api

Running tests

Static analysis

vendor/bin/phpstan analyse

Unit and Feature testing

Run all the tests

vendor/bin/pest --no-coverage

Run a test suite (for a list of availabe suites, see /phpunit.xml)

vendor/bin/pest --testsuite <suite_name>

Run a specific test file

vendor/bin/pest tests/<optional_folders>/TestFileName

Run a specific test case

vendor/bin/pest --filter <test_case_name>

Generate code coverage as HTML

vendor/bin/pest --coverage-html docs/coverage

This will create the code coverage docs in docs/coverage/index.html

Not: Clear caches before testing!

php artisan route:clear && php artisan config:clear

Testing with Codeception

vendor/bin/codecept build
vendor/bin/codecept run

License

Hatchery is open-sourced software licensed under the MIT license.

The Laravel framework is open-sourced software licensed under the MIT license.

FOSSA Status

About

EMF 2022 hatchery micropython app repository

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • PHP 78.1%
  • Blade 19.2%
  • JavaScript 1.8%
  • Other 0.9%