Skip to content

Commit c5542e3

Browse files
authored
Merge pull request #201 from jpthiele/contrib-info
Add HowTo for contributions to Readme
2 parents 4c91013 + b5f42e6 commit c5542e3

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,80 @@ compatibility with older versions of deal.II. Older version of each
2626
contributed code may be attained by checking out the appropriate git commit
2727
of the code-gallery repository.
2828

29+
## Contributing to the gallery
30+
First: **We appreciate all contributions!**
31+
We have tried to set the bar to entry as low as possible.
32+
In essence, here is all you have to do:
33+
34+
1. Create a fork of this repository.
35+
For this, you need to have a GitHub account.
36+
Log in, then go to this repository again and click on the `Fork` symbol at the top right.
37+
2. This yields a copy of the code gallery repository
38+
to which you are allowed to write (a 'fork').
39+
At the right side of the page, you will find its HTTPS address.
40+
Check out a copy of it to your local hard drive via
41+
```
42+
git clone https://github.com/yourusername/code-gallery.git
43+
```
44+
where you replace `myusername` with your GitHub user name.
45+
3. Go into the `code-gallery` directory that was just generated.
46+
Within it, create a new directory for your project, named as you like.
47+
4. Create and switch to a branch in your local git copy:
48+
```
49+
git branch my-code-gallery-project
50+
git checkout my-code-gallery-project
51+
```
52+
5. Put your source files and everything else you need to build
53+
and run the code into this directory.
54+
In addition, the following files and subdirectories need to exist:
55+
* `Readme.md:` A [markdown formatted](https://daringfireball.net/projects/markdown/basics) file that provides basic overview over what this program does. You can use LaTeX-style formulas include in `$...$`, or offset via
56+
```
57+
@f{align*}{
58+
...
59+
@f}
60+
```
61+
to explain ideas of the program.
62+
* `CMakeLists.txt:` A CMake file that allows others to build your code.
63+
It must be possible to simply run it via
64+
```
65+
cmake -DDEAL_II_DIR=/path/to/dealii . ; make ; make run
66+
```
67+
* `doc/entry-name:` A simple text file that contains a simple, short name of the program.
68+
This will likely match the directory name,
69+
but can contain spaces and special characters (encoded in HTML, if necessary).
70+
This name will be used in the title line of the program's page,
71+
as well as in the [list of programs](https://dealii.org/developer/doxygen/deal.II/CodeGallery.html).
72+
* `doc/tooltip:` A one-line description of the program that is shown when hovering over a symbol in the connection graph.
73+
* `doc/build-on:` A textfile containing a list of the form
74+
```
75+
step-XX step-YY gallery-NNNN gallery-MMMM
76+
```
77+
where `XX` and `YY` are the numbers of existing tutorial programs that your application builds on,
78+
and `NNNN` and `MMMM` are the directory names of existing gallery applications.
79+
This information is used to build the
80+
[connection graph for tutorial and code gallery applications.](https://dealii.org/developer/doxygen/deal.II/Tutorial.html#graph)
81+
* `doc/author:` A text file containing the list of authors and their email adresses in the form
82+
```
83+
Jane Doe <jane@doe.org>,
84+
Helga Mustermann <helga@email.de>
85+
```
86+
* `doc/dependencies:` A file with a list of entries of the form
87+
```
88+
DEAL_II_WITH_CXX11 DEAL_II_WITH_TRILINOS
89+
```
90+
which specifies the requirements you need the underlying deal.II installation to meet for the program to run.
91+
The entries are CMake variables that are set during deal.II cofiguration
92+
and correspond to the items you find printed in the summary at the end of a `cmake` run when configuring deal.II
93+
6. Add your code gallery directory (here: `my-project-name`) to git
94+
and upload it to your fork of the repository:
95+
```
96+
git add my-project-name
97+
git push -u origin my-code-gallery-project
98+
```
99+
7. Go to your GitHub code-gallery page,
100+
which should be named `https://github.com/myusername/code-gallery`.
101+
Sign in if necessary.
102+
It should allow you to create a 'pull request' for your new code gallery project.
103+
Do so -- this will alert the deal.II maintainers to the fact that you want to contribute a new project,
104+
and sets up a short code for the review process.
105+

0 commit comments

Comments
 (0)