Skip to content

Commit bc0c0fc

Browse files
committed
first commit
0 parents  commit bc0c0fc

23 files changed

+1743
-0
lines changed

.cruft.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"template": "https://github.com/monarch-initiative/monarch-project-template.git",
3+
"commit": "8d5c84f22159bf7181ba86dabc2eea7e93551413",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "llm-change-agent",
8+
"github_org_name": "hrshdhgd",
9+
"__project_slug": "llm_change_agent",
10+
"project_description": "Ontobot change agent assistant that uses LLMs to generate change language.commands.",
11+
"min_python_version": "3.9",
12+
"file_name": "main",
13+
"greeting_recipient": "World",
14+
"full_name": "Harshad Hegde",
15+
"email": "hhegde@lbl.gov",
16+
"__author": "Harshad Hegde <hhegde@lbl.gov>",
17+
"license": "MIT",
18+
"github_token_for_doc_deployment": "GH_TOKEN",
19+
"github_token_for_pypi_deployment": "PYPI_TOKEN",
20+
"_template": "https://github.com/monarch-initiative/monarch-project-template.git"
21+
}
22+
},
23+
"directory": null
24+
}

.github/workflows/deploy-docs.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Auto-deployment of Documentation
2+
on:
3+
push:
4+
branches: [ main ]
5+
jobs:
6+
build-docs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3.0.2
11+
with:
12+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
13+
14+
- name: Set up Python 3.
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: 3.9
18+
19+
- name: Install Poetry.
20+
uses: snok/install-poetry@v1.3.1
21+
22+
- name: Install dependencies.
23+
run: |
24+
poetry install --with docs
25+
26+
- name: Build documentation.
27+
run: |
28+
echo ${{ secrets.GH_TOKEN }} >> src/llm_change_agent/token.txt
29+
mkdir gh-pages
30+
touch gh-pages/.nojekyll
31+
cd docs/
32+
poetry run sphinx-apidoc -o . ../src/llm_change_agent/ --ext-autodoc -f
33+
poetry run sphinx-build -b html . _build
34+
cp -r _build/* ../gh-pages/
35+
36+
- name: Deploy documentation.
37+
if: ${{ github.event_name == 'push' }}
38+
uses: JamesIves/github-pages-deploy-action@v4.4.1
39+
with:
40+
branch: gh-pages
41+
force: true
42+
folder: gh-pages
43+
token: ${{ secrets.GH_TOKEN }}

.github/workflows/pypi-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish Python Package
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [created]
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to PyPI
11+
runs-on: ubuntu-latest
12+
# needs: [test]
13+
environment: release
14+
permissions:
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.9
23+
cache: pip
24+
cache-dependency-path: '**/pyproject.toml'
25+
26+
- name: Install Poetry
27+
run: pip install poetry poetry-dynamic-versioning
28+
29+
- name: Install dependencies
30+
run: poetry install --no-interaction
31+
32+
- name: Build source and wheel archives
33+
run: poetry build
34+
35+
- name: Publish
36+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/qc.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: llm-change-agent QC
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ "3.8", "3.11" ]
15+
16+
steps:
17+
- uses: actions/checkout@v3.0.2
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install Poetry
25+
uses: snok/install-poetry@v1.3.1
26+
- name: Install dependencies
27+
run: poetry install --no-interaction
28+
29+
- name: Check common spelling errors
30+
run: poetry run tox -e codespell
31+
32+
- name: Check code quality with flake8
33+
run: poetry run tox -e lint
34+
35+
- name: Test with pytest and generate coverage file
36+
run: poetry run tox -e py

.gitignore

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/

.pre-commit-config.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: end-of-file-fixer
8+
- id: check-yaml
9+
- id: check-toml
10+
- id: trailing-whitespace
11+
- repo: https://github.com/psf/black
12+
rev: 23.7.0
13+
hooks:
14+
- id: black
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.0.278
17+
hooks:
18+
- id: ruff
19+
args: [--fix, --exit-non-zero-on-fix]
20+
- repo: https://github.com/codespell-project/codespell
21+
rev: v2.2.4
22+
hooks:
23+
- id: codespell
24+
additional_dependencies:
25+
- tomli

CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contribution Guidelines
2+
3+
When contributing to this repository, please first discuss the changes you wish to make via an issue, email, or any other method, with the owners of this repository before issuing a pull request.
4+
5+
## How to contribute
6+
7+
### Reporting bugs or making feature requests
8+
9+
To report a bug or suggest a new feature, please go to the [hrshdhgd/llm-change-agent issue tracker](https://github.com/hrshdhgd/llm-change-agent/issues), as we are
10+
consolidating issues there.
11+
12+
Please supply enough details to the developers to enable them to verify and troubleshoot your issue:
13+
14+
* Provide a clear and descriptive title as well as a concise summary of the issue to identify the problem.
15+
* Describe the exact steps which reproduce the problem in as many details as possible.
16+
* Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
17+
* Explain which behavior you expected to see instead and why.
18+
* Provide screenshots of the expected or actual behaviour where applicable.
19+
20+
21+
### The development lifecycle
22+
23+
1. Create a bug fix or feature development branch, based off the `main` branch of the upstream repo, and not your fork. Name the branch appropriately, briefly summarizing the bug fix or feature request. If none come to mind, you can include the issue number in the branch name. Some examples of branch names are, `bugfix/breaking-pipfile-error` or `feature/add-click-cli-layer`, or `bugfix/issue-414`
24+
2. Make sure your development branch has all the latest commits from the `main` branch.
25+
3. After completing work and testing locally, push the code to the appropriate branch on your fork.
26+
4. Create a pull request from the bug/feature branch of your fork to the `main` branch of the upstream repository.
27+
28+
Note: All the development must be done on a branch on your fork.
29+
30+
ALSO NOTE: github.com lets you create a pull request from the main branch, automating the steps above.
31+
32+
> A code review (which happens with both the contributor and the reviewer present) is required for contributing.
33+
34+
### How to write a great issue
35+
36+
Please review GitHub's overview article,
37+
["Tracking Your Work with Issues"][about-issues].
38+
39+
<a id="great-pulls"></a>
40+
41+
### How to create a great pull/merge request
42+
43+
Please review GitHub's article, ["About Pull Requests"][about-pulls],
44+
and make your changes on a [new branch][about-branches].
45+
46+
[about-branches]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches
47+
[about-issues]: https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues
48+
[about-pulls]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
49+
[issues]: https://github.com/hrshdhgd/llm-change-agent/issues/
50+
[pulls]: https://github.com/hrshdhgd/llm-change-agent/pulls/
51+
52+
We recommend also reading [GitHub Pull Requests: 10 Tips to Know](https://blog.mergify.com/github-pull-requests-10-tips-to-know/)

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
The MIT License (MIT)
3+
4+
Copyright (c) 2024 Monarch Initiative
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# llm-change-agent
2+
3+
Ontobot change agent assistant that uses LLMs to generate change language.commands.
4+
5+
# Acknowledgements
6+
7+
This [cookiecutter](https://cookiecutter.readthedocs.io/en/stable/README.html) project was developed from the [monarch-project-template](https://github.com/monarch-initiative/monarch-project-template) template and will be kept up-to-date using [cruft](https://cruft.github.io/cruft/).

0 commit comments

Comments
 (0)