Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
CLI + Packaging (#6)
Browse files Browse the repository at this point in the history
- integrate `pyscaffold` structure as backbone for project
- enable `lm-api` as CLI command to use from anywhere
- default to `openai` and `text-davinci-003` provider
- clean up docs

Signed-off-by: peter szemraj <[email protected]>
Signed-off-by: Peter <[email protected]>
  • Loading branch information
pszemraj authored Jan 14, 2023
1 parent 5a1ae98 commit 57a036b
Show file tree
Hide file tree
Showing 19 changed files with 967 additions and 75 deletions.
28 changes: 28 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = lm_api
# omit = bad_file.py

[paths]
source =
src/
*/site-packages/

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
60 changes: 59 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,62 @@
# python sys files
*.pyc
*.pyo
__pycache__/
__pycache__/

# END CUSTOM IGNORE

# Temporary and binary files
*~
*.py[cod]
*.so
*.cfg
!.isort.cfg
!setup.cfg
*.orig
*.log

*.pot
__pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*
.DS_Store

# Project files
.ropeproject
.project
.pydevproject
.settings
.idea
.vscode
tags

# Package files
*.egg
*.eggs/
.installed.cfg
*.egg-info

# Unittest and coverage
htmlcov/*
.coverage
.coverage.*
.tox
junit*.xml
coverage.xml
.pytest_cache/

# Build and docs folder/files
build/*
dist/*
sdist/*
docs/api/*
docs/_rst/*
docs/_build/*
cover/*
MANIFEST

# Per-project virtualenvs
.venv*/
.conda*/
.python-version
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

python:
version: 3.8
install:
- requirements: docs/requirements.txt
- {path: ., method: pip}
4 changes: 4 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contributors

* peter szemraj | [github](https://github.com/pszemraj), [profile page](peterszemraj.ch)
* daniel paleka | [github](https://github.com/dpaleka)
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.0.3](https://github.com/pszemraj/lm-api/compare/v0.0.2...v0.0.3)

> 25 August 2022
- Bug fixes on output_dir and model_id for openai [`#3`](https://github.com/pszemraj/lm-api/pull/3)
- Fix choosing an openai model; didn't change anything for Goose, probably still needs fixes [`d5bb05c`](https://github.com/pszemraj/lm-api/commit/d5bb05cf2aedd495afa63b599f8500e8d5734106)
- Fix making output_dir if it doesn't exist [`51836e0`](https://github.com/pszemraj/lm-api/commit/51836e0e0c54c6dfdffb415fffab11ccc1d6a9f2)

#### [v0.0.2](https://github.com/pszemraj/lm-api/compare/v0.0.1...v0.0.2)

> 15 August 2022
- Support txt [`#2`](https://github.com/pszemraj/lm-api/pull/2)
- improve output formatting and writing [`3071611`](https://github.com/pszemraj/lm-api/commit/3071611c677e57690b2d01c758f6e2490e998076)
- :zap: support text files [`625d2a1`](https://github.com/pszemraj/lm-api/commit/625d2a165720f1974d2bfe18449722a934e6e855)
- :zap: print output loc [`ad99e71`](https://github.com/pszemraj/lm-api/commit/ad99e7160e7f45a5c27b522e965595860f45517e)

#### v0.0.1

> 16 June 2022
- Create LICENSE [`#1`](https://github.com/pszemraj/lm-api/pull/1)
- :tada: [`88c509e`](https://github.com/pszemraj/lm-api/commit/88c509e010cfa1462a38ccde6503f4a9d4b9e092)
- remove old output files [`cc75095`](https://github.com/pszemraj/lm-api/commit/cc750954c5569fa45e697d10ef31af8b1cbba521)
- consolidate logs [`01f91ff`](https://github.com/pszemraj/lm-api/commit/01f91ffb5fec09261b5b52a77f0e15c261675f06)
Loading

0 comments on commit 57a036b

Please sign in to comment.