2019-06-05 17:29:17 +02:00
|
|
|
[![Build Status](https://travis-ci.org/TRIQS/app4triqs.svg?branch=unstable)](https://travis-ci.org/TRIQS/app4triqs)
|
|
|
|
|
2019-09-04 23:30:07 +02:00
|
|
|
# app4triqs - A skeleton for a TRIQS application
|
2018-03-28 10:59:05 +02:00
|
|
|
|
2019-09-04 23:30:07 +02:00
|
|
|
Initial Setup
|
|
|
|
-------------
|
2018-03-28 10:59:05 +02:00
|
|
|
|
2019-08-27 21:35:04 +02:00
|
|
|
To adapt this skeleton for a new TRIQS application, the following steps are necessary:
|
2018-03-28 10:59:05 +02:00
|
|
|
|
2019-09-05 21:08:10 +02:00
|
|
|
* Create a repository, e.g. https://github.com/username/appname
|
2018-03-28 10:59:05 +02:00
|
|
|
|
2019-09-05 21:08:10 +02:00
|
|
|
* Run the following commands in order after replacing **appname** accordingly
|
2019-08-27 21:35:04 +02:00
|
|
|
|
|
|
|
```bash
|
2019-09-05 21:08:10 +02:00
|
|
|
git clone https://github.com/triqs/app4triqs --branch unstable appname
|
|
|
|
cd appname
|
|
|
|
./share/squash_history.sh
|
|
|
|
./share/replace_and_rename.sh appname
|
|
|
|
git add -A && git commit -m "Adjust app4triqs skeleton for appname"
|
2019-08-27 21:35:04 +02:00
|
|
|
```
|
|
|
|
|
2019-09-05 21:08:10 +02:00
|
|
|
You can now add your github repository and push to it
|
2018-03-28 10:59:05 +02:00
|
|
|
|
|
|
|
```bash
|
2019-09-05 21:08:10 +02:00
|
|
|
git remote add origin https://github.com/username/appname
|
|
|
|
git remote update
|
2019-08-27 21:35:04 +02:00
|
|
|
git push origin unstable
|
2018-03-28 10:59:05 +02:00
|
|
|
```
|
|
|
|
|
2019-09-05 21:08:10 +02:00
|
|
|
If you prefer to use the [SSH interface](https://help.github.com/en/articles/connecting-to-github-with-ssh)
|
|
|
|
to the remote repository, replace the http link with e.g. `git@github.com:username/appname`.
|
2019-08-27 21:35:04 +02:00
|
|
|
|
2019-09-04 23:30:07 +02:00
|
|
|
### Merging app4triqs skeleton updates ###
|
2019-08-27 21:35:04 +02:00
|
|
|
|
2019-09-05 21:08:10 +02:00
|
|
|
You can merge future changes to the app4triqs skeleton into your project with the following commands
|
2019-08-27 21:35:04 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git remote update
|
2019-09-05 21:08:10 +02:00
|
|
|
git merge app4triqs_remote/unstable -m "Merge latest app4triqs skeleton changes"
|
2019-08-27 21:35:04 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
If you should encounter any conflicts resolve them and `git commit`.
|
2019-09-05 21:08:10 +02:00
|
|
|
Finally we repeat the replace and rename command from the initial setup.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
./share/replace_and_rename.sh appname
|
|
|
|
git commit --amend
|
|
|
|
```
|
2019-09-04 23:30:07 +02:00
|
|
|
|
|
|
|
Getting Started
|
|
|
|
---------------
|
|
|
|
|
|
|
|
After setting up your application as described above you should customize the following files and directories
|
|
|
|
according to your needs (replace app4triqs in the following by the name of your application)
|
|
|
|
|
2019-09-05 21:08:10 +02:00
|
|
|
* Adjust or remove the `README.md` and `doc/ChangeLog.md` file
|
2019-09-04 23:30:07 +02:00
|
|
|
* In the `c++/app4triqs` subdirectory adjust the example files `app4triqs.hpp` and `app4triqs.cpp` or add your own source files.
|
|
|
|
* In the `test/c++` subdirectory adjust the example test `basic.cpp` or add your own tests.
|
|
|
|
* In the `python/app4triqs` subdirectory add your Python source files.
|
|
|
|
Be sure to remove the `app4triqs_module_desc.py` file unless you want to generate a Python module from your C++ source code.
|
2019-09-05 21:08:10 +02:00
|
|
|
* In the `test/python` subdirectory adjust the example test `Basic.py` or add your own tests.
|
2019-09-24 15:51:32 +02:00
|
|
|
* Adjust any documentation examples given as `*.rst` files in the doc directory.
|
|
|
|
* Adjust the sphinx configuration in `doc/conf.py.in` as necessary.
|
2019-09-04 23:30:07 +02:00
|
|
|
* The build and install process is identical to the one outline [here](https://triqs.github.io/app4triqs/unstable/install.html).
|
|
|
|
|
|
|
|
### Optional ###
|
|
|
|
----------------
|
2019-09-05 21:08:10 +02:00
|
|
|
|
2019-09-04 23:30:07 +02:00
|
|
|
* If you want to wrap C++ classes and/or functions provided in the `c++/app4triqs/app4triqs.hpp` rerun the `c++2py` tool with
|
|
|
|
```bash
|
|
|
|
c++2py -r app4triqs_module_desc.py
|
|
|
|
```
|
|
|
|
* Add your email address to the bottom section of `Jenkinsfile` for Jenkins CI notification emails
|
|
|
|
```
|
|
|
|
End of build log:
|
|
|
|
\${BUILD_LOG,maxLines=60}
|
|
|
|
""",
|
|
|
|
to: 'user@domain.org',
|
|
|
|
```
|