Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jday7879 committed Mar 15, 2024
1 parent b30fb3b commit 9798798
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
Empty file added docs/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Welcome to MkDocs

For full documentation visit [mkdocs.org](https://www.mkdocs.org).

## Commands

* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.

## Project layout

mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.

# Project Documentation

::: package.functions
34 changes: 34 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
site_name: My Docs

theme:
name: tech_docs_template
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.indexes

plugins:
- mkdocstrings:
handlers:
python:
options:
# All options can be found at: https://mkdocstrings.github.io/python/usage/#globallocal-options
docstring_style: numpy
show_signature_annotations: True
show_source: False
show_root_heading: True
merge_init_into_class: True
- material/search
- git-revision-date-localized
- mkdocs-jupyter:
include_source: True
include: ["*.ipynb"] # Default: ["*.py", "*.ipynb"]
ignore: ["*.py"]
remove_tag_config:
remove_input_tags:
- hide_code
remove_all_outputs_tags:
- hide_out

nav:
- test: index.md
52 changes: 52 additions & 0 deletions package/functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import numpy as np

def printing_own(text:str = 'empty'):
""" text
This is a function to print a string
Parameters
----------
text - string
A string to print
"""
print(text)

def create_array():
"""
function to create numpy array
"""
x = np.zeros((1,3))
return x

def testing_docstring():
"""Execute a command via subprocess, capturing stdout and stderr.
This function creates a subprocess with the provided command list, then
communicates with it to retrieve the stdout and stderr. After the
command execution, it checks the process's return code to determine success
or failure. A zero return code indicates success.
Parameters
----------
command
A list of command elements representing the system
command to be executed. For example, ['ls', '-l', '/home/user'].
Returns
-------
bool
True if the command execution is successful (return code 0),
otherwise False.
Raises
------
subprocess.TimeoutExpired
If the process does not complete within the default timeout.
"""
print('testing 2')

if __name__ == "__main__":
printing_own('testing')
x = create_array()
print(x)
testing_docstring()
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Setup script for creating package from code."""
from setuptools import setup

if __name__ == '__main__':
setup()

0 comments on commit 9798798

Please sign in to comment.