Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.1 #2589

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/* . && cd ../../
pytest test/integration/template/test_template.py -s
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
run: python -m pip install --upgrade build

- name: Build
run: python -m build
run: |
cp -r templates/* superduper/templates/
python -m build

# smoke-test that build is valid
- name: Check wheel contents
Expand Down Expand Up @@ -115,4 +117,4 @@ jobs:
packages-dir: artifact/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
packages-dir: artifact/
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
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include templates *
recursive-include superduper/rest/out *
recursive-include superduper/templates *
recursive-include superduper/rest/out *
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
Loading