Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 124-fix-requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm committed Jul 17, 2024
2 parents 03d598a + 950324c commit ae985b1
Show file tree
Hide file tree
Showing 15 changed files with 1,439 additions and 2,040 deletions.
17 changes: 17 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BasedOnStyle: LLVM

BreakBeforeBraces: Allman
AlignTrailingComments: true
IndentWidth: 4
UseTab: Never
AlignAfterOpenBracket: true
# Force pointers to the type for C++.
DerivePointerAlignment: false
PointerAlignment: Left
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
NamespaceIndentation: None
ColumnLimit: 0
ReflowComments: true
SpacesInParentheses: true

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
pip3 install -I -r requirements.txt
-
name: Compile
run: |
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
python -m venv --system-site-packages .venv
source .venv/bin/activate
pip3 install -r requirements.txt
pip3 install -I -r requirements.txt
pip3 install dist/*.whl
tree .venv
- name: Build Antora Site
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.21.0)

project(
feelpp-project
VERSION 3.0.1 )
VERSION 3.2.0 )

set(EXTRA_VERSION "")
set(PROJECT_SHORTNAME "fp")
Expand Down
3 changes: 2 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

= {feelpp} Template Project
Christophe Prud'homme <https://github.com/prudhomm[@prudhomm]>
v2:

image:https://zenodo.org/badge/DOI/10.5281/zenodo.12762669.svg[DOI, link=https://doi.org/10.5281/zenodo.12762669]
image:https://img.shields.io/github/v/release/feelpp/feelpp-project[GitHub Release]
image:https://github.com/feelpp/feelpp-project/workflows/CI/badge.svg[CI]

This repository provides a basic starting point for a {feelpp} application including:
Expand Down
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
# Feel++ Template Project
Author: Christophe Prud'homme ![GitHub](https://github.com/prudhomm)
Version: v2
Christophe Prud’homme &lt;[@prudhomm](https://github.com/prudhomm)>

![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12762669.svg)
![GitHub Release](https://img.shields.io/github/v/release/feelpp/feelpp-project)
![CI](https://github.com/feelpp/feelpp-project/workflows/CI/badge.svg)

This repository provides a basic starting point for a Feel++ application including:

- [x] Feel++ applications in C++ to use Feel++ and Feel++ toolboxes in `src`
- [x] Documentation using asciidoc and antora
- [x] Python Feel++ notebooks that can be downloaded from the documentation
- [x] Continuous integration including tests for the C++ applications
- [x] Docker image generation for the project
* [x] Feel++ applications in C++ to use Feel++ and Feel++ toolboxes in `src`
* [x] documentation using asciidoc and antora
* [x] python Feel++ notebooks that can be downloaded from the documentation
* [x] continuous integration including tests for the C++ applications
* [x] docker image generation for the project

The documentation for feelpp-project is available [here](https://feelpp.github.io/feelpp-project), and you can build on it for your project by enabling the [github pages](https://docs.github.com/en/pages) for your repository.
The documentation for feelpp-project is available at [here](https://feelpp.github.io/feelpp-project) and you can build on it for your project by enabling the [github pages](https://docs.github.com/en/pages) for your repository.

## Renaming the project

By default, the project is named `feelpp-project` if you cloned the repository `feelpp/feelpp-project`. However, if you used the previous repository as a template, then the project is renamed using the name of the repository using the script `rename.sh` at the initialization of the repository. If the name does not suit you, you can change it again using the script `rename.sh` and providing the new name as an argument.
By default the project is named `feelpp-project` if you cloned the repository `feelpp/feelpp-project`.
However if you used the previous repository as a template, then the project is renamed using the name of the repository using the script `rename.sh` at the initialization of the repository.
If the name does not suit you, you can change it again using the script `rename.sh` and providing the new name as argument.

> **Warning**: The script `rename.sh` will rename the project. However, some URLs might not be set properly if you rename the project yourself. You need to check the following files: `docs/site.yml` and `docs/package.json` and fix the URLs after the rename process is done.
**⚠️ WARNING**\
the script `rename.sh` will rename the project however some url might be set properly if you rename the project yourself. You need to check the following files: `docs/site.yml` and `docs/package.json` and fix the urls after the rename process is done.

## Updating the project version
## Updating the feelpp-project version

The version of the project is defined in the files `CMakeLists.txt`, `docs/antora.yml`, and `docs/package.json`. You need to update with the same version in all files.
The version of the project is defined in the files `CMakeLists.txt`, `docs/antora.yml` and `docs/package.json`.
You need to update with the same version in all files.

## Release process

- [x] Update the version in `CMakeLists.txt`
- [x] Update the version in `docs/antora.yml`
- [x] Commit the changes with the message "Release vx.y.z". At this point, the CI will generate the docker image and push it to Docker Hub.
* [x] update the version in CMakeLists.txt
* [x] update the version in docs/antora.yml
* [x] commit the changes with the message "Release vx.y.z". At this point the CI will generate the docker image and push it to docker hub
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/examples/fin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ First, we initialize the {feelpp} environment and set the working directory.

[%dynamic,python]
----
import feelpp
import feelpp.core as fppc
from feelpp_project import laplacian
import json
import os
d = os.getcwd()
print(f"directory={d}")
e = feelpp.Environment(['fin'], config=feelpp.localRepository("."))
e = fppc.Environment(['fin'], config=fppc.localRepository("."))
----

Next, we set the configuration file for the simulation and load the specifications from a JSON file.

[%dynamic,python]
----
feelpp.Environment.setConfigFile(f"{d}/src/cases/laplacian/fin/fin1/fin2d.cfg")
fppc.Environment.setConfigFile(f"{d}/src/cases/laplacian/fin/fin1/fin2d.cfg")
# Reading the JSON file
data = laplacian.loadSpecs(f"{d}/src/cases/laplacian/fin/fin2d.json")
print(data)
Expand Down
Loading

0 comments on commit ae985b1

Please sign in to comment.