Skip to content

Commit

Permalink
docs: update readme and example project generation
Browse files Browse the repository at this point in the history
  • Loading branch information
cuinixam authored and xxthunder committed Apr 30, 2024
1 parent eb06294 commit c19e220
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 19 deletions.
42 changes: 34 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
# SPL (Software Product Line) Core

_SPL Core_ is our CMake module to support multiple projects as variants of one SPL repository.

## CI (Continuous Integration)
<p align="center">
<a href="https://github.com/avengineers/spl-core/actions/workflows/ci.yml?query=branch%3Adevelop">
<img src="https://img.shields.io/github/actions/workflow/status/avengineers/spl-core/ci.yml?branch=develop&label=CI&logo=github&style=flat-square" alt="CI Status" >
</a>
<a href="https://spl-core.readthedocs.io">
<img src="https://img.shields.io/readthedocs/spl-core.svg?logo=read-the-docs&logoColor=fff&style=flat-square" alt="Documentation Status">
</a>
<a href="https://codecov.io/gh/avengineers/spl-core">
<img src="https://img.shields.io/codecov/c/github/avengineers/spl-core.svg?logo=codecov&logoColor=fff&style=flat-square" alt="Test coverage percentage">
</a>
</p>
<p align="center">
<a href="https://python-poetry.org/">
<img src="https://img.shields.io/badge/packaging-poetry-299bd7?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAASCAYAAABrXO8xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJJSURBVHgBfZLPa1NBEMe/s7tNXoxW1KJQKaUHkXhQvHgW6UHQQ09CBS/6V3hKc/AP8CqCrUcpmop3Cx48eDB4yEECjVQrlZb80CRN8t6OM/teagVxYZi38+Yz853dJbzoMV3MM8cJUcLMSUKIE8AzQ2PieZzFxEJOHMOgMQQ+dUgSAckNXhapU/NMhDSWLs1B24A8sO1xrN4NECkcAC9ASkiIJc6k5TRiUDPhnyMMdhKc+Zx19l6SgyeW76BEONY9exVQMzKExGKwwPsCzza7KGSSWRWEQhyEaDXp6ZHEr416ygbiKYOd7TEWvvcQIeusHYMJGhTwF9y7sGnSwaWyFAiyoxzqW0PM/RjghPxF2pWReAowTEXnDh0xgcLs8l2YQmOrj3N7ByiqEoH0cARs4u78WgAVkoEDIDoOi3AkcLOHU60RIg5wC4ZuTC7FaHKQm8Hq1fQuSOBvX/sodmNJSB5geaF5CPIkUeecdMxieoRO5jz9bheL6/tXjrwCyX/UYBUcjCaWHljx1xiX6z9xEjkYAzbGVnB8pvLmyXm9ep+W8CmsSHQQY77Zx1zboxAV0w7ybMhQmfqdmmw3nEp1I0Z+FGO6M8LZdoyZnuzzBdjISicKRnpxzI9fPb+0oYXsNdyi+d3h9bm9MWYHFtPeIZfLwzmFDKy1ai3p+PDls1Llz4yyFpferxjnyjJDSEy9CaCx5m2cJPerq6Xm34eTrZt3PqxYO1XOwDYZrFlH1fWnpU38Y9HRze3lj0vOujZcXKuuXm3jP+s3KbZVra7y2EAAAAAASUVORK5CYII=" alt="Poetry">
</a>
<a href="https://github.com/astral-sh/ruff">
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="ruff">
</a>
<a href="https://github.com/pre-commit/pre-commit">
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" alt="pre-commit">
</a>
</p>
<p align="center">
<a href="https://pypi.org/project/spl-core/">
<img src="https://img.shields.io/pypi/v/spl-core.svg?logo=python&logoColor=fff&style=flat-square" alt="PyPI Version">
</a>
<img src="https://img.shields.io/pypi/pyversions/spl-core.svg?style=flat-square&logo=python&amp;logoColor=fff" alt="Supported Python versions">
<img src="https://img.shields.io/pypi/l/spl-core.svg?style=flat-square" alt="License">
</p>

- [![selftests](https://github.com/avengineers/spl/actions/workflows/test.yml/badge.svg)](https://github.com/avengineers/spl/actions/workflows/test.yml)
_SPL Core_ is our CMake module to support multiple projects as variants of one SPL repository.

## Installation of Dependencies

Expand All @@ -21,12 +47,12 @@ _SPL Core_ is our CMake module to support multiple projects as variants of one S
.\build.ps1
```

## Project Creator
## Initialize a new SPL Project

With the integrated project creator you can create a new SPL workspace, e.g.:
To initialize a new SPL project, one can use the `init` command of the `please.ps1` script.

```powershell
pipenv run python src/project_creator/creator.py workspace --name MyProject --variant MyVariant --out_dir C:\dev
.\please.ps1 init --project-dir C:\tmp\MyProject
```

Note: one can use the `--variant` argument several times to create a project with multiple variants.
See more information [here](https://spl-core.readthedocs.io/en/latest/getting_started/generate_example_project.html).
36 changes: 25 additions & 11 deletions docs/getting_started/generate_example_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,51 @@
Generate SPL Example Project
============================

Run Project creator
-------------------
Download SPL Core
-----------------

Clone the SPL Core repository:
You can either install the SPL Core from the Python Package Index (PyPI)

.. code-block:: powershell
git clone https://github.com/avengineers/spl-core
pip install spl-core
Install its dependencies:
or clone the repository from GitHub and install its dependencies:

.. code-block:: powershell
git clone https://github.com/avengineers/spl-core
cd spl-core
.\build.ps1 -install
SPL Core has a command-line interface called ``please``.

.. note::
If you have cloned the SPL Core repository you find the ``please`` script in the ``.venv/Scripts`` directory.

Make sure the installation was successful by running the following command:

.. code-block:: powershell
please --help
Initialize a new SPL Project
----------------------------

Activate the python virtual environment and use the project creator to generate the example project:
Generate the example project:

.. code-block:: powershell
.\please.ps1 init --project-dir C:\tmp\MyProject
please init --project-dir C:\tmp\MyProject
This will create a new SPL project in the directory ``C:\tmp\MyProject``.

Before you can build the project, you need to install the dependencies:
Before you can build the project, you need to install its dependencies.
Change to the project directory and run the following command:

.. code-block:: powershell
cd C:\tmp\MyProject
.\build.ps1 -install
Now you can build the project:
Expand Down Expand Up @@ -152,7 +166,7 @@ The tools are installed in the user directory under ``scoop``.

..
C:/Users/my_user/scoop/apps
C:/Users/<username>/scoop/apps

.. note::

Expand Down
15 changes: 15 additions & 0 deletions src/spl_core/kickstart/templates/project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This is a simple generated SPL project to get you started.

Install project dependencies:

```powershell
.\build.ps1 -install
```

Build:

```powershell
.\build.ps1 -build
```

See more information [here](https://spl-core.readthedocs.io/en/latest/getting_started/generate_example_project.html).

0 comments on commit c19e220

Please sign in to comment.