Monorepo for Pulp packages - a stream-based file processing library for PHP, inspired by Gulp.
- pulp: Core library providing the stream-based processing engine.
- pulp-geojson: Tools for handling, transforming, and converting GeoJSON data.
- pulp-xml: Handlers for parsing and manipulating XML data.
- pulp-json: Handlers for JSON and JSONP decoding and encoding.
- pulp-geocsv: Utility to convert CSV files with geographic data to GeoJSON.
- pulp-soap: SOAP source handler for Pulp streams.
- pulp-tic: Specialized handlers for parsing Traffic Information Center (TIC) XML data.
- pulp-concert: Specialized handlers for parsing Concert XML data (traffic, parking, etc.).
- geojson-reproject: Utility for re-projecting GeoJSON coordinates.
Install dependencies for all packages from the root:
composer installYou can run tests for each package individually. Navigate to the package directory and run composer test:
cd packages/pulp
composer testTo run tests for all packages that have them, run the following command from the root:
composer testOr run the PHP script directly:
php test.phpRun PHP CS Fixer:
vendor/bin/php-cs-fixer fixRun Rector:
vendor/bin/rector processThis monorepo is set up to automatically split and release packages to separate repositories in the open-mapsight organization on GitHub.
- GitHub Action: The
.github/workflows/release.ymlworkflow runs on every push tomainand every new tag. - Splitting: It uses the
danharrin/monorepo-split-github-actionto split each directory inpackages/into its own repository. - Tags: When you tag the monorepo (e.g.,
git tag v1.0.0 && git push --tags), the workflow will also tag the split repositories with the same version. - Packagist: Once the split repositories are updated and tagged, Packagist will pick up the new versions.
By default, the release script pushes to GitHub (github.com). If you ever need to split to a self-hosted instance (like GitLab), you can set the split-repository-host parameter in the .github/workflows/release.yml file.
- Get your API Token from your Packagist profile.
- Add your Packagist username as a secret named
PACKAGIST_USERand your API Token asPACKAGIST_TOKENin this monorepo's GitHub settings. - The release workflow will then notify Packagist via
curlafter each split.
To make the release workflow work, you need to:
- Create the Target Repositories: Ensure that all repositories (e.g.,
open-mapsight/pulp,open-mapsight/pulp-geojson, etc.) exist in theopen-mapsightorganization. - GitHub Personal Access Token: Create a GitHub Personal Access Token (PAT) with
reposcope. - Repository Secret: Add the PAT as a secret named
ACCESS_TOKENin this monorepo's GitHub settings (Settings > Secrets and variables > Actions).