Skip to content

Commit

Permalink
Fix building the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
chdemko committed Jun 15, 2023
1 parent 0a20793 commit d3d0ba6
Show file tree
Hide file tree
Showing 34 changed files with 3,084 additions and 3,065 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ This project uses:

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

Instructions
------------

Using composer: either

~~~bash
~~~shell
$ composer create-project chdemko/sorted-collections:1.0.*@dev; cd sorted-collections
~~~

Expand All @@ -41,18 +42,10 @@ or create a `composer.json` file containing

and run

~~~bash
~~~shell
$ composer install
~~~

Run also

~~~bash
$ [sudo] pip install [--user] -r docs/requirements.txt
~~~

if you want to create local documentation.

Create a `test.php` file containg

~~~php
Expand All @@ -70,7 +63,7 @@ echo $tree . PHP_EOL;

And run

~~~bash
~~~shell
$ php test.php
~~~

Expand All @@ -82,6 +75,24 @@ This should print

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.

Documentation
-------------

Run

~~~shell
$ sudo apt install doxygen python3-pip python3-virtualenv
$ virtualenv venv
$ venv/bin/activate
(venv) $ pip install -r docs/requirements.txt
(venv) $ sphinx-build -b html docs/ html/
(venv) $ deactivate
$
~~~

if you want to create local documentation with Sphinx.


Citation
--------

Expand Down
5 changes: 0 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"php-coveralls/php-coveralls": "^2.5",
"squizlabs/php_codesniffer": "3.*",
"phpunit/phpunit": "^10.2",
"sphpdox/sphpdox": "dev-master",
"phpbench/phpbench": "^1.2"
},
"autoload": {
Expand All @@ -36,10 +35,6 @@
"scripts": {
"style": "vendor/bin/phpcs --report=full --extensions=php --standard=PSR12 src tests examples benchmarks",
"test": "XDEBUG_MODE=coverage vendor/bin/phpunit --log-junit junit.xml",
"doc": [
"vendor/bin/sphpdox process --output docs chdemko src",
"sphinx-build -b html docs/ html/"
],
"benchmark": "vendor/bin/phpbench run --report=default"
}
}
Loading

0 comments on commit d3d0ba6

Please sign in to comment.