1
1
# Contribute
2
2
3
- This section aims to explain how we develop and organise,
4
- in order to help those that want to contribute to SimPhoNy.
3
+ This section aims to explain how we develop and organize, in order to help
4
+ those that want to contribute to SimPhoNy.
5
5
6
- ## Background
7
-
8
- ### Tools
6
+ ## Development tools
9
7
10
8
The following are some of the technologies and concepts we use regularly.
11
9
It might be useful to become familiar with them:
@@ -19,15 +17,16 @@ It might be useful to become familiar with them:
19
17
- [ Docker] ( https://www.docker.com/resources/what-container/ )
20
18
- Benchmarks
21
19
22
- ### Code Organisation
20
+ ## Code organization
23
21
24
- There are 3 main categories of repos :
22
+ There are 3 main categories of repositories :
25
23
26
24
- The [ _ SimPhoNy_ repository] ( https://github.com/simphony/simphony-osp/tree/v4.0.0 )
27
- contains the nucleus of SimPhoNy, the base on which the wrappers build.
28
- - Each _ wrapper_ will be in its own repository on GitHub or GitLab,
29
- mimicking
30
- [ wrapper_development] ( https://github.com/simphony/wrapper-development ) .
25
+ contains the core the SimPhoNy Open Simulation Platform, that the wrappers
26
+ depend on.
27
+ - Each _ wrapper_ is in its own repository on GitHub or GitLab, mimicking the
28
+ [ wrapper-development] ( https://github.com/simphony/wrapper-development/tree/v4.0.0 )
29
+ repository.
31
30
- [ _ docs_ ] ( https://github.com/simphony/docs/tree/v4.0.0 )
32
31
holds the source for this documentation.
33
32
@@ -39,14 +38,16 @@ There are also 4 types of branches:
39
38
- ` hotfix branch ` is where a critical software bug detected on the stable
40
39
release (more on this later) is being solved.
41
40
42
- ## Developing workflow
41
+ There may be ` master/main ` and ` dev ` branches for several major releases.
42
+
43
+ ## Development workflow
43
44
44
45
- Every new feature or bug is defined in an issue and labelled accordingly.
45
46
If there is something that is missing or needs improving,
46
- make an issue in the appropriate project .
47
+ make an issue in the appropriate repository .
47
48
- Generally, the issues are fixed by creating a new ` issue branch ` from the
48
49
` dev ` branch, committing to that branch and making a new Pull/Merge
49
- Request when done. An owner of the project should be tagged for review.
50
+ Request when done. A maintainer of the project should be tagged for review.
50
51
They will review and merge the PR if the fix is correct, deleting the
51
52
` issue branch ` afterwards. The changes should be clearly explained in the
52
53
issue/Pull Request.
@@ -63,18 +64,18 @@ There are also 4 types of branches:
63
64
`hotfix branch`.
64
65
```
65
66
66
- - Once the features for a release have been reached , ` dev ` will be merged to
67
+ - Once the features for a release have been developed , ` dev ` will be merged to
67
68
` master/main ` . Every new commit in the ` master/main ` branch generally
68
69
corresponds to a new release, which is labelled with a
69
70
[ git tag] ( https://git-scm.com/book/en/v2/Git-Basics-Tagging ) matching its
70
71
version number. An exception to this rule may apply, for example when
71
72
several critical hotfixes are applied in a row, as it would then be
72
- better to just to publish a single release afterwards. In regard to
73
- version numbering, we adhere to the
74
- [ _ Semantic versioning _ ] ( https://semver.org/ ) rules.
73
+ better to just publish a single release afterwards. In regard to version
74
+ numbering, we adhere to the [ _ Semantic Versioning _ ] ( https://semver.org/ )
75
+ rules.
75
76
76
77
In the next image it can be seen how the branches usually look during this
77
- workflow, and the different commits used to synchronise them:
78
+ workflow, and the different commits used to synchronize them:
78
79
79
80
<figure style =" display : table ; text-align :center ; margin-left : auto ; margin-right :auto " >
80
81
@@ -84,10 +85,10 @@ workflow, and the different commits used to synchronise them:
84
85
85
86
## Coding
86
87
87
- ### Documenting
88
+ ### Documentation
88
89
89
90
- All code must be properly documented with meaningful comments.
90
- - For readability, we now follow the
91
+ - For readability, we follow the
91
92
[ Google docstring format] ( https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings ) .
92
93
- If some behaviour is very complex, in-line comments can be used.
93
94
However, proper naming and clear operations are always preferred.
@@ -128,48 +129,39 @@ workflow, and the different commits used to synchronise them:
128
129
129
130
### Continuous Integration
130
131
131
- - We currently run the CI through Github Actions/GitLab CI.
132
+ - We currently run the CI through GitHub Actions/GitLab CI.
132
133
- Code style conventions are enforced through the use of Flake8, black, isort,
133
134
and various
134
135
[ pre-commit] ( https://pre-commit.com/ )
135
136
[ hooks] ( https://github.com/simphony/simphony-osp/blob/v4.0.0/.pre-commit-config.yaml ) .
136
137
- Tests are automatically run for all pull requests.
137
- - For the OSP-core code, benchmarks are run after every merge to ` dev ` .
138
+ - For the ` simphony-osp ` code, benchmarks are run after every merge to ` dev ` .
138
139
Benchmark results are available
139
140
[ here] ( https://simphony.github.io/simphony-osp/dev/bench/index.html ) . The CI
140
141
will report a failure when a benchmark is 50% slower than in the previous
141
142
run, in addition to automatically commenting on the commit.
142
143
143
- ### Naming conventions
144
-
145
- - Use ` cuds_object ` as the argument name of your methods (not ` entity ` ,
146
- ` cuds ` , ` cuds_instance ` ...).
147
- - The official spelling is ` OSP-core ` (as opposed to _ osp core_ , _ OSP-Core_
148
- or similar).
149
-
150
- ## Contribute to OSP-core
144
+ ## Contribute to SimPhoNy
151
145
152
146
If you are not a member of the
153
147
[ SimPhoNy organisation] ( https://github.com/simphony ) , rather than creating
154
148
a branch from ` dev ` , you will have to fork the repository and create the
155
149
Pull Request.
156
150
157
- ## Contribute to wrapper development
151
+ ## Contribute to the development of a wrapper
158
152
159
153
For a sample wrapper, visit the
160
- [ wrapper_development ] ( https://github.com/simphony/wrapper-development ) repo.
154
+ [ wrapper-development ] ( https://github.com/simphony/wrapper-development ) repo.
161
155
162
156
README files should include:
163
157
164
158
- Information regarding the purpose of the wrapper and the backend used.
165
- - A compatibility matrix with OSP-core.
166
159
- Installation instructions.
167
- - Folder structure.
168
160
- Any other necessary information for users and other developers.
169
161
170
162
## Contribute to the docs
171
163
172
164
If you have any suggestion for this documentation, whether it is something
173
165
that needs more explanation, is inaccurate or simply a note on anything
174
166
that could be improved, you can open an issue
175
- [ here] ( https://github.com/simphony/docs/issues ) , and we will look into it!.
167
+ [ here] ( https://github.com/simphony/docs/issues ) , and we will look into it!
0 commit comments