Skip to content

Commit

Permalink
Merge pull request #48 from semi-technologies/weaviate_v1_migration
Browse files Browse the repository at this point in the history
Weaviate v1 migration
  • Loading branch information
StefanBogdan committed Jan 12, 2021
2 parents b773419 + 32520bd commit e0b1638
Show file tree
Hide file tree
Showing 23 changed files with 544 additions and 230 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ notifications:
email:
on_success: change

env:
- DOCKER_COMPOSE_VERSION=1.27.4

jobs:
include:
- stage: "test"
Expand All @@ -13,4 +16,9 @@ jobs:
- pip install -r requirements.txt
script:
- ./test/create_test_config.bash
- python -m unittest test/unit_test.py
- docker-compose -f test/docker-compose.yaml up -d
- sleep 5
- python -m unittest test/integration_test.py
- docker-compose -f test/docker-compose.yaml down
- python cli.py config view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020, SeMI Technologies B.V.
Copyright (c) 2021, SeMI Technologies B.V.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _CLI tool for for Weaviate_
## Installation

Install using: `pip install weaviate-cli`\
Run using: `weaviate-cli --help`
Run using: `weaviate --help`

## Build Status

Expand Down
8 changes: 4 additions & 4 deletions cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
from semi.config.configuration import Configuration
from semi.commands.schema import import_schema, export_schema, truncate_schema
from semi.commands.schema import import_schema, export_schema, delete_schema
from semi.commands.misc import ping, version
from semi.commands.data import delete_all_data, import_data_from_file

Expand Down Expand Up @@ -63,11 +63,11 @@ def schema_export(ctx, filename):
export_schema(_get_config_from_context(ctx), filename)


@schema_group.command("truncate", help="Remove the entire schema and all the data associated with it.")
@schema_group.command("delete", help="Delete the entire schema and all the data associated with it.")
@click.pass_context
@click.option('--force', required=False, default=False, is_flag=True)
def schema_truncate(ctx: click.Context, force):
truncate_schema(_get_config_from_context(ctx), force)
delete_schema(_get_config_from_context(ctx), force)



Expand All @@ -92,7 +92,7 @@ def concept_import(ctx, file, fail_on_error):
import_data_from_file(_get_config_from_context(ctx), file, fail_on_error)


@data_group.command("empty", help="Delete all data objects in weaviate.")
@data_group.command("delete", help="Delete all data objects in weaviate.")
@click.pass_context
@click.option('--force', required=False, default=False, is_flag=True)
def data_empty(ctx, force):
Expand Down
4 changes: 2 additions & 2 deletions publish.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
1. Make sure you set the right version in the `setup.py`
2. Then build the new package:\
`python setup.py bdist_wheel`
`python setup.py sdist bdist_wheel`
3. And check it:\
`twine check dist/*`
4. Check if you are on **Master** in case of full release.
5. **Commit** the most current version to GitHub if this has not been done yet.
6. Make sure you gave the commit of the current version a proper tag:\
`git tag -a '<your tag>' -m '<some message for the tag>' && git push --tags`
tags are either in the form of `0.2.5` or `0.2.5rc0`.
tags are either in the form of `v0.2.5` or `v0.2.5rc0`.
7. Finally publish:\
`twine upload dist/*`
8. After publishing change the version in `setup.py` to the next developement number.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
weaviate-client==1.2.0
click==7.1.2
weaviate-client==2.0.*
click==7.1.2
Empty file added semi/__init__.py
Empty file.
Empty file added semi/commands/__init__.py
Empty file.

0 comments on commit e0b1638

Please sign in to comment.