-
Notifications
You must be signed in to change notification settings - Fork 37
First draft for contribution guide #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Bringing v6 up to speed
Started working on problem defaults
An argument (slightly in favor) for camelCaseFirst quick definitions
AbstractEven if PEP8 suggests the use of snake_case for variable and function names, the alternative use of camelCase may be better from a practical point of view. This would not be the first time we break PEP8 guidelines (for instance, max line length to 120 in current settings), but there are other arguments. Uniform and simplified variable names
tend = 1.0
t_end = 1.0
Tend = 1.0using camelCase gives only one candidate
The main point here is that for the applications we are considering (with a lot of Reading effectiveness and current trendcamelCase is actually used in Python core libraries (for instance,
So yes, using camelCase would require a bit of time for people using snake_case to get use to, but not necessarily long. Furthermore, the use of PascalCase for class names is already quite natural in Python, so it won't be a huge gap to go to object methods and attributes written with camelCase. Furthermore, if used wisely (with eventual help of underscore), it could help reducing the length of a code, so it looks more appealing for a user that don't know already how it works. For instance : # instantiate controllers in snake_case
controller_mssdc_jac = controller_nonMPI(
num_procs=num_proc, controller_params=controller_params_jac, description=description_mssdc
)
# instantiate controllers in camelCase
controllerMSSDCJacobi = controllerNonMPI(
nProc=nProc, controllerParams=controllerParamsJacobi, description=descrMSSDC
)
# Note that removing underscore allows a more explicit naming for controllerMSSDCJacobi without too much more space ...From a short poll I did in the math section in TUHH, 5 persons out of 6 that answered where more in favor of camelCase than snake_case (the only person favoring snake_case beeing @brownbaerchen). I know this is a bit bias, and not very representative, but more detailed research indicate that camelCase is slowly becoming a serious alternative to snake_case, in particular with programming languages like TimeScript (next generation JavaScript) that massively use it (Python almost getting there with PascalCase for class names). Work will have to be done anywayCurrently, pySDC use a mix between snake_case and camelCase, with majority for snake_case. Going to snake_case would implies a lot of changes in all naming. However, this will have to be done already for man class names, and with the whole default parameter rework for v6. So this would be the perfect opportunity to refactor most of pySDC names (let the change be a full one 😄). And also, many IDEs and editors offer some very simple ways to change a given variable name now ... So what do you think @pancetta ? |
I really appreciate your contribution, thanks s lot. Before you write more markdown files, though: does that play along with the ReStructuredText files used so far? Esp. for the website? |
|
I’m totally fine with camelCase! |
That's an answer I don't have the courage to look for on a Sunday evening 😅 |
|
My 2 cents: I'm ok with having markdown files in the docs, as long as they're clearly targeted toward Github users/developers. My original thought was that I don't want to write documentation twice (website + Github), but in order to get things done, we could just have |
|
Do I see here some love-hate relationship with camelCase @brownbaerchen 😄 ? |
Well, the hate is directed towards camel case, but the love was meant for you ;) |
Then let's do this for the contribution guide : host it on github with markdown files, and put a full link in the README.rst such that it will be integrated as well in the documentation website. |
|
That makes sense. Since the contributing happens on GitHub, it should be prioritised for the corresponding documentation imo. I was really hoping you would find a long term solution for documentation of projects both on GitHub and on the website, though. :D |
Codecov ReportBase: 68.47% // Head: 68.50% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #248 +/- ##
==========================================
+ Coverage 68.47% 68.50% +0.02%
==========================================
Files 226 226
Lines 19510 19510
==========================================
+ Hits 13360 13365 +5
+ Misses 6150 6145 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@tlunet Can you please merge the changes from |
Created #250 for that and an associated milestone 😃 |
Update v6 with latest changes on master
|
I've messed up thing very bad (accidentally merged v6 into contrib through an other branch ...). I've restarted a new contrib-2 branch from start using cherry-picks, and opened a new PR #257. |

This is a first draft for a contribution guide (that can be see as a first proposal), with in particular :
Of course, some points in the contribution guide can be put to debate (in particular, for the naming convention)