Changeset 36
- Timestamp:
- 04/01/11 16:27:14 (13 years ago)
- Location:
- trunk/adm
- Files:
-
- 23 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/adm/guides/coding_rules.rst
r2 r36 13 13 .. emphase good and bad examples 14 14 .. 15 .. ne pas utiliser de mot clé : ex test en shell, image en matlab 16 .. 15 17 .. EVOLUTIONS 16 18 .. ========== 19 .. 20 .. $URL$ 21 .. 22 .. - fplod 20110308T100953Z aedon.locean-ipsl.upmc.fr (Darwin) 23 .. 24 .. * small improvements. add ref to runtestdemo. 25 .. 26 .. - fplod 20110303T160756Z aedon.locean-ipsl.upmc.fr (Darwin) 27 .. 28 .. * add octave/matlab section 17 29 .. 18 30 .. - fplod 20101125T075803Z aedon.locean-ipsl.upmc.fr (Darwin) … … 35 47 36 48 IDL scripts : :file:`.pro` 49 50 Octave/Matlab scripts : :file:`.m` 51 37 52 38 53 Files contents … … 41 56 No multiple statement 42 57 43 example::58 bad:: 44 59 45 60 a=1;b=2 46 61 47 ::62 good:: 48 63 49 64 a=1 … … 52 67 No comment after a statement 53 68 54 example:: 69 70 bad:: 55 71 56 72 yyyy=2010 # default yyyy value 57 73 58 ::74 good:: 59 75 60 76 # default yyyy value … … 64 80 ~~~~~~~~~~~~ 65 81 66 Lines length should be shorter than 79 c aracters.82 Lines length should be shorter than 79 characters. 67 83 68 84 Exception : long URL … … 106 122 ~~~~~~~~~~~ 107 123 108 Unabbr iviated keywords124 Unabbreviated keywords 109 125 ...................... 110 126 … … 145 161 justification : error handling, portability (unix, windows) 146 162 147 .. +todo idem for matlab with :command:`!`148 149 163 Test with NaN 150 164 ............. … … 170 184 171 185 +- espilon machin 186 187 188 Octave/Matlab scripts 189 ~~~~~~~~~~~~~~~~~~~~~ 190 191 Footers 192 ....... 193 194 Add demo and test 195 196 justification : robustness 197 198 see :ref:`rundemotest` 199 200 Functions 201 ......... 202 203 Use function calling form rather than procedure 204 205 justification : error handling 206 207 bad :: 208 209 load ginette 210 211 good :: 212 213 data=load('ginette') 214 215 Interaction with system 216 ....................... 217 218 No :command:`!` 219 220 justification : error handling, portability (unix, windows) 221 222 bad:: 223 224 !echo $ARCH 225 226 good:: 227 228 my_ev=getenv('ARCH') 229 230 Test with float 231 ............... 232 233 bad :: 234 235 myvar1 == myvar2 236 237 good+todo+:: 238 239 matlab +- espilon machin 240 octave assert(myvar1,myvar2) 241 242 IF block 243 ........ 244 245 always an :command:`else` if :command:`elseif` 246 247 switch block 248 ............ 249 250 always an :command:`otherwise` 251 -
trunk/adm/makefile
r34 r36 23 23 # ========== 24 24 # 25 # - fplod 20110401T091241Z aedon.locean-ipsl.upmc.fr (Darwin) 26 # 27 # * replace URLPUBLISH by URLPUBLISH_DEV 28 # * replace DIRWWW by DIRWWW_DEV 29 # * add URLPUBLISH_USER and DIRWWW_USER to handle website 30 # 25 31 # - fplod 20110203T101853Z aedon.locean-ipsl.upmc.fr (Darwin) 26 32 # … … 75 81 ./design/ 76 82 77 DIRWWW = \83 DIRWWW_DEV = \ 78 84 ../doc/ 79 85 80 URLPUBLISH = \ 86 DIRWWW_USER = \ 87 ./website/_build/ 88 89 URLPUBLISH_DEV = \ 81 90 http://www.locean-ipsl.upmc.fr/~fplod/$(PRODUCT)/$(SUBPRODUCT)/doc/ 91 92 URLPUBLISH_USER = \ 93 http://www.locean-ipsl.upmc.fr/~tropflux 82 94 83 95 LIST_INVENTORY = \ … … 99 111 LIST_SRCSH_TROFF = \ 100 112 $(shell echo "$(LIST_SRCSH)" | \ 101 sed -e "s+$(DIRSRC)+$(DIRWWW )/man/man1/+g" \113 sed -e "s+$(DIRSRC)+$(DIRWWW_DEV)/man/man1/+g" \ 102 114 -e "s+\.sh+.sh.1+g") 103 115 … … 151 163 man_troff_sphinx \ 152 164 html \ 153 html_sphinx \ 154 html_sphinx_one \ 165 html_dev \ 166 html_dev_sphinx \ 167 html_user \ 155 168 pdf \ 156 pdf_sphinx \ 169 pdf_dev \ 170 pdf_dev_sphinx \ 171 pdf_user \ 157 172 html_src_browser \ 158 173 html_src_browser_doxygen … … 176 191 177 192 before : 178 @mkdir -p $(DIRWWW )/man/man1/179 @mkdir -p $(DIRWWW )/html/sphinx/180 @mkdir -p $(DIRWWW )/pdf/sphinx/193 @mkdir -p $(DIRWWW_DEV)/man/man1/ 194 @mkdir -p $(DIRWWW_DEV)/html/sphinx/ 195 @mkdir -p $(DIRWWW_DEV)/pdf/sphinx/ 181 196 @mkdir -p $(DIRTMP)/sphinx_tmpdir/doctrees/ 182 197 @mkdir -p $(DIRTMP)/sphinx_tmpdir/manuals/ 183 198 @mkdir -p $(DIRTMP)/sphinx_tmpdir/guides/ 184 @mkdir -p $(DIRWWW )/src_browser/199 @mkdir -p $(DIRWWW_DEV)/src_browser/ 185 200 186 201 187 202 install_all : \ 188 install_html \ 189 install_pdf \ 203 install_html_dev \ 204 install_html_user \ 205 install_pdf_dev \ 206 install_pdf_user \ 190 207 install_browser 191 208 192 install_html : 193 @$(DIRADM)/install.sh -w $(DIRWWW)/html/ -u $(URLPUBLISH)/html/ 194 195 install_pdf : 196 @$(DIRADM)/install.sh -w $(DIRWWW)/pdf/ -u $(URLPUBLISH)/pdf/ 209 install_html_dev : 210 @$(DIRADM)/install.sh -w $(DIRWWW_DEV)/html/ -u $(URLPUBLISH_DEV)/html/ 211 212 install_html_user : 213 @$(DIRADM)/install.sh -w $(DIRWWW_USER)/ -u $(URLPUBLISH_USER)/ 214 215 install_pdf_dev : 216 @$(DIRADM)/install.sh -w $(DIRWWW_DEV)/pdf/ -u $(URLPUBLISH_DEV)/pdf/ 217 218 install_pdf_user : 219 @$(DIRADM)/install.sh -w $(DIRWWW_USER)/pdf/ -u $(URLPUBLISH_USER)/pdf/ 197 220 198 221 install_browser : 199 @$(DIRADM)/install.sh -w $(DIRWWW )/src_browser/doxygen/html/ -u $(URLPUBLISH)/src_browser/doxygen/html/222 @$(DIRADM)/install.sh -w $(DIRWWW_DEV)/src_browser/doxygen/html/ -u $(URLPUBLISH_DEV)/src_browser/doxygen/html/ 200 223 201 224 clean : \ 202 225 cleantmp 203 -@rm -fr $(DIRWWW)/man/ 204 -@rm -fr $(DIRWWW)/html/ 205 -@rm -fr $(DIRWWW)/pdf/ 206 -@rm -fr $(DIRWWW)/src_browser/ 226 -@rm -fr $(DIRWWW_DEV)/man/ 227 -@rm -fr $(DIRWWW_DEV)/html/ 228 -@rm -fr $(DIRWWW_DEV)/pdf/ 229 -@rm -fr $(DIRWWW_DEV)/src_browser/ 230 cd $(DIRADM)/website/; make clean 207 231 208 232 … … 219 243 220 244 htmllinkcheckb : 221 @$(DIRADM)/linkchecker.sh -d $(DIRWWW)/html/ 245 @$(DIRADM)/linkchecker.sh -d $(DIRWWW_DEV)/html/ 246 @$(DIRADM)/linkchecker.sh -d $(DIRWWW_USER) 222 247 223 248 htmllinkchecka : 224 @$(DIRADM)/linkchecker.sh -u $(URLPUBLISH) 249 @$(DIRADM)/linkchecker.sh -u $(URLPUBLISH_DEV) 250 @$(DIRADM)/linkchecker.sh -u $(URLPUBLISH_USER) 225 251 226 252 spellcheck : … … 252 278 -w $(DIRTMP)/sphinx_man_troff.log \ 253 279 $(DIRTMP)/sphinx_tmpdir/ \ 254 $(DIRWWW )/man/man1/280 $(DIRWWW_DEV)/man/man1/ 255 281 256 282 html : \ 257 html_sphinx \ 258 html_sphinx_one 259 260 html_sphinx : \ 283 html_user \ 284 html_dev 285 286 html_user : 287 cd $(DIRADM)/website/; make html 288 289 html_dev : \ 290 html_dev_sphinx \ 291 html_dev_sphinx_one 292 293 html_dev_sphinx : \ 261 294 $(DIRADM)/sphinx/conf.py \ 262 295 $(DIRADM)/index.rst \ … … 280 313 -w $(DIRTMP)/sphinx_html.log \ 281 314 $(DIRTMP)/sphinx_tmpdir/ \ 282 $(DIRWWW )/html/sphinx/283 284 html_ sphinx_one : \315 $(DIRWWW_DEV)/html/sphinx/ 316 317 html_dev_sphinx_one : \ 285 318 $(DIRADM)/sphinx/conf.py \ 286 319 $(DIRADM)/index.rst \ … … 303 336 -w $(DIRTMP)/sphinx_html_one.log \ 304 337 $(DIRTMP)/sphinx_tmpdir/ \ 305 $(DIRWWW )/html/sphinx_one/338 $(DIRWWW_DEV)/html/sphinx_one/ 306 339 307 340 pdf : \ 308 pdf_sphinx 309 310 pdf_sphinx : \ 341 pdf_user \ 342 pdf_dev 343 344 pdf_user : 345 cd $(DIRADM)/website/ 346 make pdf 347 348 pdf_dev : \ 349 pdf_dev_sphinx 350 351 pdf_dev_sphinx : \ 311 352 $(DIRADM)/sphinx/conf.py \ 312 353 $(DIRADM)/index.rst \ … … 327 368 @sphinx-build -b latex -c $(DIRADM)/sphinx \ 328 369 -d $(DIRTMP)/sphinx_tmpdir/doctrees \ 329 -w $(DIRTMP)/sphinx_pdf .log \370 -w $(DIRTMP)/sphinx_pdf_dev.log \ 330 371 $(DIRTMP)/sphinx_tmpdir/ \ 331 372 $(DIRTMP)/sphinx_tmpdir/latex_output 332 373 cd $(DIRTMP)/sphinx_tmpdir/latex_output/; make all-pdf 333 374 cp $(DIRTMP)/sphinx_tmpdir/latex_output/*.pdf \ 334 $(DIRWWW )/pdf/sphinx/375 $(DIRWWW_DEV)/pdf/sphinx/ 335 376 336 377 $(DIRTMP)/sphinx_tmpdir/index_manuals.rst : … … 416 457 417 458 html_src_browser_doxygen : \ 418 $(DIRWWW )/src_browser/doxygen/419 420 $(DIRWWW )/src_browser/doxygen/ : \459 $(DIRWWW_DEV)/src_browser/doxygen/ 460 461 $(DIRWWW_DEV)/src_browser/doxygen/ : \ 421 462 $(DIRADM)/Doxyfile_$(PRODUCT) \ 422 463 $(DIRADM)/m2cpp.pl \
Note: See TracChangeset
for help on using the changeset viewer.