Skip to content

Commit

Permalink
[tools] init community profiler (#103)
Browse files Browse the repository at this point in the history
* [tools] init github community analyzer

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
  • Loading branch information
litanlitudan authored Jun 4, 2023
1 parent 2b34b85 commit 0aa2fba
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- run: make build-package
- name: Publish package
- run: make build-skyagi-package
- name: Publish SkyAGI package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_SKYAGI_TOKEN }}
packages_dir: skyagi/dist
- run: make build-community-profiler-package
- name: Publish Community-Profiler package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_COMMUNITY_PROFILER_TOKEN }}
packages_dir: community-profiler/dist
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ setup-package:
pip install virtualenv
pip install build

build-package:
build-skyagi-package:
make setup-package
cp README.md skyagi
cd skyagi && python -m build

build-community-profiler-package:
make setup-package
cd community-profiler && python -m build

install:
cd skyagi && pip install -e .[dev]

Expand Down
14 changes: 14 additions & 0 deletions community-profiler/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
setup-package:
pip install virtualenv
pip install build
pip install twine

build-package:
make setup-package
python -m build

upload-package:
python -m twine upload dist/*

install:
pip install -e .[dev]
1 change: 1 addition & 0 deletions community-profiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Community Profiler
10 changes: 10 additions & 0 deletions community-profiler/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
root = ".."
50 changes: 50 additions & 0 deletions community-profiler/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[metadata]
name = community-profiler
version = 0.0.1
author = Tan Li
author_email = [email protected]
description = Github community profiler
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/litanlitudan/skyagi/tree/main/community-profiler
project_urls =
Bug Tracker = https://github.com/litanlitudan/skyagi/issues
Changelog = https://github.com/litanlitudan/skyagi/releases
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent

[options]
package_dir =
= src
packages = find:
python_requires = >=3.8
install_requires =
rich
textual
typer
termcolor
tiktoken
faiss-cpu
openai
lancedb

[options.extras_require]
dev =
black
Faker
flake8
isort
memray
pdbpp
pytest
richbench

[options.packages.find]
where =
src

[options.entry_points]
console_scripts =
community-profiler = community_profiler:cli
3 changes: 3 additions & 0 deletions community-profiler/src/community_profiler/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .cli import cli

__all__ = [cli]
15 changes: 15 additions & 0 deletions community-profiler/src/community_profiler/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import typer

cli = typer.Typer()


@cli.callback(invoke_without_command=True)
def main(ctx: typer.Context):
"""
Default behavior
"""
# only run without a command specified
if ctx.invoked_subcommand is not None:
return

print("Hello from community profiler!")
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion skyagi/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project_urls =
Changelog = https://github.com/litanlitudan/skyagi/releases
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent

[options]
Expand Down

1 comment on commit 0aa2fba

@vercel
Copy link

@vercel vercel bot commented on 0aa2fba Jun 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

skyagi – ./

skyagi-sky-agi.vercel.app
app.skyagi.ai
skyagi.vercel.app
skyagi-git-main-sky-agi.vercel.app

Please sign in to comment.