#2894 fix style issues in all markdown files

This commit is contained in:
Roman Korostinskiy 2024-02-26 13:47:54 +03:00
parent 67b71f7419
commit 6af299d3bd
No known key found for this signature in database
6 changed files with 65 additions and 31 deletions

View File

@ -202,7 +202,8 @@ Watch [video](https://www.youtube.com/watch?v=QaKIw1Bh3Oc) about EOLANG basics.
Read [our blog](https://news.eolang.org), especially the section with
[recently published papers](https://news.eolang.org/papers.html).
Learn [XMIR](https://news.eolang.org/2022-11-25-xmir-guide.html), a dialect of XML, which we use to represent EO program.
Learn [XMIR](https://news.eolang.org/2022-11-25-xmir-guide.html), a dialect of XML, which we use to
represent EO program.
See the full collection of canonical objects: [objectionary](https://github.com/objectionary/home).

View File

@ -124,7 +124,8 @@ Maven option `-U` (see [Maven CLI docs](https://maven.apache.org/ref/3.1.0/maven
mvn -U clean install
```
If you want to build your project or run your tests which use eo-maven-plugin, you can change stack size for your purposes by stack-size option:
If you want to build your project or run your tests which use eo-maven-plugin, you can change stack
size for your purposes by stack-size option:
```shell
mvn clean install -Pqulice -Dstack-size=1M
@ -134,19 +135,21 @@ where 1M is size of stack. By default stack-size = 256M in eo-maven-plugin, maxi
## How to run Integration Tests only
If you want to run a specific integration test without waiting until other unit or integration tests are executed you need to go to `eo-maven-plugin`
directory and execute the next command:
If you want to run a specific integration test without waiting until other unit or integration tests
are executed you need to go to `eo-maven-plugin` directory and execute the next command:
```shell
mvn clean integration-test invoker:run -Dinvoker.test=fibonacci -DskipTests
```
Here `fibonacci` is the name of the desired integration test, `-DskipTests` is used in order to skip `eo-maven-plugin` unit tests.
Here `fibonacci` is the name of the desired integration test, `-DskipTests` is used in order to skip
`eo-maven-plugin` unit tests.
## How to disable Integration Tests
It is sometime necessary to temporary disable the integration tests (for example for introducing braking changes into plugin or EO runtime).
This can be achieved by disabling `maven-invoker-plugin` execution within `eo-maven-plugin/pom.xml`:
It is sometime necessary to temporary disable the integration tests (for example for introducing
braking changes into plugin or EO runtime). This can be achieved by disabling `maven-invoker-plugin`
execution within `eo-maven-plugin/pom.xml`:
```xml
<plugins>

View File

@ -1,4 +1,5 @@
<img src="https://www.yegor256.com/images/books/elegant-objects/cactus.svg" height="100px" />
<!-- markdownlint-disable-next-line line-length -->
<img alt="logo" src="https://www.yegor256.com/images/books/elegant-objects/cactus.svg" height="100px" />
[![Maven Central](https://img.shields.io/maven-central/v/org.eolang/eo-maven-plugin.svg)](https://maven-badges.herokuapp.com/maven-central/org.eolang/eo-maven-plugin)

View File

@ -5,24 +5,39 @@
# How to Test
This documentation provides a step-by-step guide to test the `EO` code in `eo-parser` package. There are two files provide
testing `EO` files: `PacksTest` and `TypoTests`.
This documentation provides a step-by-step guide to test the `EO` code in `eo-parser` package. There
are two files provide testing `EO` files: `PacksTest` and `TypoTests`.
The `PacksTest` class contains two test methods:
1. `parsesPacks()` - This method tests if the packs are parsed correctly. It reads YAML files from the `org/eolang/parser/packs/` directory and checks if there are any failures. If there are any failures, the test is aborted.
2. `createsXaxStoryWithXslStylesheets()` - This method tests if the XSL stylesheets are created correctly. It reads YAML files from the `org/eolang/parser/xax/` directory and creates an XaxStory object. The test passes if the object is created successfully.
1. `parsesPacks()` - This method tests if the packs are parsed correctly. It reads YAML files from
the `org/eolang/parser/packs/` directory and checks if there are any failures. If there are any
failures, the test is aborted.
2. `createsXaxStoryWithXslStylesheets()` - This method tests if the XSL stylesheets are created
correctly. It reads YAML files from the `org/eolang/parser/xax/` directory and creates an XaxStory
object. The test passes if the object is created successfully.
`TypoTests` contains only `checksPacks()` method with same functionality as `parsesPacks()`. But it takes YAML files from `org/eolang/parser/typos/` directory.
`TypoTests` contains only `checksPacks()` method with same functionality as `parsesPacks()`. But it
takes YAML files from `org/eolang/parser/typos/` directory.
To create YAML file, you can follow the following steps:
1. Start by creating a brief introduction to the file and its purpose. In this case, the YAML file is used for defining the XSLT stylesheets and the tests for a program, as well as defining aliases and the main function.
2. Next, provide a section that explains the different sections of the YAML file. In this case, there are three sections: `xsls`, `tests`, and `eo`.
3. For the `xsls` section, explain that it is used to define the XSLT stylesheets that will be used for transforming the input program. Provide a brief explanation of each stylesheet listed in the section.
4. For the `tests` section, explain that it is used for defining the tests that will be run on the program. Provide a brief explanation of each test listed in the section.
5. For the `eo` section, explain that it is used for defining aliases and the main function for the program. Provide a brief explanation of each alias listed in the section, and how they can be used in the program. Also, explain the purpose of the `main` function and how it works.
6. Finally, provide a conclusion that summarizes the purpose and contents of the YAML file. You can also include any additional information that might be helpful for users who are working with the file.
1. Start by creating a brief introduction to the file and its purpose. In this case, the YAML file
is used for defining the XSLT stylesheets and the tests for a program, as well as defining aliases
and the main function.
2. Next, provide a section that explains the different sections of the YAML file. In this case,
there are three sections: `xsls`, `tests`, and `eo`.
3. For the `xsls` section, explain that it is used to define the XSLT stylesheets that will be used
for transforming the input program. Provide a brief explanation of each stylesheet listed in the
section.
4. For the `tests` section, explain that it is used for defining the tests that will be run on the
program. Provide a brief explanation of each test listed in the section.
5. For the `eo` section, explain that it is used for defining aliases and the main function for the
program. Provide a brief explanation of each alias listed in the section, and how they can be used
in the program. Also, explain the purpose of the `main` function and how it works.
6. Finally, provide a conclusion that summarizes the purpose and contents of the YAML file. You can
also include any additional information that might be helpful for users who are working with the
file.
Here is an example of what the YAML file might look like:
@ -63,25 +78,32 @@ eo: |
### Sections
This YAML file is used to define the XSLT stylesheets and tests for a program, as well as defining aliases and the main function.
It consists of three sections: `xsls`, `tests`, and `eo`. The `xsls` section is used to define the XSLT stylesheets, the `tests` section is used for defining the tests, and the `eo` section is used for defining aliases and the main function.
This YAML file is used to define the XSLT stylesheets and tests for a program, as well as defining
aliases and the main function. It consists of three sections: `xsls`, `tests`, and `eo`. The `xsls`
section is used to define the XSLT stylesheets, the `tests` section is used for defining the tests,
and the `eo` section is used for defining aliases and the main function.
#### xsls
This section is used to define the XSLT stylesheets that will be used for transforming the input program. The following stylesheets are defined in this section:
This section is used to define the XSLT stylesheets that will be used for transforming the input
program. The following stylesheets are defined in this section:
- `/org/eolang/parser/add-refs.xsl`: This stylesheet is used to add references to the program.
- `/org/eolang/parser/expand-aliases.xsl`: This stylesheet is used to expand aliases in the program.
- `/org/eolang/parser/resolve-aliases.xsl`: This stylesheet is used to resolve aliases in the program.
- `/org/eolang/parser/add-default-package.xsl`: This stylesheet is used to add a default package to the program.
- `/org/eolang/parser/resolve-aliases.xsl`: This stylesheet is used to resolve aliases in the
program.
- `/org/eolang/parser/add-default-package.xsl`: This stylesheet is used to add a default package to
the program.
#### tests
This section is used for defining the tests that will be run on the program. The following tests are defined in this section:
This section is used for defining the tests that will be run on the program. The following tests are
defined in this section:
- `/program/errors[count(*)=0]`: This test checks that there are no errors in the program.
- `/program/objects[count(o)=1]`: This test checks that there is only one object in the program.
- `//o[@base='org.eolang.and' and @line='8']`: This test checks that there is an object with the base `org.eolang.and` and the line number `8`.
- `//o[@base='org.eolang.and' and @line='8']`: This test checks that there is an object with the
base `org.eolang.and` and the line number `8`.
- `//o[@base='foo']`: This test checks that there is an object with the base `foo`.
- `//o[@base='$']`: This test checks that there is an object with the base `$`.
- `//o[@base='^']`: This test checks that there is an object with the base `^`.

View File

@ -69,22 +69,29 @@ where `N` is an integer representing desired nesting level to log.
Here is some steps to release eo-runtime:
1.To run `.rultor.yml` script in `objectionary/eo`. It is better to do it by [rultor](https://www.yegor256.com/2014/07/24/rultor-automated-merging.html) command in any github comment:
1.To run `.rultor.yml` script in `objectionary/eo`. It is better to do it by
[rultor](https://www.yegor256.com/2014/07/24/rultor-automated-merging.html) command in any github
comment:
```
@rultor release, tag is `{new-version}`
```
Running this script will update the `gh-pages` git branch. Which contains only `.eo` objects from the `eo-runtime` package and the file required by the script: [objectionary.lst](https://github.com/objectionary/eo/blob/gh-pages/objectionary.lst).
Running this script will update the `gh-pages` git branch. Which contains only `.eo` objects from
the `eo-runtime` package and the file required by the script:
[objectionary.lst](https://github.com/objectionary/eo/blob/gh-pages/objectionary.lst).
This script also will create several files in Maven central repository (eg `.jar`, `.pom` etc.).
2.To create a pull request in `objectionary/home` by `pull.sh` script in a separate git branch (the name of the branch doesn't matter):
2.To create a pull request in `objectionary/home` by `pull.sh` script in a separate git branch
(the name of the branch doesn't matter):
```shell
./pull.sh objectionary/eo
```
This will update all `.eo` files in `gh-pages` from `objectionary/eo`. It will also change the corresponding versions of the eo objects (e.g. from the `+version` metadata) in the `objectionary/home` repository.
This will update all `.eo` files in `gh-pages` from `objectionary/eo`. It will also change the
corresponding versions of the eo objects (e.g. from the `+version` metadata) in the
`objectionary/home` repository.
3.To check and to remove manually either unused or old files. Script didn't do it.

View File

@ -1,4 +1,4 @@
<img src="https://rawgithub.com/yegor256/elegantobjects/master/cactus.svg" height="100px"/>
<img alt="logo" src="https://rawgithub.com/yegor256/elegantobjects/master/cactus.svg" height="100px"/>
[![make](https://github.com/objectionary/eo/actions/workflows/latexmk.yml/badge.svg)](https://github.com/objectionary/eo/actions/workflows/latexmk.yml)