Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docs, examples and CI #11

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rebase-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest
permissions:
contents: write # Allows pushing changes to the repository
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,4 @@ auth.toml
# Exclude all RST files appart from index.rst
*.rst
!index.rst
!examples.rst
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# CHANGELOG


## v0.2.2-rc.1 (2024-11-25)

### Bug Fixes

- Add write permissions for repository changes
([`45aea58`](https://github.com/sachahu1/Github-Search-Engine/commit/45aea585a02263669d690bbfda72f4369541a2a0))

Added permissions to allow pushing changes to the repository.

- Add in-memory storage option to GithubSearchEngine
([`7a83938`](https://github.com/sachahu1/Github-Search-Engine/commit/7a83938848c324f6228180239cf7e06690ea5ed2))

Initialize GithubSearchEngine with an optional in-memory storage location.

- Add examples.rst, update documentation URLs
([`a2adc30`](https://github.com/sachahu1/Github-Search-Engine/commit/a2adc3052e960203db3fed64ab4ae2debdc10c5d))

Added examples.rst for code examples. Updated documentation URLs to use correct capitalization and
domain.


## v0.2.1 (2024-11-25)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ github_search_engine index <owner> <repository_name> --db_path=./local-store --g
```
Then, search through any issue using:
```shell
github_search_engine search <owner> <repository_name> "<Your query>"--db_path=./local-store --github_access_token=<Your GitHub Personal Access Token>
github_search_engine search <owner> <repository_name> "<Your query>" --db_path=./local-store --github_access_token=<Your GitHub Personal Access Token>
```

### Launching an API server
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = "Sacha hu"

# The full version, including alpha/beta/rc tags
release = "0.2.1"
release = "0.2.2-rc.1"

source_suffix = {
".rst": "restructuredtext",
Expand Down Expand Up @@ -160,13 +160,13 @@
versions = [
(
tag_ref.name,
f"https://sachahu.com/docs/github-search-engine/pages/{tag_ref.name}",
f"https://www.sachahu.com/docs/Github-Search-Engine/pages/{tag_ref.name}",
)
for tag_ref in git.Repo("../../").tags
]

versions.append(
("latest", "https://sachahu.com/docs/github-search-engine/latest")
("latest", "https://www.sachahu.com/docs/Github-Search-Engine/latest")
)

html_context = {
Expand Down
8 changes: 8 additions & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Examples
========

.. toctree::
:maxdepth: 1
:glob:

/autoapi/examples/*/index
4 changes: 3 additions & 1 deletion examples/basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def run(
repository_name: str,
query: str,
):
github_search_engine = GithubSearchEngine(github_access_token)
github_search_engine = GithubSearchEngine(
github_access_token, qdrant_location=":memory:"
)

asyncio.run(github_search_engine.index_repository(owner, repository_name))
results = github_search_engine.search(owner, repository_name, query)
Expand Down
2 changes: 1 addition & 1 deletion github_search_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.2.1"
__version__ = "0.2.2-rc.1"

from github_search_engine import _cli as _cli
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "Github-Search-Engine"
version = "0.2.1"
version = "0.2.2-rc.1"
description = "Search through github issues and PRs like never before."
authors = ["Sacha hu <[email protected]>"]
packages = [
Expand All @@ -9,7 +9,7 @@ packages = [
readme = "README.md"
maintainers = ["Sacha hu <[email protected]>"]
repository = "https://github.com/sachahu1/Github-Search-Engine"
documentation = "https://sachahu.com/docs/github-search-engine/latest/index.html"
documentation = "https://www.sachahu.com/docs/Github-Search-Engine/latest/index.html"

[tool.poetry.dependencies]
python = ">=3.10,<3.14"
Expand Down
Loading