Skip to content

Commit

Permalink
Documentation / Release adjustments for shogun 1.0.0
Browse files Browse the repository at this point in the history
- add put-online target to makefile
- fix install documentation
- include new lua/java/ruby/csharp examples in doc
- rename dirs and symlinks to x -> x_static
  • Loading branch information
Soeren Sonnenburg committed Aug 28, 2011
1 parent 76ed357 commit 6898577
Show file tree
Hide file tree
Showing 33 changed files with 2,138 additions and 899 deletions.
2 changes: 1 addition & 1 deletion doc/Doxyfile
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = SHOGUN
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = v0.10.0
PROJECT_NUMBER = v1.0.0

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile_cn
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = SHOGUN
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = v0.9.0
PROJECT_NUMBER = v1.0.0

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down
19 changes: 19 additions & 0 deletions doc/Makefile
Expand Up @@ -6,9 +6,14 @@ UNDOCUMENTED_EXAMPLE_DIRS = $(shell find ../examples/undocumented -type d | \
grep -v svn)
DOCUMENTED_EXAMPLE_DIRS = $(patsubst ../examples/undocumented%,../examples/documented%,\
$(UNDOCUMENTED_EXAMPLE_DIRS))
MAINVERSION := $(shell awk '/Release/{print $$5;exit}' ../src/NEWS)


doc: examples pages/Configure.generated
sed -i "s/PROJECT_NUMBER = .*/PROJECT_NUMBER = v$(MAINVERSION)/" Doxyfile
sed -i "s/PROJECT_NUMBER = .*/PROJECT_NUMBER = v$(MAINVERSION)/" Doxyfile_cn
doxygen Doxyfile
doxygen Doxyfile_cn

pages/Configure.generated: ../src/configure
../src/configure --help 2>&1 >$@
Expand All @@ -27,3 +32,17 @@ distclean: clean
clean:
rm -rf html html_cn
rm -f pages/Configure.generated

