Skip to content

Commit

Permalink
Bump Version 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
blythed committed Nov 3, 2024
1 parent c159f7f commit e7cc241
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ jobs:
run: |
export SUPERDUPER_TEMPLATE=${{ matrix.template }}
export SUPERDUPER_DATA_BACKEND='mongomock://test_db'
cd superduper/templates && ln -s ../../templates/* . && ../../
pytest test/integration/template/test_template.py -s
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### Bug Fixes

## [0.3.0](https://github.com/superduper-io/superduper/compare/0.4.0...0.3.0]) (2024-Nov-02)
## [0.4.1](https://github.com/superduper-io/superduper/compare/0.4.1...0.4.0]) (2024-Nov-03)

#### Changed defaults / behaviours

#### New Features & Functionality

#### Bug Fixes

Include templates data in accessible directory

## [0.4.0](https://github.com/superduper-io/superduper/compare/0.4.0...0.3.0]) (2024-Nov-02)

#### Changed defaults / behaviours

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CURRENT_RELEASE=$(shell git describe --abbrev=0 --tags)
CURRENT_COMMIT=$(shell git rev-parse --short HEAD)

new_release: ## Release a new version of superduper.io
@python3 superduper/misc/release_tools.py
@python superduper/misc/release_tools.py
@echo "** Releasing a version to $(PARENT) parent version"
@echo "** Switching to branch release-$(RELEASE_VERSION)"
@git checkout -b release-$(RELEASE_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.0
0.4.1
2 changes: 1 addition & 1 deletion superduper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

logging = logger.Logging

__version__ = '0.4.0'
__version__ = '0.4.1'


from .base.decorators import code
Expand Down
4 changes: 2 additions & 2 deletions superduper/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def start(
@command(help='Display a template')
def inspect(template: str):
"""Display a template."""
root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
root = os.path.dirname(os.path.dirname(__file__))
from pygments import formatters, highlight, lexers

path = f'{root}/templates/{template}/component.json'
Expand Down Expand Up @@ -98,7 +98,7 @@ def bootstrap(
db = superduper(data_backend)
existing = db.show('template')
if destination is not None:
root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
root = os.path.dirname(os.path.dirname(__file__))
template_directory = os.path.join(root, f'templates/{template}')
print(template_directory)
import shutil
Expand Down
10 changes: 5 additions & 5 deletions superduper/templates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

from superduper import Template

PARENT = Path(__file__).resolve().parent.parent.parent
PARENT = Path(__file__).resolve().parent


def ls():
"""List all available templates."""
return [
x.split('.')[0]
for x in os.listdir(PARENT / "templates")
if not x.startswith('.')
for x in os.listdir(PARENT)
if not x.startswith('.') and not x.startswith('__')
]


def __getattr__(name: str):
t = Template.read(str(PARENT / "templates" / f"{name}"))
requirements_path = str(PARENT / "templates" / f"{name}" / "requirements.txt")
t = Template.read(str(PARENT / f"{name}"))
requirements_path = str(PARENT / f"{name}" / "requirements.txt")
if os.path.exists(requirements_path):
with open(requirements_path, 'r') as f:
t.requirements = [x.strip() for x in f.read().split('\n') if x]
Expand Down

0 comments on commit e7cc241

Please sign in to comment.