mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Use the src/ layout to fix packaging Khoj for PyPi
- Why The khoj pypi packages should be installed in `khoj' directory. Previously it was being installed into `src' directory, which is a generic top level directory name that is discouraged from being used - Changes - move src/* to src/khoj/* - update `setup.py' to `find_packages' in `src' instead of project root - rename imports to form `from khoj.*' in complete project - update `constants.web_directory' path to use `khoj' directory - rename root logger to `khoj' in `main.py' - fix image_search tests to use the newly rename `khoj' logger - update config, docs, workflows to reference new path `src/khoj'
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- src/**
|
||||
- src/khoj/**
|
||||
- config/**
|
||||
- setup.py
|
||||
- Dockerfile
|
||||
|
||||
6
.github/workflows/build_khoj_el.yml
vendored
6
.github/workflows/build_khoj_el.yml
vendored
@@ -7,13 +7,13 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/interface/emacs/*.el
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- .github/workflows/build_khoj_el.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/interface/emacs/*.el
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- .github/workflows/build_khoj_el.yml
|
||||
|
||||
jobs:
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
- name: Run
|
||||
env:
|
||||
# Khoj recipe from https://github.com/melpa/melpa/pull/8321/files
|
||||
RECIPE: (khoj :fetcher github :repo "debanjum/khoj" :files ("src/interface/emacs/*.el"))
|
||||
RECIPE: (khoj :fetcher github :repo "debanjum/khoj" :files ("src/khoj/interface/emacs/*.el"))
|
||||
EXIST_OK: true
|
||||
LOCAL_REPO: ${{ github.workspace }}
|
||||
run: echo $GITHUB_REF && make -C ~/melpazoid
|
||||
|
||||
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -7,14 +7,14 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/**
|
||||
- src/khoj/**
|
||||
- setup.py
|
||||
- .github/workflows/publish.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/**
|
||||
- src/khoj/**
|
||||
- setup.py
|
||||
- .github/workflows/publish.yml
|
||||
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -66,7 +66,7 @@ jobs:
|
||||
# Create disk image with the app
|
||||
create-dmg \
|
||||
--volname "Khoj" \
|
||||
--volicon "src/interface/web/assets/icons/favicon.icns" \
|
||||
--volicon "src/khoj/interface/web/assets/icons/favicon.icns" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 600 300 \
|
||||
--icon-size 100 \
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
# Copy app files into expected output directory structure
|
||||
mkdir -p package/opt package/usr/share/applications package/usr/share/icons/hicolor/128x128/apps
|
||||
cp -r dist/Khoj package/opt/Khoj
|
||||
cp src/interface/web/assets/icons/favicon-128x128.png package/usr/share/icons/hicolor/128x128/apps/Khoj.png
|
||||
cp src/khoj/interface/web/assets/icons/favicon-128x128.png package/usr/share/icons/hicolor/128x128/apps/Khoj.png
|
||||
cp Khoj.desktop package/usr/share/applications
|
||||
|
||||
# Fix permissions to be usable by non-root users
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -5,7 +5,7 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/**
|
||||
- src/khoj/**
|
||||
- tests/**
|
||||
- config/**
|
||||
- setup.py
|
||||
@@ -14,7 +14,7 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/**
|
||||
- src/khoj/**
|
||||
- tests/**
|
||||
- config/**
|
||||
- setup.py
|
||||
|
||||
12
.github/workflows/test_khoj_el.yml
vendored
12
.github/workflows/test_khoj_el.yml
vendored
@@ -5,15 +5,15 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/interface/emacs/*.el
|
||||
- src/interface/emacs/tests/*.el
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- src/khoj/interface/emacs/tests/*.el
|
||||
- .github/workflows/test_khoj_el.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- src/interface/emacs/*.el
|
||||
- src/interface/emacs/tests/*.el
|
||||
- src/khoj/interface/emacs/*.el
|
||||
- src/khoj/interface/emacs/tests/*.el
|
||||
- .github/workflows/test_khoj_el.yml
|
||||
|
||||
jobs:
|
||||
@@ -44,6 +44,6 @@ jobs:
|
||||
(unless package-archive-contents (package-refresh-contents)) \
|
||||
(unless (package-installed-p 'transient) (package-install 'transient)))" \
|
||||
-l ert \
|
||||
-l ./src/interface/emacs/khoj.el \
|
||||
-l ./src/interface/emacs/tests/khoj-tests.el \
|
||||
-l ./src/khoj/interface/emacs/khoj.el \
|
||||
-l ./src/khoj/interface/emacs/tests/khoj-tests.el \
|
||||
-f ert-run-tests-batch-and-exit
|
||||
|
||||
Reference in New Issue
Block a user