put-online: doc
test -n "$(MAINVERSION)"
ssh km rm -rf "/var/www/shogun-toolbox.org/doc/en/$(MAINVERSION)"
ssh km mkdir "/var/www/shogun-toolbox.org/doc/en/$(MAINVERSION)"
cd html && tar --exclude='*.map' --exclude='*.md5' -cjf - . | ssh km tar -C /var/www/shogun-toolbox.org/doc/en/$(MAINVERSION) -xjvf -
ssh km find /var/www/shogun-toolbox.org/doc/en/$(MAINVERSION) -type f -exec chmod 644 \{\} "\;"
ssh km find /var/www/shogun-toolbox.org/doc/en/$(MAINVERSION) -type d -exec chmod 755 \{\} "\;"
#
ssh km rm -rf "/var/www/shogun-toolbox.org/doc/cn/$(MAINVERSION)"
ssh km mkdir "/var/www/shogun-toolbox.org/doc/cn/$(MAINVERSION)"
cd html_cn && tar --exclude='*.map' --exclude='*.md5' -cjf - . | ssh km tar -C /var/www/shogun-toolbox.org/doc/cn/$(MAINVERSION) -xjvf -
ssh km find /var/www/shogun-toolbox.org/doc/cn/$(MAINVERSION) -type f -exec chmod 644 \{\} "\;"
ssh km find /var/www/shogun-toolbox.org/doc/cn/$(MAINVERSION) -type d -exec chmod 755 \{\} "\;"
50 changes: 44 additions & 6 deletions doc/insert_examples.py
Expand Up @@ -43,15 +43,15 @@
'''
),

'python': ('Static Python', 'ExamplesStaticPython.mainpage',
'python_static': ('Static Python', 'ExamplesStaticPython.mainpage',
'''\nTo run the examples issue
\\verbatim
python name_of_example.py
\\endverbatim
'''
),

'octave': ('Static Matlab(tm) and Octave', 'ExamplesStaticOctave.mainpage',
'octave_static': ('Static Matlab(tm) and Octave', 'ExamplesStaticOctave.mainpage',
'''\nTo run the examples issue
\\verbatim
octave name_of_example.m
Expand Down Expand Up @@ -80,7 +80,7 @@
before starting matlab.
'''),

'r' : ('Static R', 'ExamplesStaticR.mainpage',
'r_static' : ('Static R', 'ExamplesStaticR.mainpage',
'''\nTo run the examples issue
\\verbatim
R -f name_of_example.R
Expand Down Expand Up @@ -114,15 +114,50 @@
\\endverbatim
'''),

'cmdline' :('Static Command Line', 'ExamplesStaticCmdline.mainpage',
'cmdline_static' :('Static Command Line', 'ExamplesStaticCmdline.mainpage',
'''\nTo run the examples issue
\\verbatim
shogun name_of_example.sg
\\endverbatim
'''
)}
),

'lua_modular' : ('Lua Modular', 'ExamplesModularLua.mainpage',
'''\nTo run the examples issue
\\verbatim
lua name_of_example.lua
\\endverbatim
'''
),

valid_endings=['.py', '.m', '.R', '.sg', '.cpp']
'ruby_modular' : ('Ruby Modular', 'ExamplesModularRuby.mainpage',
'''\nTo run the examples issue
\\verbatim
ruby name_of_example.rb
\\endverbatim
'''
),

'csharp_modular' : ('C# Modular', 'ExamplesModularCSharp.mainpage',
'''\nTo run the examples issue
\\verbatim
gmcs path/to/shogun/interfaces/csharp_modular/*.cs name_of_example.cs
LD_LIBRARY_PATH=path/to/libshogun:path/to/shogun/interfaces/csharp_modular mono name_of_example.exe
\\endverbatim
'''
),

'java_modular' : ('Java Modular', 'ExamplesModularJava.mainpage',
'''\nTo run the examples issue
\\verbatim
javac -jar path/to/modshogun.jar name_of_example.java
java -jar path/to/modshogun.jar name_of_example
\\endverbatim
'''
),
}

valid_endings=['.py', '.m', '.R', '.sg', '.cpp', '.lua', '.rb', '.cs', '.java']

import os
import os.path
Expand All @@ -140,6 +175,9 @@
header='/*! \page ' + d + '_examples Examples for ' + directories[d][0] + ' Interface\n\n'
header+='This page lists ready to run shogun examples for the ' + directories[d][0] + ' interface.\n\n'
for f in files:
if f.find('_') == -1:
continue

prefix=f[0:f.find('_')]
suffix=f[f.rfind('.'):]
#print prefix
Expand Down
8 changes: 4 additions & 4 deletions doc/insert_examples_cn.py
Expand Up @@ -45,15 +45,15 @@
'''
),

'python': ('Python静态接口', 'ExamplesStaticPython.mainpage',
'python_static': ('Python静态接口', 'ExamplesStaticPython.mainpage',
'''\n要运行这些例子只需要
\\verbatim
python name_of_example.py
\\endverbatim
'''
),

'octave': ('Matlab(tm)和Octave静态接口', 'ExamplesStaticOctave.mainpage',
'octave_static': ('Matlab(tm)和Octave静态接口', 'ExamplesStaticOctave.mainpage',
'''\n要运行这些例子只需要
\\verbatim
octave name_of_example.m
Expand Down Expand Up @@ -81,7 +81,7 @@
'''),

'r' : ('R静态接口', 'ExamplesStaticR.mainpage',
'r_static' : ('R静态接口', 'ExamplesStaticR.mainpage',
'''\n要运行这些例子只需要
\\verbatim
R -f name_of_example.R
Expand Down Expand Up @@ -115,7 +115,7 @@
\\endverbatim
'''),

'cmdline' :('命令行静态接口', 'ExamplesStaticCmdline.mainpage',
'cmdline_static' :('命令行静态接口', 'ExamplesStaticCmdline.mainpage',
'''\n要运行这些例子只需要
\\verbatim
shogun name_of_example.sg
Expand Down
12 changes: 8 additions & 4 deletions doc/pages/Examples.mainpage
@@ -1,14 +1,18 @@
/*! \page examples Examples
\section static_examples Examples for Static Interfaces

\li \subpage python_examples
\li \subpage octave_examples
\li \subpage r_examples
\li \subpage cmdline_examples
\li \subpage python_static_examples
\li \subpage octave_static_examples
\li \subpage r_static_examples
\li \subpage cmdline_static_examples

\section modular_examples Examples for Modular Interfaces
\li \subpage libshogun_examples
\li \subpage python_modular_examples
\li \subpage octave_modular_examples
\li \subpage r_modular_examples
\li \subpage lua_modular_examples
\li \subpage ruby_modular_examples
\li \subpage csharp_modular_examples
\li \subpage java_modular_examples
*/
136 changes: 136 additions & 0 deletions doc/pages/ExamplesLibshogun.mainpage
Expand Up @@ -2,10 +2,20 @@

