osa_tool 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. osa_tool-0.1.0/LICENSE +30 -0
  2. osa_tool-0.1.0/PKG-INFO +314 -0
  3. osa_tool-0.1.0/README.md +244 -0
  4. osa_tool-0.1.0/osa_tool/__init__.py +0 -0
  5. osa_tool-0.1.0/osa_tool/analytics/__init__.py +0 -0
  6. osa_tool-0.1.0/osa_tool/analytics/metadata.py +273 -0
  7. osa_tool-0.1.0/osa_tool/arguments_parser.py +62 -0
  8. osa_tool-0.1.0/osa_tool/config/standart/settings/config.toml +41 -0
  9. osa_tool-0.1.0/osa_tool/config/standart/settings/prompts.toml +91 -0
  10. osa_tool-0.1.0/osa_tool/config/standart/templates/ITMO_template.toml +165 -0
  11. osa_tool-0.1.0/osa_tool/config/with_article/settings/config.toml +41 -0
  12. osa_tool-0.1.0/osa_tool/config/with_article/settings/prompts.toml +91 -0
  13. osa_tool-0.1.0/osa_tool/config/with_article/templates/ITMO_template.toml +29 -0
  14. osa_tool-0.1.0/osa_tool/github_agent/__init__.py +0 -0
  15. osa_tool-0.1.0/osa_tool/github_agent/github_agent.py +263 -0
  16. osa_tool-0.1.0/osa_tool/osatreesitter/__init__.py +0 -0
  17. osa_tool-0.1.0/osa_tool/osatreesitter/docgen.py +441 -0
  18. osa_tool-0.1.0/osa_tool/osatreesitter/models.py +400 -0
  19. osa_tool-0.1.0/osa_tool/osatreesitter/osa_treesitter.py +476 -0
  20. osa_tool-0.1.0/osa_tool/readmeai/LICENSE +21 -0
  21. osa_tool-0.1.0/osa_tool/readmeai/README.md +6 -0
  22. osa_tool-0.1.0/osa_tool/readmeai/__init__.py +0 -0
  23. osa_tool-0.1.0/osa_tool/readmeai/config/__init__.py +0 -0
  24. osa_tool-0.1.0/osa_tool/readmeai/config/constants.py +50 -0
  25. osa_tool-0.1.0/osa_tool/readmeai/config/settings/commands.toml +46 -0
  26. osa_tool-0.1.0/osa_tool/readmeai/config/settings/contributing_config.toml +28 -0
  27. osa_tool-0.1.0/osa_tool/readmeai/config/settings/docs_list.toml +29 -0
  28. osa_tool-0.1.0/osa_tool/readmeai/config/settings/ignore_list.toml +143 -0
  29. osa_tool-0.1.0/osa_tool/readmeai/config/settings/languages.toml +70 -0
  30. osa_tool-0.1.0/osa_tool/readmeai/config/settings/parsers.toml +184 -0
  31. osa_tool-0.1.0/osa_tool/readmeai/config/settings/quickstart.toml +471 -0
  32. osa_tool-0.1.0/osa_tool/readmeai/config/settings/quickstart_config.toml +55 -0
  33. osa_tool-0.1.0/osa_tool/readmeai/config/settings/tool_config.toml +666 -0
  34. osa_tool-0.1.0/osa_tool/readmeai/config/settings/tooling.toml +192 -0
  35. osa_tool-0.1.0/osa_tool/readmeai/config/settings.py +259 -0
  36. osa_tool-0.1.0/osa_tool/readmeai/errors.py +131 -0
  37. osa_tool-0.1.0/osa_tool/readmeai/generators/__init__.py +0 -0
  38. osa_tool-0.1.0/osa_tool/readmeai/generators/badges.py +112 -0
  39. osa_tool-0.1.0/osa_tool/readmeai/generators/builder.py +189 -0
  40. osa_tool-0.1.0/osa_tool/readmeai/generators/quickstart.py +163 -0
  41. osa_tool-0.1.0/osa_tool/readmeai/generators/svg/shieldsio_icons.json +12294 -0
  42. osa_tool-0.1.0/osa_tool/readmeai/generators/svg/skill_icons.json +204 -0
  43. osa_tool-0.1.0/osa_tool/readmeai/ingestion/__init__.py +0 -0
  44. osa_tool-0.1.0/osa_tool/readmeai/ingestion/file_processor.py +87 -0
  45. osa_tool-0.1.0/osa_tool/readmeai/ingestion/metadata_extractor.py +72 -0
  46. osa_tool-0.1.0/osa_tool/readmeai/ingestion/models.py +43 -0
  47. osa_tool-0.1.0/osa_tool/readmeai/ingestion/pipeline.py +52 -0
  48. osa_tool-0.1.0/osa_tool/readmeai/logger.py +112 -0
  49. osa_tool-0.1.0/osa_tool/readmeai/models/__init__.py +0 -0
  50. osa_tool-0.1.0/osa_tool/readmeai/models/base.py +178 -0
  51. osa_tool-0.1.0/osa_tool/readmeai/models/prompts.py +81 -0
  52. osa_tool-0.1.0/osa_tool/readmeai/models/tokens.py +81 -0
  53. osa_tool-0.1.0/osa_tool/readmeai/parsers/__init__.py +0 -0
  54. osa_tool-0.1.0/osa_tool/readmeai/parsers/base.py +40 -0
  55. osa_tool-0.1.0/osa_tool/readmeai/parsers/cpp.py +100 -0
  56. osa_tool-0.1.0/osa_tool/readmeai/parsers/docker.py +107 -0
  57. osa_tool-0.1.0/osa_tool/readmeai/parsers/factory.py +75 -0
  58. osa_tool-0.1.0/osa_tool/readmeai/parsers/go.py +33 -0
  59. osa_tool-0.1.0/osa_tool/readmeai/parsers/gradle.py +65 -0
  60. osa_tool-0.1.0/osa_tool/readmeai/parsers/maven.py +35 -0
  61. osa_tool-0.1.0/osa_tool/readmeai/parsers/npm.py +32 -0
  62. osa_tool-0.1.0/osa_tool/readmeai/parsers/properties.py +265 -0
  63. osa_tool-0.1.0/osa_tool/readmeai/parsers/python.py +167 -0
  64. osa_tool-0.1.0/osa_tool/readmeai/parsers/rust.py +45 -0
  65. osa_tool-0.1.0/osa_tool/readmeai/parsers/swift.py +55 -0
  66. osa_tool-0.1.0/osa_tool/readmeai/postprocessor/__init__.py +0 -0
  67. osa_tool-0.1.0/osa_tool/readmeai/postprocessor/response_cleaner.py +92 -0
  68. osa_tool-0.1.0/osa_tool/readmeai/preprocessor/__init__.py +0 -0
  69. osa_tool-0.1.0/osa_tool/readmeai/preprocessor/directory_cleaner.py +25 -0
  70. osa_tool-0.1.0/osa_tool/readmeai/preprocessor/document_cleaner.py +103 -0
  71. osa_tool-0.1.0/osa_tool/readmeai/preprocessor/file_filter.py +31 -0
  72. osa_tool-0.1.0/osa_tool/readmeai/readers/__init__.py +0 -0
  73. osa_tool-0.1.0/osa_tool/readmeai/readers/git/__init__.py +0 -0
  74. osa_tool-0.1.0/osa_tool/readmeai/readme_core.py +105 -0
  75. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/__init__.py +1 -0
  76. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/config/__init__.py +1 -0
  77. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/config/settings.py +140 -0
  78. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/generators/__init__.py +1 -0
  79. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/generators/builder.py +42 -0
  80. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/models/__init__.py +1 -0
  81. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/models/prompts.py +109 -0
  82. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/parser/__init__.py +1 -0
  83. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/parser/article_finder.py +90 -0
  84. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/parser/pdf_parser.py +134 -0
  85. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/templates/__init__.py +1 -0
  86. osa_tool-0.1.0/osa_tool/readmeai/readmegen_article/templates/header.py +36 -0
  87. osa_tool-0.1.0/osa_tool/readmeai/templates/__init__.py +0 -0
  88. osa_tool-0.1.0/osa_tool/readmeai/templates/base.py +11 -0
  89. osa_tool-0.1.0/osa_tool/readmeai/templates/contributing.py +105 -0
  90. osa_tool-0.1.0/osa_tool/readmeai/templates/header.py +36 -0
  91. osa_tool-0.1.0/osa_tool/readmeai/templates/quickstart.py +136 -0
  92. osa_tool-0.1.0/osa_tool/readmeai/utils/__init__.py +0 -0
  93. osa_tool-0.1.0/osa_tool/readmeai/utils/file_handler.py +164 -0
  94. osa_tool-0.1.0/osa_tool/readmeai/utils/file_resource.py +42 -0
  95. osa_tool-0.1.0/osa_tool/readmeai/utils/helpers.py +10 -0
  96. osa_tool-0.1.0/osa_tool/translation/dir_translator.py +322 -0
  97. osa_tool-0.1.0/osa_tool/utils.py +18 -0
  98. osa_tool-0.1.0/pyproject.toml +76 -0
