@@ -25,9 +25,9 @@ A Minimal Hello World Class <Add>
2525
2626.. code-block :: python
2727
28- from challenges.challenge import Challenge
28+ from challenges import Challenge
2929
30- class Add (Challenge ):
30+ class AddChallenge (Challenge ):
3131 sample = '''
3232 5, 6
3333 '''
@@ -41,16 +41,16 @@ A Minimal Hello World Class <Add>
4141 The class to write lets you focus on the core algorithms of the challenge while keeping stuff like opening, reading and
4242writing of files out of the way. You inherit several methods to set up the model or to format your result for writing.
4343
44- While the class variable `sample ` just holds a minimal example of the input, the actual input is later injected by
44+ While the class attribute `sample ` just holds a minimal example of the input, the actual input is later injected by
4545the **Challenge Runner ** via the command line. In Bioinformatics this is often a large file of DNA.
4646
4747.. hint :: See a more verbose example of HelloWorld.
4848
49- * HelloWorld _
50- * HelloWorldTestCase _
49+ * HelloWorldChallenge _
50+ * HelloWorldTest _
5151
52- .. _ HelloWorld : https://github.com/elmar-hinz/Python.Challenges/blob/master/HelloWorld/HelloWorld .py
53- .. _ HelloWorldTestCase : https://github.com/elmar-hinz/Python.Challenges/blob/master/HelloWorld/HelloWorldTestCase .py
52+ .. _ HelloWorldChallenge : https://github.com/elmar-hinz/Python.Challenges/blob/master/HelloWorld/challenge .py
53+ .. _ HelloWorldTest : https://github.com/elmar-hinz/Python.Challenges/blob/master/HelloWorld/test .py
5454
5555
5656The Challenge Runner Supports the Following Features
@@ -71,9 +71,9 @@ The Layout of Your Directory Looks Like This
7171
7272 myChallenges/
7373 Challenge1/challenge.py
74- Challenge1/testcase .py
74+ Challenge1/test .py
7575 Challenge2/challenge.py
76- Challenge2/testcase .py
76+ Challenge2/test .py
7777 ... more challenges ...
7878
7979 The names `Challenge1 ` and `Challenge2 ` are just placeholders for the names you choose during scaffolding.
@@ -108,7 +108,7 @@ You now find the files:
108108
109109 myChallenges/
110110 Challenge3/challenge.py
111- Challenge3/testcase .py
111+ Challenge3/test .py
112112 Challenge3/__init__.py
113113
114114 Check it's working by running the unit test case.
@@ -193,7 +193,15 @@ There are two deliberate exceptions:
193193
194194 In contradiction to the style guide directories of the challenges are not all lowercase. Especially the
195195 first character must be uppercase. This is used to find and list the challenge directories between other modules.
196- The directory and the class name must use the same word, with the `.py ` extension for the file.
196+ If the name of your challenge is **ExampleProblem ** then this are the required names:
197+
198+ :Directory: ``ExampleProblem/ ``
199+ :Challenge file: ``ExampleProblem/challenge.py ``
200+ :Unittest file: ``ExampleProblem/test.py ``
201+ :Full qualified challenge class: ``ExampleProblem.challenge.ExampleProblemChallenge ``
202+ :Full qualified test class: ``ExampleProblem.test.ExampleProblemTest ``
203+
204+ This is automatially wired up during scaffolding.
197205
1982062. Inherited class attributes and methods don't have a leading underscore:
199207
@@ -203,14 +211,14 @@ There are two deliberate exceptions:
203211
204212.. tip ::
205213
206- On useful advantage of naming the directory just like your challenge class is, that you can use the path expansion
207- mechanism of the shell. Write the first characters of the class/ directory name and hit <TAB>. Now you can use the
214+ On useful advantage of naming the directory just like your challenge is, that you can use the path expansion
215+ mechanism of the shell. Write the first characters of the directory name and hit <TAB>. Now you can use the
208216 directory name as name of the challenge. A trailing slash is discarded. The following two inputs are equivalent.
209217
210218 .. code-block :: bash
211219
212- prompt> challenge -k HelloWorld
213- prompt> challenge -k HelloWorld /
220+ prompt> challenge -k ExampleProblem
221+ prompt> challenge -k ExampleProblem /
214222
215223 Installation
216224============
0 commit comments