Skip to content

Commit 28f6add

Browse files
committed
Merge branch 'release/1.0.7'
2 parents 2ae84e6 + 20f80e4 commit 28f6add

35 files changed

+3145
-3115
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ jobs:
3232
- name: Install dependencies
3333
run: composer install --no-progress
3434

35-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36-
# Docs: https://getcomposer.org/doc/articles/scripts.md
37-
3835
- name: Run style
3936
run: composer run style
4037

4138
- name: Run test
4239
run: composer run test
40+
41+
- name: Upload coverage results to Coveralls
42+
env:
43+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
44+
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
45+

README.md

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ PHP Sorted Collections
22
======================
33
![PHP package](https://github.com/chdemko/php-sorted-collections/workflows/PHP%20Composer/badge.svg?branch=develop)
44
[![Documentation Status](https://img.shields.io/readthedocs/php-sorted-collections.svg)](http://php-sorted-collections.readthedocs.io/en/latest/?badge=latest)
5-
[![Coveralls](https://img.shields.io/coveralls/chdemko/php-sorted-collections.svg)](https://coveralls.io/r/chdemko/php-sorted-collections?branch=master)
6-
[![Scrutinizer](https://img.shields.io/scrutinizer/g/chdemko/php-sorted-collections.svg)](https://scrutinizer-ci.com/g/chdemko/php-sorted-collections/?branch=master)
5+
[![Coveralls](https://img.shields.io/coveralls/chdemko/php-sorted-collections.svg)](https://coveralls.io/r/chdemko/php-sorted-collections?branch=develop)
6+
[![Scrutinizer](https://img.shields.io/scrutinizer/g/chdemko/php-sorted-collections/develop.svg)](https://scrutinizer-ci.com/g/chdemko/php-sorted-collections/?branch=develop)
77
[![PHP versions](https://img.shields.io/packagist/dependency-v/chdemko/sorted-collections/php)](https://packagist.org/packages/chdemko/sorted-collections)
88
[![Latest Stable Version](https://img.shields.io/packagist/v/chdemko/sorted-collections.svg)](https://packagist.org/packages/chdemko/sorted-collections)
99
[![Packagist](https://img.shields.io/packagist/dt/chdemko/sorted-collections.svg)](https://packagist.org/packages/chdemko/sorted-collections)
1010
[![Latest Unstable Version](https://poser.pugx.org/chdemko/sorted-collections/v/unstable.svg)](https://packagist.org/packages/chdemko/sorted-collections)
11-
[![License](https://poser.pugx.org/chdemko/sorted-collections/license.svg)](https://raw.githubusercontent.com/chdemko/php-sorted-collections/master/LICENSE)
11+
[![License](https://poser.pugx.org/chdemko/sorted-collections/license.svg)](https://raw.githubusercontent.com/chdemko/php-sorted-collections/develop/LICENSE)
1212

1313
Sorted Collection for PHP. Insertion, search, and removal compute in `log(n)` time where `n` is the number of items present in the collection. It uses AVL threaded tree [see @Knuth97, 1:320, Sect. 2.3.1] as internal structure.
1414

@@ -18,14 +18,15 @@ This project uses:
1818

1919
* [PHP Code Sniffer](https://github.com/squizlabs/php_codesniffer) for checking PHP code style
2020
* [PHPUnit](http://phpunit.de/) for unit test (100% covered)
21-
* [phpDocumentor](http://http://www.phpdoc.org/) and [sphpdox](https://packagist.org/packages/sphpdox/sphpdox) for [documentation](http://php-sorted-collections.readthedocs.io/en/latest/?badge=latest)
21+
* [Sphinx](https://www.sphinx-doc.org/) and [Doxygen](https://www.doxygen.nl/) for the
22+
[documentation](http://php-sorted-collections.readthedocs.io/en/latest/?badge=latest)
2223

2324
Instructions
2425
------------
2526

2627
Using composer: either
2728

28-
~~~bash
29+
~~~shell
2930
$ composer create-project chdemko/sorted-collections:1.0.*@dev; cd sorted-collections
3031
~~~
3132

@@ -41,21 +42,15 @@ or create a `composer.json` file containing
4142

4243
and run
4344

44-
~~~bash
45+
~~~shell
4546
$ composer install
4647
~~~
4748

48-
Run also
49-
50-
~~~bash
51-
$ [sudo] pip install [--user] -r docs/requirements.txt
52-
~~~
53-
54-
if you want to create local documentation.
55-
5649
Create a `test.php` file containg
5750

5851
~~~php
52+
<?php
53+
5954
require __DIR__ . '/vendor/autoload.php';
6055

6156
use chdemko\SortedCollection\TreeMap;
@@ -66,18 +61,42 @@ $tree = TreeMap::create()->put(
6661
echo $tree . PHP_EOL;
6762
~~~
6863

69-
This should print
64+
And run
7065

66+
~~~shell
67+
$ php test.php
7168
~~~
69+
70+
This should print
71+
72+
~~~console
7273
[0,1,2,3,4,5,6,7,8,9]
7374
~~~
7475

75-
See the [examples](https://github.com/chdemko/php-sorted-collections/tree/master/examples) and [benchmarks](https://github.com/chdemko/php-sorted-collections/tree/master/benchmarks) folder for more information.
76+
See the [examples](https://github.com/chdemko/php-sorted-collections/tree/develop/examples) and [benchmarks](https://github.com/chdemko/php-sorted-collections/tree/develop/benchmarks) folder for more information.
77+
78+
Documentation
79+
-------------
80+
81+
Run
82+
83+
~~~shell
84+
$ sudo apt install doxygen python3-pip python3-virtualenv
85+
$ virtualenv venv
86+
$ venv/bin/activate
87+
(venv) $ pip install -r docs/requirements.txt
88+
(venv) $ sphinx-build -b html docs/ html/
89+
(venv) $ deactivate
90+
$
91+
~~~
92+
93+
if you want to create local documentation with Sphinx.
94+
7695

7796
Citation
7897
--------
7998

80-
If you are using this project including publication in research activities, you have to cite it using ([BibTeX format](https://raw.github.com/chdemko/php-sorted-collections/master/cite.bib)). You are also pleased to send me an email to [email protected].
99+
If you are using this project including publication in research activities, you have to cite it using ([BibTeX format](https://raw.github.com/chdemko/php-sorted-collections/develop/cite.bib)). You are also pleased to send me an email to [email protected].
81100
* authors: Christophe Demko
82101
* title: php-sorted-collections: a PHP library for handling sorted collections
83102
* year: 2014

composer.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"php-coveralls/php-coveralls": "^2.5",
2121
"squizlabs/php_codesniffer": "3.*",
2222
"phpunit/phpunit": "^10.2",
23-
"sphpdox/sphpdox": "dev-master",
2423
"phpbench/phpbench": "^1.2"
2524
},
2625
"autoload": {
@@ -35,11 +34,7 @@
3534
},
3635
"scripts": {
3736
"style": "vendor/bin/phpcs --report=full --extensions=php --standard=PSR12 src tests examples benchmarks",
38-
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit",
39-
"doc": [
40-
"vendor/bin/sphpdox process --output docs chdemko src",
41-
"sphinx-build -b html docs/ html/"
42-
],
37+
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit --log-junit junit.xml",
4338
"benchmark": "vendor/bin/phpbench run --report=default"
4439
}
4540
}

0 commit comments

Comments
 (0)