This page lists ready to run shogun examples for the C++ libshogun interface.

\li \subpage libshogun_base_examples
\li \subpage libshogun_basic_examples
\li \subpage libshogun_classifier_examples
\li \subpage libshogun_clustering_examples
\li \subpage libshogun_features_examples
\li \subpage libshogun_kernel_examples
\li \subpage libshogun_library_examples
\li \subpage libshogun_mathematics_examples
\li \subpage libshogun_modelselection_examples
\li \subpage libshogun_parameter_examples
\li \subpage libshogun_preproc_examples
\li \subpage libshogun_serialization_examples
\li \subpage libshogun_splitting_examples
\li \subpage libshogun_streaming_examples

To run the examples you will need to manually compile them via
\verbatim
Expand All @@ -26,6 +36,12 @@ respectively if the libraries are in nonstandard locations (such that they canno
LD_LIBRARY_PATH=path/to/libshogun ./name_of_example
\endverbatim

\section libshogun_base_examples Base


\li <b>../examples/documented/libshogun/base_parameter_map.cpp</b>
\verbinclude base_parameter_map.cpp

\section libshogun_basic_examples Basic


Expand All @@ -44,6 +60,33 @@ LD_LIBRARY_PATH=path/to/libshogun ./name_of_example
\li <b>../examples/documented/libshogun/classifier_mklmulticlass.cpp</b>
\verbinclude classifier_mklmulticlass.cpp

\section libshogun_clustering_examples Clustering


\li <b>../examples/documented/libshogun/clustering_kmeans.cpp</b>
\verbinclude clustering_kmeans.cpp

\section libshogun_features_examples Features


\li <b>../examples/documented/libshogun/features_copy_subset_simple_features.cpp</b>
\verbinclude features_copy_subset_simple_features.cpp

\li <b>../examples/documented/libshogun/features_copy_subset_sparse_features.cpp</b>
\verbinclude features_copy_subset_sparse_features.cpp

\li <b>../examples/documented/libshogun/features_copy_subset_string_features.cpp</b>
\verbinclude features_copy_subset_string_features.cpp

\li <b>../examples/documented/libshogun/features_subset_labels.cpp</b>
\verbinclude features_subset_labels.cpp

\li <b>../examples/documented/libshogun/features_subset_simple_features.cpp</b>
\verbinclude features_subset_simple_features.cpp

\li <b>../examples/documented/libshogun/features_subset_sparse_features.cpp</b>
\verbinclude features_subset_sparse_features.cpp

\section libshogun_kernel_examples Kernel


Expand All @@ -59,12 +102,105 @@ LD_LIBRARY_PATH=path/to/libshogun ./name_of_example
\li <b>../examples/documented/libshogun/library_dyn_int.cpp</b>
\verbinclude library_dyn_int.cpp

\li <b>../examples/documented/libshogun/library_fibonacci_heap.cpp</b>
\verbinclude library_fibonacci_heap.cpp

\li <b>../examples/documented/libshogun/library_gc_array.cpp</b>
\verbinclude library_gc_array.cpp

\li <b>../examples/documented/libshogun/library_hash.cpp</b>
\verbinclude library_hash.cpp

\li <b>../examples/documented/libshogun/library_hashset.cpp</b>
\verbinclude library_hashset.cpp

\li <b>../examples/documented/libshogun/library_indirect_object.cpp</b>
\verbinclude library_indirect_object.cpp

\section libshogun_mathematics_examples Mathematics


\li <b>../examples/documented/libshogun/mathematics_arpack.cpp</b>
\verbinclude mathematics_arpack.cpp

\li <b>../examples/documented/libshogun/mathematics_confidence_intervals.cpp</b>
\verbinclude mathematics_confidence_intervals.cpp

\li <b>../examples/documented/libshogun/mathematics_lapack.cpp</b>
\verbinclude mathematics_lapack.cpp

\section libshogun_modelselection_examples Modelselection


\li <b>../examples/documented/libshogun/modelselection_apply_parameter_tree.cpp</b>
\verbinclude modelselection_apply_parameter_tree.cpp

\li <b>../examples/documented/libshogun/modelselection_grid_search_kernel.cpp</b>
\verbinclude modelselection_grid_search_kernel.cpp

\li <b>../examples/documented/libshogun/modelselection_grid_search_linear.cpp</b>
\verbinclude modelselection_grid_search_linear.cpp

\li <b>../examples/documented/libshogun/modelselection_grid_search_string_kernel.cpp</b>
\verbinclude modelselection_grid_search_string_kernel.cpp

\li <b>../examples/documented/libshogun/modelselection_model_selection_parameters_test.cpp</b>
\verbinclude modelselection_model_selection_parameters_test.cpp

\li <b>../examples/documented/libshogun/modelselection_parameter_combination_test.cpp</b>
\verbinclude modelselection_parameter_combination_test.cpp

\li <b>../examples/documented/libshogun/modelselection_parameter_tree.cpp</b>
\verbinclude modelselection_parameter_tree.cpp

\section libshogun_parameter_examples Parameter


\li <b>../examples/documented/libshogun/parameter_iterate_float64.cpp</b>
\verbinclude parameter_iterate_float64.cpp

\li <b>../examples/documented/libshogun/parameter_iterate_sgobject.cpp</b>
\verbinclude parameter_iterate_sgobject.cpp

\li <b>../examples/documented/libshogun/parameter_modsel_parameters.cpp</b>
\verbinclude parameter_modsel_parameters.cpp

\li <b>../examples/documented/libshogun/parameter_set_from_parameters.cpp</b>
\verbinclude parameter_set_from_parameters.cpp

\section libshogun_preproc_examples Preproc


\li <b>../examples/documented/libshogun/preproc_randomfouriergauss.cpp</b>
\verbinclude preproc_randomfouriergauss.cpp

\section libshogun_serialization_examples Serialization


\li <b>../examples/documented/libshogun/serialization_vector_matrix.cpp</b>
\verbinclude serialization_vector_matrix.cpp

\section libshogun_splitting_examples Splitting


\li <b>../examples/documented/libshogun/splitting_stratified_crossvalidation.cpp</b>
\verbinclude splitting_stratified_crossvalidation.cpp

\section libshogun_streaming_examples Streaming


\li <b>../examples/documented/libshogun/streaming_from_simple.cpp</b>
\verbinclude streaming_from_simple.cpp

\li <b>../examples/documented/libshogun/streaming_onlinesvmsgd.cpp</b>
\verbinclude streaming_onlinesvmsgd.cpp

\li <b>../examples/documented/libshogun/streaming_stringfeatures.cpp</b>
\verbinclude streaming_stringfeatures.cpp

\li <b>../examples/documented/libshogun/streaming_vowpalwabbit.cpp</b>
\verbinclude streaming_vowpalwabbit.cpp

\li <b>../examples/documented/libshogun/streaming_vwfeatures.cpp</b>
\verbinclude streaming_vwfeatures.cpp
*/

0 comments on commit 6898577

Please sign in to comment.