Skip to content

Commit

Permalink
Update package title and improve URL case consistency (#167)
Browse files Browse the repository at this point in the history
The package title in the test has been revised for better representation
of its role. The URL case of "JBZoo" in several places has been updated
to "jbzoo" to maintain URL case consistency throughout the project
documentation and test code.
  • Loading branch information
SmetDenis committed Apr 14, 2024
1 parent 6550247 commit e53c9de
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 42 deletions.
71 changes: 36 additions & 35 deletions README.md
@@ -1,4 +1,4 @@
# JBZoo / CSV Blueprint
# CSV Blueprint

<!-- auto-update:top-badges -->
[![CI](https://github.com/JBZoo/Csv-Blueprint/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Csv-Blueprint/actions/workflows/main.yml?query=branch%3Amaster)
Expand Down Expand Up @@ -67,7 +67,7 @@ specifications, making it invaluable in scenarios where data quality and consist
* **GitHub Actions Integration:** Enables CSV validation automation within CI/CD pipelines to improve data quality
control in pull requests and deployments.
* **Flexible Reporting:** Offers integration capabilities with GitHub, Gitlab, TeamCity, and more. Outputs include a
human-readable table for ease of understanding. [View Live Demo](https://github.com/JBZoo/Csv-Blueprint-Demo).
human-readable table for ease of understanding.


<details>
Expand Down Expand Up @@ -104,24 +104,48 @@ specifications, making it invaluable in scenarios where data quality and consist
### Live demo

As a live demonstration of how the tool works, you can explore the super minimal repository
at [JBZoo/Csv-Blueprint-Demo](https://github.com/JBZoo/Csv-Blueprint-Demo). You're encouraged to fork it and experiment
at [jbzoo/csv-blueprint-demo](https://github.com/jbzoo/csv-blueprint-demo). You're encouraged to fork it and experiment
with the tool.

For more complex examples and various reporting methods, take a look at
the [last Demo pipeline](https://github.com/JBZoo/Csv-Blueprint/actions/workflows/demo.yml). Opening the logs will
the [last Demo pipeline](https://github.com/jbzoo/csv-blueprint/actions/workflows/demo.yml). Opening the logs will
reveal basic starting points. Additionally, the `All Report Types` link (located in the left sidebar) provides access to
different types of reports.

**See also**
* [PR as a live demo](https://github.com/JBZoo/Csv-Blueprint-Demo/pull/1/files)
* [PR as a live demo](https://github.com/jbzoo/csv-blueprint-demo/pull/1/files)
* [.github/workflows/demo.yml](.github/workflows/demo.yml)
* [demo_invalid.yml](tests/schemas/demo_invalid.yml)
* [demo_valid.yml](tests/schemas/demo_valid.yml)
* [demo.csv](tests/fixtures/demo.csv)

## Usage

You can find launch examples in the [workflow demo](https://github.com/JBZoo/Csv-Blueprint/actions/workflows/demo.yml).
You can find launch examples in the [workflow demo](https://github.com/jbzoo/csv-blueprint/actions/workflows/demo.yml).

### Docker container

Ensure you have Docker installed on your machine.

```sh
# Pull the Docker image
docker pull jbzoo/csv-blueprint:latest

# Run the tool inside Docker
docker run --rm \
--workdir=/parent-host \
-v $(pwd):/parent-host \
jbzoo/csv-blueprint:latest \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_invalid.yml \
--ansi

# OR build it from source.
git clone git@github.com:jbzoo/csv-blueprint.git csv-blueprint
cd csv-blueprint
make docker-build # local tag is "jbzoo/csv-blueprint:local"
```

### GitHub Action

Expand Down Expand Up @@ -173,29 +197,6 @@ You can find launch examples in the [workflow demo](https://github.com/JBZoo/Csv
```
<!-- auto-update:/github-actions-yml -->

### Docker container

Ensure you have Docker installed on your machine.

```sh
# Pull the Docker image
docker pull jbzoo/csv-blueprint:latest

# Run the tool inside Docker
docker run --rm \
--workdir=/parent-host \
-v $(pwd):/parent-host \
jbzoo/csv-blueprint:latest \
validate:csv \
--csv=./tests/fixtures/demo.csv \
--schema=./tests/schemas/demo_invalid.yml \
--ansi -vvv

# OR build it from source.
git clone git@github.com:JBZoo/Csv-Blueprint.git csv-blueprint
cd csv-blueprint
make docker-build # local tag is "jbzoo/csv-blueprint:local"
```

### Phar binary

Expand All @@ -206,7 +207,7 @@ Ensure you have PHP installed on your machine.

```sh
# Just download the latest version
wget https://github.com/JBZoo/Csv-Blueprint/releases/latest/download/csv-blueprint.phar
wget https://github.com/jbzoo/csv-blueprint/releases/latest/download/csv-blueprint.phar
chmod +x ./csv-blueprint.phar
./csv-blueprint.phar validate:csv \
--csv=./tests/fixtures/demo.csv \
Expand Down Expand Up @@ -1647,7 +1648,7 @@ To see user-friendly error outputs in your pull requests (PRs), specify `report:
utilizes [annotations](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-warning-message)
to highlight bugs directly within the GitHub interface at the PR level. This feature allows errors to be displayed in
the exact location within the CSV file, right in the diff of your Pull Requests. For a practical example,
view [this live demo PR](https://github.com/JBZoo/Csv-Blueprint-Demo/pull/1/files).
view [this live demo PR](https://github.com/jbzoo/csv-blueprint-demo/pull/1/files).

![GitHub Actions - PR](.github/assets/github-actions-pr.png)

Expand Down Expand Up @@ -1694,7 +1695,7 @@ However, to gain a general understanding of performance, refer to the table belo

* All tests were conducted on a dataset comprising `2 million lines` plus an additional line for the header.
* These results are derived from the most current version, as verified by tests run
using [GitHub Actions](https://github.com/JBZoo/Csv-Blueprint/actions/workflows/benchmark.yml) ([See workflow.yml](.github/workflows/benchmark.yml)).
using [GitHub Actions](https://github.com/jbzoo/csv-blueprint/actions/workflows/benchmark.yml) ([See workflow.yml](.github/workflows/benchmark.yml)).
The link provides access to a variety of builds, which are essential for different testing scenarios and experiments.
The most representative data can be found under `Docker (latest, XX)`.
* Developer mode was activated for these tests, using the flags `-vvv --debug --profile`.
Expand Down Expand Up @@ -1860,11 +1861,11 @@ id,bool_int,bool_str,number,float,date,datetime,domain,email,ip4,uuid,address,po

### Run benchmark locally

Make sure you have PHP 8.1+ and Dooker installed.
Make sure you have PHP 8.2+ and Docker installed.

```shell
# Clone the latest version
git clone git@github.com:JBZoo/Csv-Blueprint.git csv-blueprint
git clone git@github.com:jbzoo/csv-blueprint.git csv-blueprint
cd csv-blueprint

# download dependencies and build the tool.
Expand Down Expand Up @@ -2012,7 +2013,7 @@ make codestyle
<details>
<summary>CLICK to see interesting fact</summary>

I've achieved a personal milestone. The [initial release](https://github.com/JBZoo/Csv-Blueprint/releases/tag/0.1) of
I've achieved a personal milestone. The [initial release](https://github.com/jbzoo/csv-blueprint/releases/tag/0.1) of
the project was crafted from the ground up in approximately 3 days, interspersed with regular breaks to care for a
4-month-old baby. Reflecting on the first commit and the earliest git tag, it's clear that this was accomplished over a
weekend, utilizing spare moments on my personal laptop. Interestingly, AI was only employed for crafting this README
Expand Down
9 changes: 2 additions & 7 deletions tests/PackageTest.php
Expand Up @@ -23,7 +23,7 @@ final class PackageTest extends \JBZoo\Codestyle\PHPUnit\AbstractPackageTest
protected string $packageName = 'Csv-Blueprint';
protected string $composerPhpVersion = '^8.2';

protected array $params = [
protected array $params = [ // Needs refactoring
'packagist_latest_stable_version' => true,
'packagist_latest_unstable_version' => true,
'packagist_license' => true,
Expand Down Expand Up @@ -66,7 +66,7 @@ final class PackageTest extends \JBZoo\Codestyle\PHPUnit\AbstractPackageTest
'sonarqube_smells' => true,
];

protected array $badgesTemplate = [
protected array $badgesTemplate = [ // Needs refactoring
'github_actions',
'github_actions_demo',
'psalm_coverage',
Expand Down Expand Up @@ -211,9 +211,4 @@ protected function checkBadgeSonarqubeCoverage(): ?string
),
);
}

protected function getTitle(): string
{
return '# JBZoo / CSV Blueprint';
}
}

0 comments on commit e53c9de

Please sign in to comment.