Skip to content

Commit

Permalink
fix docstring format & pytest (#10)
Browse files Browse the repository at this point in the history
* fix docstring format & pytest

* trying different dir name

* change dir names

* fix dir names to match repo name for poetry

* fix test file name

* fix test file name

* fix github actions file name

* add pytest cov

* add pytest cov

* add dummy test

* update env file and add sphinx to .toml

* add myst_nb to poetry

* add autoapi to poetry

* just adding all poetry stuff from indv assignment
  • Loading branch information
Farhan-Faisal authored Jan 10, 2025
1 parent dd48a08 commit 185362c
Show file tree
Hide file tree
Showing 13 changed files with 3,273 additions and 427 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: poetry install

- name: Test with pytest
run: poetry run pytest tests/ --cov=fml --cov-report=xml
run: poetry run pytest tests/ --cov=fml_doc_gen --cov-report=xml

- name: Use Codecov to track coverage
uses: codecov/codecov-action@v5
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# fml_doc_generator
# fml_doc_gen

## Summary

`fml_doc_generator` is a Python package designed to simplify the process of writing docstrings for user-defined functions. It offers an automated way to generate docstring templates or fully detailed docstrings through integration with the OpenAI API. By streamlining documentation, it helps developers save time, improve code readability, and maintain consistent documentation standards across projects.
`fml_doc_gen` is a Python package designed to simplify the process of writing docstrings for user-defined functions. It offers an automated way to generate docstring templates or fully detailed docstrings through integration with the OpenAI API. By streamlining documentation, it helps developers save time, improve code readability, and maintain consistent documentation standards across projects.

## Functions Included

Expand All @@ -22,7 +22,7 @@

## Python Ecosystem

`fml_doc_generator` fits into the Python ecosystem as a specialized tool for automating function documentation. While other Python packages like [`sphinx`](https://www.sphinx-doc.org/) and [`pydoc`](https://docs.python.org/3/library/pydoc.html) exist for generating documentation from docstrings, there are no widely known packages that automatically generate docstrings themselves using AI. This makes `fml_doc_generator` unique in its approach by leveraging OpenAI's capabilities to produce high-quality docstrings with minimal effort from the developer.
`fml_doc_gen` fits into the Python ecosystem as a specialized tool for automating function documentation. While other Python packages like [`sphinx`](https://www.sphinx-doc.org/) and [`pydoc`](https://docs.python.org/3/library/pydoc.html) exist for generating documentation from docstrings, there are no widely known packages that automatically generate docstrings themselves using AI. This makes `fml_doc_gen` unique in its approach by leveraging OpenAI's capabilities to produce high-quality docstrings with minimal effort from the developer.

If you are aware of a similar tool, feel free to contribute to our documentation by suggesting it!

Expand All @@ -38,8 +38,8 @@ Interested in contributing? Check out the contributing guidelines. Please note t

## License

`fml_doc_generator` was created by Farhan Faisal, Lukman Lateef, and Michael Suriawan. It is licensed under the terms of the MIT license.
`fml_doc_gen` was created by Farhan Faisal, Lukman Lateef, and Michael Suriawan. It is licensed under the terms of the MIT license.

## Credits

`fml_doc_generator` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
`fml_doc_gen` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = fml
SPHINXPROJ = fml_doc_gen
SOURCEDIR = .
BUILDDIR = _build

Expand Down
16 changes: 8 additions & 8 deletions docs/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example usage\n",
"\n",
"To use `fml` in a project:"
],
"metadata": {}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import fml\n",
"import fml_doc_gen\n",
"\n",
"print(fml.__version__)"
],
"outputs": [],
"metadata": {}
"print(fml_doc_gen.__version__)"
]
}
],
"metadata": {
Expand All @@ -42,4 +42,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=fml
set SPHINXPROJ=fml_doc_gen

if "%1" == "" goto help

Expand Down
26 changes: 26 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'fml'
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- pip
- ipykernel
- nb_conda_kernels
- scipy
- matplotlib>=3.2.2
- scikit-learn
- requests>=2.24.0
- graphviz
- python-graphviz
- eli5
- jinja2
- nltk
- imbalanced-learn
- quarto=1.5.57
- sphinx
- sphinx-rtd-theme
- sphinx-autodoc-typehints
- pip:
- mglearn
- spacymoji
Loading

0 comments on commit 185362c

Please sign in to comment.