Skip to content

Commit

Permalink
Merge pull request #93 from monarch-initiative/name_change
Browse files Browse the repository at this point in the history
Rename main module from curate_gpt to curategpt
  • Loading branch information
caufieldjh authored Oct 7, 2024
2 parents f859122 + deaa948 commit 1a9c248
Show file tree
Hide file tree
Showing 147 changed files with 546 additions and 514 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
- name: Build documentation.
run: |
echo ${{ secrets.GH_TOKEN }} >> src/curate_gpt/token.txt
echo ${{ secrets.GH_TOKEN }} >> src/curategpt/token.txt
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/
poetry run sphinx-apidoc -o . ../src/curate_gpt/ --ext-autodoc -f
poetry run sphinx-apidoc -o . ../src/curategpt/ --ext-autodoc -f
poetry run sphinx-build -b html . _build
cp -r _build/* ../gh-pages/
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ ont-%:


app:
$(RUN) streamlit run src/curate_gpt/app/app.py --logger.level=debug
$(RUN) streamlit run src/curategpt/app/app.py --logger.level=debug

## -- Docs --


apidoc:
$(RUN) sphinx-apidoc -f -M -o docs/ src/curate_gpt/ && cd docs && $(RUN) make html
$(RUN) sphinx-apidoc -f -M -o docs/ src/curategpt/ && cd docs && $(RUN) make html

%-doctest: %
$(RUN) python -m doctest --option ELLIPSIS --option NORMALIZE_WHITESPACE $<
Expand Down
2 changes: 1 addition & 1 deletion adhoc.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ RUN = poetry run
DB_PATH = db

data/nmdc.json:
$(RUN) python -m curate_gpt.adhoc.nmdc_sample_downloader --no-stream --format json > $@
$(RUN) python -m curategpt.adhoc.nmdc_sample_downloader --no-stream --format json > $@


data/clingen.json:
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import os
from datetime import date

from curate_gpt import __version__
from curategpt import __version__

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'curate_gpt'
project = 'curategpt'
copyright = f"{date.today().year}, Author 1 <cjmungall@lbl.gov>"
author = 'Author 1 <cjmungall@lbl.gov>'
release = __version__
Expand Down
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Welcome to curategpt's documentation!
:maxdepth: 2
:caption: Contents:

curate_gpt.store
curate_gpt.wrappers
curate_gpt.agents
curate_gpt.extract
curate_gpt.utils
curate_gpt.formatters
curategpt.store
curategpt.wrappers
curategpt.agents
curategpt.extract
curategpt.utils
curategpt.formatters

modules

Expand Down
349 changes: 181 additions & 168 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "curategpt"
version = "0.2.0"
version = "0.2.1"
description = "CurateGPT"
authors = ["Author 1 <cjmungall@lbl.gov>"]
license = "BSD-3"
Expand Down
88 changes: 0 additions & 88 deletions src/curate_gpt/wrappers/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/curate_gpt/__init__.py → src/curategpt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# package is not installed
__version__ = "0.0.0" # pragma: no cover

from curate_gpt.extract import BasicExtractor, Extractor
from curate_gpt.store import ChromaDBAdapter, DBAdapter
from curategpt.extract import BasicExtractor, Extractor
from curategpt.store import ChromaDBAdapter, DBAdapter

__all__ = ["DBAdapter", "ChromaDBAdapter", "Extractor", "BasicExtractor"]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import click
import yaml

from curate_gpt import BasicExtractor, DBAdapter
from curate_gpt.store import get_store
from curate_gpt.utils.eval_utils import Outcome, score_prediction
from curate_gpt.utils.llm_utils import query_model
from curate_gpt.wrappers.bio.gocam_wrapper import GOCAMWrapper
from curategpt import BasicExtractor, DBAdapter
from curategpt.store import get_store
from curategpt.utils.eval_utils import Outcome, score_prediction
from curategpt.utils.llm_utils import query_model
from curategpt.wrappers.bio.gocam_wrapper import GOCAMWrapper

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import yaml
from llm import Model

from curate_gpt.store.db_adapter import SEARCH_RESULT
from curate_gpt.utils.tokens import estimate_num_tokens, max_tokens_by_model
from curategpt.store.db_adapter import SEARCH_RESULT
from curategpt.utils.tokens import estimate_num_tokens, max_tokens_by_model

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from dataclasses import dataclass
from typing import Union

from curate_gpt import DBAdapter, Extractor
from curate_gpt.wrappers import BaseWrapper
from curategpt import DBAdapter, Extractor
from curategpt.wrappers import BaseWrapper


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from jinja2 import Template
from pydantic import BaseModel, ConfigDict

from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.conf.prompts import PROMPTS_DIR
from curate_gpt.extract import AnnotatedObject
from curategpt.agents.base_agent import BaseAgent
from curategpt.conf.prompts import PROMPTS_DIR
from curategpt.extract import AnnotatedObject


class KnowledgeBaseSpecification(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from llm import Conversation
from pydantic import BaseModel, ConfigDict

from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.utils.tokens import estimate_num_tokens, max_tokens_by_model
from curate_gpt.wrappers import BaseWrapper
from curategpt.agents.base_agent import BaseAgent
from curategpt.utils.tokens import estimate_num_tokens, max_tokens_by_model
from curategpt.wrappers import BaseWrapper

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from pydantic import BaseModel, ConfigDict

from curate_gpt.agents.base_agent import BaseAgent
from curategpt.agents.base_agent import BaseAgent

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

from pydantic import BaseModel, ConfigDict

from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.agents.chat_agent import ChatResponse
from curate_gpt.extract import AnnotatedObject
from curate_gpt.store import DBAdapter
from curategpt.agents.base_agent import BaseAgent
from curategpt.agents.chat_agent import ChatResponse
from curategpt.extract import AnnotatedObject
from curategpt.store import DBAdapter

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import yaml
from pydantic import BaseModel, ConfigDict

from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.extract import AnnotatedObject
from curate_gpt.store import DBAdapter
from curategpt.agents.base_agent import BaseAgent
from curategpt.extract import AnnotatedObject
from curategpt.store import DBAdapter

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

import yaml

from curate_gpt import BasicExtractor
from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.agents.chat_agent import ChatAgent, ChatResponse
from curate_gpt.formatters.format_utils import object_as_yaml
from curate_gpt.utils.tokens import estimate_num_tokens, max_tokens_by_model
from curate_gpt.wrappers import BaseWrapper
from curategpt import BasicExtractor
from curategpt.agents.base_agent import BaseAgent
from curategpt.agents.chat_agent import ChatAgent, ChatResponse
from curategpt.formatters.format_utils import object_as_yaml
from curategpt.utils.tokens import estimate_num_tokens, max_tokens_by_model
from curategpt.wrappers import BaseWrapper

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import yaml
from pydantic import BaseModel, ConfigDict

from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.formatters.format_utils import remove_formatting
from curate_gpt.store.db_adapter import SEARCH_RESULT
from curate_gpt.utils.tokens import estimate_num_tokens, max_tokens_by_model
from curategpt.agents.base_agent import BaseAgent
from curategpt.formatters.format_utils import remove_formatting
from curategpt.store.db_adapter import SEARCH_RESULT
from curategpt.utils.tokens import estimate_num_tokens, max_tokens_by_model

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from dataclasses import dataclass
from typing import List

from curate_gpt.agents.base_agent import BaseAgent
from curate_gpt.wrappers import BaseWrapper
from curategpt.agents.base_agent import BaseAgent
from curategpt.wrappers import BaseWrapper

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
28 changes: 14 additions & 14 deletions src/curate_gpt/app/app.py → src/curategpt/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
import yaml
from scipy.spatial import distance_matrix

from curate_gpt import BasicExtractor
from curate_gpt.agents import MappingAgent
from curate_gpt.agents.chat_agent import ChatAgent, ChatResponse
from curate_gpt.agents.dase_agent import DatabaseAugmentedStructuredExtraction
from curate_gpt.agents.dragon_agent import DragonAgent
from curate_gpt.agents.evidence_agent import EvidenceAgent
from curate_gpt.app.components import (
from curategpt import BasicExtractor
from curategpt.agents import MappingAgent
from curategpt.agents.chat_agent import ChatAgent, ChatResponse
from curategpt.agents.dase_agent import DatabaseAugmentedStructuredExtraction
from curategpt.agents.dragon_agent import DragonAgent
from curategpt.agents.evidence_agent import EvidenceAgent
from curategpt.app.components import (
DimensionalityReductionOptions,
limit_slider_component,
vectors_to_fig,
)
from curate_gpt.app.helper import get_applicable_examples, get_case_collection
from curate_gpt.app.state import get_state
from curate_gpt.extract import OpenAIExtractor, RecursiveExtractor
from curate_gpt.wrappers import BaseWrapper
from curate_gpt.wrappers.investigation.jgi_wrapper import JGIWrapper
from curate_gpt.wrappers.literature import WikipediaWrapper
from curate_gpt.wrappers.literature.pubmed_wrapper import PubmedWrapper
from curategpt.app.helper import get_applicable_examples, get_case_collection
from curategpt.app.state import get_state
from curategpt.extract import OpenAIExtractor, RecursiveExtractor
from curategpt.wrappers import BaseWrapper
from curategpt.wrappers.investigation.jgi_wrapper import JGIWrapper
from curategpt.wrappers.literature import WikipediaWrapper
from curategpt.wrappers.literature.pubmed_wrapper import PubmedWrapper

PUBMED = "PubMed (via API)"
WIKIPEDIA = "Wikipedia (via API)"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import yaml

from curate_gpt.conf import EXAMPLES_DIR
from curategpt.conf import EXAMPLES_DIR

HELP_CASES = EXAMPLES_DIR / "bio.yaml"

Expand Down
8 changes: 4 additions & 4 deletions src/curate_gpt/app/state.py → src/curategpt/app/state.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional

from curate_gpt import BasicExtractor, ChromaDBAdapter, DBAdapter, Extractor
from curate_gpt.agents.chat_agent import ChatResponse
from curate_gpt.app.cart import Cart
from curate_gpt.extract import AnnotatedObject
from curategpt import BasicExtractor, ChromaDBAdapter, DBAdapter, Extractor
from curategpt.agents.chat_agent import ChatResponse
from curategpt.app.cart import Cart
from curategpt.extract import AnnotatedObject


@dataclass
Expand Down
Loading

0 comments on commit 1a9c248

Please sign in to comment.