Skip to content

Commit

Permalink
Enable barebones csharp docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 2, 2024
1 parent 17f52ae commit e5e05e4
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/c/p0001.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler

.. c:autodoc:: p0001.c
:clang: -std=c11 -DAMD_COMPILER=0

.. literalinclude:: ../../c/p0001.c
:language: C
:linenos:
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
'sphinx.ext.inheritance_diagram',
'sphinx.ext.mathjax',
'sphinx.ext.todo',
'hawkmoth',
# 'breathe',
# 'javasphinx',
# 'sphinx_autodoc_typehints',
# 'sphinx_pyreverse',
'sphinx_js',
# 'sphinx_csharp',
'sphinx_csharp.csharp',
]
if 'TERMUX_VERSION' not in os.environ:
extensions.append('hawkmoth')
extensions.append('sphinx_js')

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Expand Down
2 changes: 2 additions & 0 deletions docs/csharp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ Problems Solved

.. toctree::
:maxdepth: 1

csharp/p0001.rst
20 changes: 20 additions & 0 deletions docs/csharp/p0001.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
C Implementation of Problem 1
=============================

View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler/blob/master/c/p0001.c>`_

.. csharp:namespace:: Euler
.. csharp:class:: P0001
.. csharp:inherits:: Euler.IEuler
.. csharp:method:: Task<Int64> answer()
An alas for :meth:`p0001`

.. csharp:method:: Task<Int64> p0001()
.. literalinclude:: ../../csharp/Euler/p0001.cs
:language: csharp
:linenos:
4 changes: 4 additions & 0 deletions docs/javascript/p0001.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ JavaScript Implementation of Problem 1
View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler/blob/master/javascript/p0001.js>`_

.. js:autofunction:: p0001

.. literalinclude:: ../../javascript/p0001.js
:language: javascript
:linenos:
5 changes: 5 additions & 0 deletions docs/javascript/p0002.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ JavaScript Implementation of Problem 2
View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler/blob/master/javascript/p0002.js>`_

.. js:autofunction:: p0002

.. literalinclude:: ../../javascript/p0002.js
:language: javascript
:linenos:

5 changes: 5 additions & 0 deletions docs/python/p0001.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler
.. automodule:: python.p0001
:members:
:undoc-members:

.. literalinclude:: ../../python/p0001.py
:language: python
:linenos:

4 changes: 4 additions & 0 deletions docs/python/p0002.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler
.. automodule:: python.p0002
:members:
:undoc-members:

.. literalinclude:: ../../python/p0002.py
:language: python
:linenos:
4 changes: 4 additions & 0 deletions docs/python/p0003.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler
.. automodule:: python.p0003
:members:
:undoc-members:

.. literalinclude:: ../../python/p0003.py
:language: python
:linenos:
4 changes: 4 additions & 0 deletions docs/python/p0004.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler
.. automodule:: python.p0004
:members:
:undoc-members:

.. literalinclude:: ../../python/p0004.py
:language: python
:linenos:
4 changes: 4 additions & 0 deletions docs/python/p0005.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ View source code `here on GitHub! <https://github.com/LivInTheLookingGlass/Euler
.. automodule:: python.p0005
:members:
:undoc-members:

.. literalinclude:: ../../python/p0005.py
:language: python
:linenos:
3 changes: 2 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ sphinx>=3.1
sphinx-rtd-theme
sphinx-js
hawkmoth
clang==14
clang==14
sphinx-csharp

0 comments on commit e5e05e4

Please sign in to comment.