Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
simplify wyvern import - move top priority import to wyvern/__init__.…
Browse files Browse the repository at this point in the history
…py (#30)

* simplify wyvern import - move top priority import to wyvern/__init__.py

* WyvernService

* ModelComponent, RankingPipeline RankingResponse

* a lot more for starter template

* version v0.0.17

* add .env file for wyvern init
  • Loading branch information
wintonzheng authored Sep 13, 2023
1 parent 3d3820c commit 3cb31a3
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ Now that the `wyvern init` has set up your initial repository, you should see th
│ │ ├── ranking_pipline.py
│ │ ├── realtime_features.py
│ │ ├── schemas.py
├── feature-store-python
│ ├── features
│ │ ├── feature_store.yaml
│ │ ├── features.py
│ │ ├── main.py
├── .env
└── .gitignore
```

Expand Down
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 = "wyvern-ai"
version = "0.0.16"
version = "0.0.17"
description = ""
authors = ["Wyvern AI <info@wyvern.ai>"]
readme = "README.md"
Expand Down
53 changes: 53 additions & 0 deletions wyvern/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,59 @@
# -*- coding: utf-8 -*-
from wyvern.components.features.realtime_features_component import (
RealtimeFeatureComponent,
)
from wyvern.components.models.model_component import (
ModelComponent,
ModelInput,
ModelOutput,
)
from wyvern.components.pipeline_component import PipelineComponent
from wyvern.components.ranking_pipeline import (
RankingPipeline,
RankingRequest,
RankingResponse,
)
from wyvern.entities.candidate_entities import CandidateSetEntity
from wyvern.entities.feature_entities import FeatureData, FeatureMap
from wyvern.entities.identifier import CompositeIdentifier, Identifier, IdentifierType
from wyvern.entities.identifier_entities import (
ProductEntity,
QueryEntity,
UserEntity,
WyvernDataModel,
WyvernEntity,
)
from wyvern.feature_store.feature_server import generate_wyvern_store_app
from wyvern.service import WyvernService
from wyvern.wyvern_logging import setup_logging
from wyvern.wyvern_tracing import setup_tracing
from wyvern.wyvern_typing import WyvernFeature

setup_logging()
setup_tracing()


__all__ = [
"generate_wyvern_store_app",
"CandidateSetEntity",
"CompositeIdentifier",
"FeatureData",
"FeatureMap",
"Identifier",
"IdentifierType",
"ModelComponent",
"ModelInput",
"ModelOutput",
"PipelineComponent",
"ProductEntity",
"QueryEntity",
"RankingPipeline",
"RankingResponse",
"RankingRequest",
"RealtimeFeatureComponent",
"UserEntity",
"WyvernDataModel",
"WyvernEntity",
"WyvernFeature",
"WyvernService",
]
4 changes: 4 additions & 0 deletions wyvern/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def init(
shutil.move(item_path, os.path.join(project, item))
shutil.rmtree(extracted_dir)

# add a .env file to the new repository with ENVIRONMENT=development
with open(os.path.join(project, ".env"), "w") as env_file:
env_file.write("ENVIRONMENT=development\n")

tracking.capture(event="oss_init_succeed")
typer.echo(
f"Successfully initialized Wyvern application template code in {project}",
Expand Down

0 comments on commit 3cb31a3

Please sign in to comment.