osa_tool-0.1.0/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024 Natural Systems Simulation Lab
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
@@ -0,0 +1,314 @@
1
+ Metadata-Version: 2.1
2
+ Name: osa_tool
3
+ Version: 0.1.0
4
+ Summary: Tool that just makes your open source project better!
5
+ License: BSD-3-Clause
6
+ Author: ITMO-NSS-team
7
+ Author-email: itmo.nss.team@gmail.com
8
+ Requires-Python: >=3.10,<4.0
9
+ Classifier: License :: OSI Approved :: BSD License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: ProtoLLM (>=0.1.1)
16
+ Requires-Dist: PyYAML (==6.0.2)
17
+ Requires-Dist: Pygments (==2.19.1)
18
+ Requires-Dist: aiohappyeyeballs (==2.4.4)
19
+ Requires-Dist: aiohttp (==3.11.11)
20
+ Requires-Dist: aiosignal (==1.3.2)
21
+ Requires-Dist: annotated-types (==0.7.0)
22
+ Requires-Dist: anyio (==4.7.0)
23
+ Requires-Dist: aspose-pdf (==25.1.0) ; python_version >= "3.10" and python_version < "3.14"
24
+ Requires-Dist: async-timeout (>=4.0.0,<5.0.0)
25
+ Requires-Dist: attrs (==25.1.0)
26
+ Requires-Dist: certifi (==2024.12.14)
27
+ Requires-Dist: charset-normalizer (==3.4.1)
28
+ Requires-Dist: colorama (==0.4.6)
29
+ Requires-Dist: distro (==1.9.0)
30
+ Requires-Dist: exceptiongroup (==1.2.2)
31
+ Requires-Dist: frozenlist (==1.5.0)
32
+ Requires-Dist: gitdb (==4.0.11)
33
+ Requires-Dist: gitpython (==3.1.43)
34
+ Requires-Dist: h11 (==0.14.0)
35
+ Requires-Dist: httpcore (==1.0.7)
36
+ Requires-Dist: httpx (>=0.27.2,<0.28.0)
37
+ Requires-Dist: idna (==3.10)
38
+ Requires-Dist: iniconfig (==2.0.0)
39
+ Requires-Dist: jiter (==0.8.2)
40
+ Requires-Dist: markdown-it-py (==3.0.0)
41
+ Requires-Dist: mdurl (==0.1.2)
42
+ Requires-Dist: multidict (==6.1.0)
43
+ Requires-Dist: openai (==1.58.1)
44
+ Requires-Dist: packaging (==24.2)
45
+ Requires-Dist: pdfminer.six (==20231228)
46
+ Requires-Dist: pluggy (==1.5.0)
47
+ Requires-Dist: propcache (==0.2.1)
48
+ Requires-Dist: pydantic (>=2.9.0,<2.11.0)
49
+ Requires-Dist: pydantic-extra-types (==2.9.0)
50
+ Requires-Dist: pydantic_core (>=2.23.4,<2.24.0)
51
+ Requires-Dist: pytest (==8.3.4)
52
+ Requires-Dist: pytest-mock (==3.14.0)
53
+ Requires-Dist: python-dotenv (==1.0.1)
54
+ Requires-Dist: regex (==2024.11.6)
55
+ Requires-Dist: requests (==2.32.3)
56
+ Requires-Dist: rich (==13.9.4)
57
+ Requires-Dist: smmap (==5.0.2)
58
+ Requires-Dist: sniffio (==1.3.1)
59
+ Requires-Dist: structlog (==24.4.0)
60
+ Requires-Dist: tiktoken (==0.8.0)
61
+ Requires-Dist: tomli (==2.2.1)
62
+ Requires-Dist: tqdm (==4.67.1)
63
+ Requires-Dist: tree-sitter (==0.23.2)
64
+ Requires-Dist: tree-sitter-python (==0.23.4)
65
+ Requires-Dist: typing_extensions (==4.12.2)
66
+ Requires-Dist: urllib3 (==2.3.0)
67
+ Requires-Dist: yarl (==1.18.3)
68
+ Description-Content-Type: text/markdown
69
+
70
+ # OSA: OPEN-SOURCE ADVISOR
71
+
72
+
73
+ <p align="center">
74
+
75
+ <img src="./docs/images/osa_logo_h.PNG" width="600">
76
+ </p>
77
+
78
+ <p align="center">
79
+
80
+ [![Acknowledgement ITMO](https://raw.githubusercontent.com/aimclub/open-source-ops/43bb283758b43d75ec1df0a6bb4ae3eb20066323/badges/ITMO_badge.svg)](https://itmo.ru/)
81
+ [![Open-source-ops website](https://raw.githubusercontent.com/aimclub/open-source-ops/7de1e1321389ec177f236d0a5f41f876811a912a/badges/open--source--ops-black.svg)](https://aimclub.github.io/open-source-ops/)
82
+ [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
83
+ [![PyPi](https://badge.fury.io/py/osa-tool.svg)](https://badge.fury.io/py/osa-tool)
84
+ [![OSA-improved](https://img.shields.io/badge/improved%20by-OSA-yellow)](https://github.com/ITMO-NSS-team/Open-Source-Advisor)
85
+ [![Telegram Chat](https://img.shields.io/badge/Telegram-group-blue)](https://t.me/OSA_helpdesk)
86
+ </p>
87
+
88
+ <p>Built with:</p>
89
+ <p>
90
+ <img src="https://img.shields.io/badge/Python-3776AB.svg?style=BadgeStyleOptions.DEFAULT&logo=Python&logoColor=white" alt="Python">
91
+ <img src="https://img.shields.io/badge/Docker-2496ED.svg?style=BadgeStyleOptions.DEFAULT&logo=Docker&logoColor=white" alt="Docker">
92
+ <img src="https://img.shields.io/badge/GitHub%20Actions-2088FF.svg?style=BadgeStyleOptions.DEFAULT&logo=GitHub-Actions&logoColor=white" alt="GitHub%20Actions">
93
+ <img src="https://img.shields.io/badge/AIOHTTP-2C5BB4.svg?style=BadgeStyleOptions.DEFAULT&logo=AIOHTTP&logoColor=white" alt="AIOHTTP">
94
+ <img src="https://img.shields.io/badge/OpenAI-412991.svg?style=BadgeStyleOptions.DEFAULT&logo=OpenAI&logoColor=white" alt="OpenAI">
95
+ <img src="https://img.shields.io/badge/Pydantic-E92063.svg?style=BadgeStyleOptions.DEFAULT&logo=Pydantic&logoColor=white" alt="Pydantic">
96
+ </p>
97
+
98
+ ---
99
+ ## Overview
100
+
101
+ OSA (Open-Source-Advisor) is a LLM-based tool for improving the quality of scientific open source projects and helping create them from scratch.
102
+ It automates the generation of README, different levels of documentation, CI/CD scripts, etc.
103
+ It also generates advices and recommendations for the repository.
104
+
105
+ OSA is currently under development, so not all features are implemented.
106
+
107
+ ---
108
+ ## How it works?
109
+
110
+ Here is a short demo:
111
+
112
+ ![Animation](./docs/images/osa_demo.gif)
113
+
114
+ ---
115
+
116
+ ## Table of contents
117
+
118
+ - [Core features](#core-features)
119
+ - [Installation](#installation)
120
+ - [Getting started](#getting-started)
121
+ - [Examples](#examples)
122
+ - [Documentation](#documentation)
123
+ - [Contributing](#contributing)
124
+ - [License](#license)
125
+ - [Acknowledgments](#acknowledgments)
126
+ - [Citation](#citation)
127
+
128
+ ---
129
+
130
+ ## Core features
131
+
132
+ 1. **README file generation**: Automates the creation of a clear and structured README file for a repository, including projects based on research papers.
133
+
134
+ 2. **Documentation generation**: Automatically generates docstrings for Python code.
135
+
136
+ 3. **Automatic implementation of changes**: Clones the repository, creates a branch, commits and pushes changes, and creates a pull request with proposed changes.
137
+
138
+ 4. **Various LLMs**: Use OSA with an LLM accessible via API (e.g., OpenAI, VseGPT), a local server, or try an [osa_bot](https://github.com/osa-bot) hosted on ITMO servers.
139
+
140
+ ---
141
+
142
+ ## Installation
143
+
144
+ Install Open-Source-Advisor using one of the following methods:
145
+
146
+ **Using PyPi:**
147
+
148
+ ```sh
149
+ pip install osa-tool
150
+ ```
151
+
152
+ **Build from source:**
153
+
154
+ 1. Clone the Open-Source-Advisor repository:
155
+ ```sh
156
+ git clone https://github.com/ITMO-NSS-team/Open-Source-Advisor
157
+ ```
158
+
159
+ 2. Navigate to the project directory:
160
+ ```sh
161
+ cd Open-Source-Advisor
162
+ ```
163
+
164
+ 3. Install the project dependencies:
165
+
166
+ **Using `pip`** &nbsp;
167
+ [<img align="center" src="https://img.shields.io/badge/Pip-3776AB.svg?style={badge_style}&logo=pypi&logoColor=white" />](https://pypi.org/project/pip/)
168
+
169
+ ```sh
170
+ pip install -r requirements.txt
171
+ ```
172
+
173
+ **Using `poetry`** &nbsp;
174
+ [<img align="center" src="https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json" />](https://python-poetry.org/)
175
+
176
+ ```sh
177
+ poetry install
178
+ ```
179
+
180
+ **Using `docker`** &nbsp;
181
+ [<img align="center" src="https://img.shields.io/badge/Docker-2CA5E0.svg?style={badge_style}&logo=docker&logoColor=white" />](https://www.docker.com/)
182
+
183
+ ```sh
184
+ docker build --build-arg GIT_USER_NAME="your-user-name" --build-arg GIT_USER_EMAIL="your-user-email" -f docker/Dockerfile -t {image-name} .
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Getting started
190
+
191
+ ### Prerequisites
192
+
193
+ OSA requires Python 3.10 or higher.
194
+
195
+ File `.env` is required to specify GitHub token (GIT_TOKEN) and LLM API key (OPENAI_API_KEY or VSE_GPT_KEY)
196
+
197
+ ### Usage
198
+
199
+ Run Open-Source-Advisor using the following command:
200
+
201
+ **Using `pip`** &nbsp;
202
+ [<img align="center" src="https://img.shields.io/badge/Pip-3776AB.svg?style={badge_style}&logo=pypi&logoColor=white" />](https://pypi.org/project/pip/)
203
+
204
+ ```sh
205
+ python main.py -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--article {article}]
206
+ ```
207
+
208
+ **Using `docker`** &nbsp;
209
+ [<img align="center" src="https://img.shields.io/badge/Docker-2CA5E0.svg?style={badge_style}&logo=docker&logoColor=white" />](https://www.docker.com/)
210
+
211
+ ```sh
212
+ docker run --env-file .env {image-name} -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--article {article}]
213
+ ```
214
+
215
+ The --article option enables you to choose a README template for a repository based on an article. You can provide either a link to a PDF file of the article or a path to a local PDF file after the --article option. If you are using Docker, ensure that you upload the PDF file to the OSA folder before building the image, then, specify the path as /app/OSA/... or just use volume mounting to access the file.
216
+
217
+ ### Configuration
218
+
219
+ | Flag | Description | Default |
220
+ |----------------------|-----------------------------------------------------------------|-----------------------------|
221
+ | `-r`, `--repository` | URL of the GitHub repository (**Mandatory**) | |
222
+ | `--api` | LLM API service provider | `llama` |
223
+ | `--base-url` | URL of the provider compatible with API OpenAI | `https://api.openai.com/v1` |
224
+ | `--model` | Specific LLM model to use | `gpt-3.5-turbo` |
225
+ | `--article` | Link to the pdf file of the article | `None` |
226
+ | `--translate-dirs` | Enable automatic translation of the directory name into English | `disabled` |
227
+
228
+ ---
229
+
230
+ ## Examples
231
+
232
+ Examples of generated README files are available in [examples](https://github.com/ITMO-NSS-team/Open-Source-Advisor/tree/main/examples).
233
+
234
+ URL of the GitHub repository, LLM API service provider (*optional*) and Specific LLM model to use (*optional*) are required to use the generator.
235
+
236
+ To see available models go there:
237
+ 1. [VseGpt](https://vsegpt.ru/Docs/Models)
238
+ 2. [OpenAI](https://platform.openai.com/docs/models)
239
+
240
+ Local Llama ITMO:
241
+ ```sh
242
+ python main.py -r https://github.com/ITMO-NSS-team/Open-Source-Advisor
243
+ ```
244
+ OpenAI:
245
+ ```sh
246
+ python main.py -r https://github.com/ITMO-NSS-team/Open-Source-Advisor --api openai
247
+ ```
248
+ VseGPT:
249
+ ```sh
250
+ python main.py -r https://github.com/ITMO-NSS-team/Open-Source-Advisor --api openai --base-url https://api.vsegpt.ru/v1 --model openai/gpt-3.5-turbo
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Documentation
256
+
257
+ Detailed description of OSA API is available [here](https://itmo-nss-team.github.io/Open-Source-Advisor/).
258
+
259
+ ---
260
+
261
+ ## Contributing
262
+
263
+ - **[Report Issues](https://github.com/ITMO-NSS-team/Open-Source-Advisor/issues )**: Submit bugs found or log feature requests for the Open-Source-Advisor project.
264
+
265
+ ---
266
+
267
+ ## License
268
+
269
+ This project is protected under the BSD 3-Clause "New" or "Revised" License. For more details, refer to the [LICENSE](https://github.com/ITMO-NSS-team/Open-Source-Advisor/blob/main/LICENSE) file.
270
+
271
+ ---
272
+
273
+ ## Acknowledgments
274
+
275
+ The project is supported as ITMO University Research Project in AI Initiative (RPAII).
276
+
277
+ OSA is tested by the members of [ITMO OpenSource](https://t.me/scientific_opensource) community. Useful content from community
278
+ is available in [**Open-source-ops**](https://github.com/aimclub/open-source-ops)
279
+
280
+ Also, we thank [**Readme-ai**](https://github.com/eli64s/readme-ai)
281
+ for their code that we used as a foundation for our own version of README generator.
282
+
283
+ ---
284
+
285
+ ## Citation
286
+
287
+ If you use this software, please cite it as below.
288
+
289
+ ### APA format:
290
+
291
+ ITMO, NSS Lab (2025). Open-Source-Advisor repository [Computer software]. https://github.com/ITMO-NSS-team/Open-Source-Advisor
292
+
293
+ ### BibTeX format:
294
+
295
+ @misc{Open-Source-Advisor,
296
+
297
+ author = {ITMO, NSS Lab},
298
+
299
+ title = {Open-Source-Advisor repository},
300
+
301
+ year = {2025},
302
+
303
+ publisher = {github.com},
304
+
305
+ journal = {github.com repository},
306
+
307
+ howpublished = {\url{https://github.com/ITMO-NSS-team/Open-Source-Advisor.git}},
308
+
309
+ url = {https://github.com/ITMO-NSS-team/Open-Source-Advisor.git}
310
+
311
+ }
312
+
313
+ ---
314
+
@@ -0,0 +1,244 @@
1
+ # OSA: OPEN-SOURCE ADVISOR
2
+
3
+
4
+ <p align="center">
5
+
6
+ <img src="./docs/images/osa_logo_h.PNG" width="600">
7
+ </p>
8
+
9
+ <p align="center">
10
+
11
+ [![Acknowledgement ITMO](https://raw.githubusercontent.com/aimclub/open-source-ops/43bb283758b43d75ec1df0a6bb4ae3eb20066323/badges/ITMO_badge.svg)](https://itmo.ru/)
12
+ [![Open-source-ops website](https://raw.githubusercontent.com/aimclub/open-source-ops/7de1e1321389ec177f236d0a5f41f876811a912a/badges/open--source--ops-black.svg)](https://aimclub.github.io/open-source-ops/)
13
+ [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
14
+ [![PyPi](https://badge.fury.io/py/osa-tool.svg)](https://badge.fury.io/py/osa-tool)
15
+ [![OSA-improved](https://img.shields.io/badge/improved%20by-OSA-yellow)](https://github.com/ITMO-NSS-team/Open-Source-Advisor)
16
+ [![Telegram Chat](https://img.shields.io/badge/Telegram-group-blue)](https://t.me/OSA_helpdesk)
17
+ </p>
18
+
19
+ <p>Built with:</p>
20
+ <p>
21
+ <img src="https://img.shields.io/badge/Python-3776AB.svg?style=BadgeStyleOptions.DEFAULT&logo=Python&logoColor=white" alt="Python">
22
+ <img src="https://img.shields.io/badge/Docker-2496ED.svg?style=BadgeStyleOptions.DEFAULT&logo=Docker&logoColor=white" alt="Docker">
23
+ <img src="https://img.shields.io/badge/GitHub%20Actions-2088FF.svg?style=BadgeStyleOptions.DEFAULT&logo=GitHub-Actions&logoColor=white" alt="GitHub%20Actions">
24
+ <img src="https://img.shields.io/badge/AIOHTTP-2C5BB4.svg?style=BadgeStyleOptions.DEFAULT&logo=AIOHTTP&logoColor=white" alt="AIOHTTP">
25
+ <img src="https://img.shields.io/badge/OpenAI-412991.svg?style=BadgeStyleOptions.DEFAULT&logo=OpenAI&logoColor=white" alt="OpenAI">
26
+ <img src="https://img.shields.io/badge/Pydantic-E92063.svg?style=BadgeStyleOptions.DEFAULT&logo=Pydantic&logoColor=white" alt="Pydantic">
27
+ </p>
28
+
29
+ ---
30
+ ## Overview
31
+
32
+ OSA (Open-Source-Advisor) is a LLM-based tool for improving the quality of scientific open source projects and helping create them from scratch.
33
+ It automates the generation of README, different levels of documentation, CI/CD scripts, etc.
34
+ It also generates advices and recommendations for the repository.
35
+
36
+ OSA is currently under development, so not all features are implemented.
37
+
38
+ ---
39
+ ## How it works?
40
+
41
+ Here is a short demo:
42
+
43
+ ![Animation](./docs/images/osa_demo.gif)
44
+
45
+ ---
46
+
47
+ ## Table of contents
48
+
49
+ - [Core features](#core-features)
50
+ - [Installation](#installation)
51
+ - [Getting started](#getting-started)
52
+ - [Examples](#examples)
53
+ - [Documentation](#documentation)
54
+ - [Contributing](#contributing)
55
+ - [License](#license)
56
+ - [Acknowledgments](#acknowledgments)
57
+ - [Citation](#citation)
58
+
59
+ ---
60
+
61
+ ## Core features
62
+
63
+ 1. **README file generation**: Automates the creation of a clear and structured README file for a repository, including projects based on research papers.
64
+
65
+ 2. **Documentation generation**: Automatically generates docstrings for Python code.
66
+
67
+ 3. **Automatic implementation of changes**: Clones the repository, creates a branch, commits and pushes changes, and creates a pull request with proposed changes.
68
+
69
+ 4. **Various LLMs**: Use OSA with an LLM accessible via API (e.g., OpenAI, VseGPT), a local server, or try an [osa_bot](https://github.com/osa-bot) hosted on ITMO servers.
70
+
71
+ ---
72
+
73
+ ## Installation
74
+
75
+ Install Open-Source-Advisor using one of the following methods:
76
+
77
+ **Using PyPi:**
78
+
79
+ ```sh
80
+ pip install osa-tool
81
+ ```
82
+
83
+ **Build from source:**
84
+
85
+ 1. Clone the Open-Source-Advisor repository:
86
+ ```sh
87
+ git clone https://github.com/ITMO-NSS-team/Open-Source-Advisor
88
+ ```
89
+
90
+ 2. Navigate to the project directory:
91
+ ```sh
92
+ cd Open-Source-Advisor
93
+ ```
94
+
95
+ 3. Install the project dependencies:
96
+
97
+ **Using `pip`** &nbsp;
98
+ [<img align="center" src="https://img.shields.io/badge/Pip-3776AB.svg?style={badge_style}&logo=pypi&logoColor=white" />](https://pypi.org/project/pip/)
99
+
100
+ ```sh
101
+ pip install -r requirements.txt
102
+ ```
103
+
104
+ **Using `poetry`** &nbsp;
105
+ [<img align="center" src="https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json" />](https://python-poetry.org/)
106
+
107
+ ```sh
108
+ poetry install
109
+ ```
110
+
111
+ **Using `docker`** &nbsp;
112
+ [<img align="center" src="https://img.shields.io/badge/Docker-2CA5E0.svg?style={badge_style}&logo=docker&logoColor=white" />](https://www.docker.com/)
113
+
114
+ ```sh
115
+ docker build --build-arg GIT_USER_NAME="your-user-name" --build-arg GIT_USER_EMAIL="your-user-email" -f docker/Dockerfile -t {image-name} .
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Getting started
121
+
122
+ ### Prerequisites
123
+
124
+ OSA requires Python 3.10 or higher.
125
+
126
+ File `.env` is required to specify GitHub token (GIT_TOKEN) and LLM API key (OPENAI_API_KEY or VSE_GPT_KEY)
127
+
128
+ ### Usage
129
+
130
+ Run Open-Source-Advisor using the following command:
131
+
132
+ **Using `pip`** &nbsp;
133
+ [<img align="center" src="https://img.shields.io/badge/Pip-3776AB.svg?style={badge_style}&logo=pypi&logoColor=white" />](https://pypi.org/project/pip/)
134
+
135
+ ```sh
136
+ python main.py -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--article {article}]
137
+ ```
138
+
139
+ **Using `docker`** &nbsp;
140
+ [<img align="center" src="https://img.shields.io/badge/Docker-2CA5E0.svg?style={badge_style}&logo=docker&logoColor=white" />](https://www.docker.com/)
141
+
142
+ ```sh
143
+ docker run --env-file .env {image-name} -r {repository} [--api {api}] [--base-url {base_url}] [--model {model_name}] [--article {article}]
144
+ ```
145
+
146
+ The --article option enables you to choose a README template for a repository based on an article. You can provide either a link to a PDF file of the article or a path to a local PDF file after the --article option. If you are using Docker, ensure that you upload the PDF file to the OSA folder before building the image, then, specify the path as /app/OSA/... or just use volume mounting to access the file.
147
+
148
+ ### Configuration
149
+
150
+ | Flag | Description | Default |
151
+ |----------------------|-----------------------------------------------------------------|-----------------------------|
152
+ | `-r`, `--repository` | URL of the GitHub repository (**Mandatory**) | |
153
+ | `--api` | LLM API service provider | `llama` |
154
+ | `--base-url` | URL of the provider compatible with API OpenAI | `https://api.openai.com/v1` |
155
+ | `--model` | Specific LLM model to use | `gpt-3.5-turbo` |
156
+ | `--article` | Link to the pdf file of the article | `None` |
157
+ | `--translate-dirs` | Enable automatic translation of the directory name into English | `disabled` |
158
+
159
+ ---
160
+
161
+ ## Examples
162
+
163
+ Examples of generated README files are available in [examples](https://github.com/ITMO-NSS-team/Open-Source-Advisor/tree/main/examples).
164
+
165
+ URL of the GitHub repository, LLM API service provider (*optional*) and Specific LLM model to use (*optional*) are required to use the generator.
166
+
167
+ To see available models go there:
168
+ 1. [VseGpt](https://vsegpt.ru/Docs/Models)
169
+ 2. [OpenAI](https://platform.openai.com/docs/models)
170
+
171
+ Local Llama ITMO:
172
+ ```sh
173
+ python main.py -r https://github.com/ITMO-NSS-team/Open-Source-Advisor
174
+ ```
175
+ OpenAI:
176
+ ```sh
177
+ python main.py -r https://github.com/ITMO-NSS-team/Open-Source-Advisor --api openai
178
+ ```
179
+ VseGPT:
180
+ ```sh
181
+ python main.py -r https://github.com/ITMO-NSS-team/Open-Source-Advisor --api openai --base-url https://api.vsegpt.ru/v1 --model openai/gpt-3.5-turbo
182
+ ```
183
+
184
+ ---
185
+
186
+ ## Documentation
187
+
188
+ Detailed description of OSA API is available [here](https://itmo-nss-team.github.io/Open-Source-Advisor/).
189
+
190
+ ---
191
+
192
+ ## Contributing
193
+
194
+ - **[Report Issues](https://github.com/ITMO-NSS-team/Open-Source-Advisor/issues )**: Submit bugs found or log feature requests for the Open-Source-Advisor project.
195
+
196
+ ---
197
+
198
+ ## License
199
+
200
+ This project is protected under the BSD 3-Clause "New" or "Revised" License. For more details, refer to the [LICENSE](https://github.com/ITMO-NSS-team/Open-Source-Advisor/blob/main/LICENSE) file.
201
+
202
+ ---
203
+
204
+ ## Acknowledgments
205
+
206
+ The project is supported as ITMO University Research Project in AI Initiative (RPAII).
207
+
208
+ OSA is tested by the members of [ITMO OpenSource](https://t.me/scientific_opensource) community. Useful content from community
209
+ is available in [**Open-source-ops**](https://github.com/aimclub/open-source-ops)
210
+
211
+ Also, we thank [**Readme-ai**](https://github.com/eli64s/readme-ai)
212
+ for their code that we used as a foundation for our own version of README generator.
213
+
214
+ ---
215
+
216
+ ## Citation
217
+
218
+ If you use this software, please cite it as below.
219
+
220
+ ### APA format:
221
+
222
+ ITMO, NSS Lab (2025). Open-Source-Advisor repository [Computer software]. https://github.com/ITMO-NSS-team/Open-Source-Advisor
223
+
224
+ ### BibTeX format:
225
+
226
+ @misc{Open-Source-Advisor,
227
+
228
+ author = {ITMO, NSS Lab},
229
+
230
+ title = {Open-Source-Advisor repository},
231
+
232
+ year = {2025},
233
+
234
+ publisher = {github.com},
235
+
236
+ journal = {github.com repository},
237
+
238
+ howpublished = {\url{https://github.com/ITMO-NSS-team/Open-Source-Advisor.git}},
239
+
240
+ url = {https://github.com/ITMO-NSS-team/Open-Source-Advisor.git}
241
+
242
+ }
243
+
244
+ ---
File without changes
File without changes