Skip to content

Commit

Permalink
Merge branch 'release/v0.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
klich3 committed Jan 11, 2024
2 parents 3f55b82 + 2d5b8e3 commit 902a719
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cff-version: 1.2.0

title: Rocket-Store
message: >-
If you use this software, please cite it using the
Expand All @@ -17,4 +18,4 @@ keywords:
- file
- rocket
license: MIT
version: 0.0.9
version: 0.0.10
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,11 @@ twine upload dist/*
```

***Live:***
No need do nothing GitHub have Workflow action its publish auto
No need do nothing GitHub have Workflow action its publish auto

----

### Local dev

In root folder run create virtual env `virtualenv ./venv && . ./venv/bin/activate`
and run `pip install -e .`
31 changes: 30 additions & 1 deletion Samples/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"embeddings": [0.2, 0.31231312, 0.111],
}


out = rs.post("glOtc6EzYQTZEt0J18cU1f4Ycdz1H8WWTDVkBQTp1Gv2BWgb",
"memories", dataInput)

Expand All @@ -27,3 +26,33 @@
"memories", dataInput, Rocketstore._ADD_AUTO_INC)

print(out)


print("1 - UUID ok")
out = rs.post("56685a22-3273-4fda-a9b6-6f5e9f0cd68a",
"56685a22-3273-4fda-a9b6-6f5e9f0cd68a", dataInput, Rocketstore._ADD_AUTO_INC)

print("2 - UUID + _ ok")
out = rs.post("54e2e7228e9e44ec9e17e7848759e867",
"ses_784dac38ee0c4f709bddc0deb0b421bd", dataInput, Rocketstore._ADD_AUTO_INC)


print("3 - valid")
out = rs.post("eval'56685a22-3273-4fda-a9b6-6f5e9f0cd68a'",
"56685a22-3273-4fda-a9b6-6f5e9f0cd68a", dataInput, Rocketstore._ADD_AUTO_INC)

print("4 - UUID ok")
out = rs.post("ses-54e2e7228e9e44ec9e17e7848759e867",
"ses_784dac38ee0c4f709bddc0deb0b421bd", dataInput, Rocketstore._ADD_AUTO_INC)

print("5 - valid")
out = rs.post("var await",
"ses_784dac38ee0c4f709bddc0deb0b421bd", dataInput, Rocketstore._ADD_AUTO_INC)

print("6 - invalid")
out = rs.post("⚠️",
"🙂", dataInput, Rocketstore._ADD_AUTO_INC)

print("7 - invalid")
out = rs.post("�]|[��-��-��-�][�-�]|�[�-�]",
"stetsetᜠse", dataInput, Rocketstore._ADD_AUTO_INC)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "Rocket-Store"
version = "0.0.9"
version = "0.0.10"
authors = [
{ name="Anton Sychev", email="[email protected]" },
]
Expand Down
34 changes: 34 additions & 0 deletions scripts/update-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
#
#
#█▀ █▄█ █▀▀ █░█ █▀▀ █░█
#▄█ ░█░ █▄▄ █▀█ ██▄ ▀▄▀
#
#Author: <Anton Sychev> (anton at sychev dot xyz)
#update-version.sh (c) 2024
#Created: 2024-01-10 21:30:07
#Desc: update version before release
#

version=$(grep 'version =' pyproject.toml | cut -d '"' -f 2)

echo "Current version: $version"

major=$(echo $version | cut -d '.' -f 1)
minor=$(echo $version | cut -d '.' -f 2)
patch=$(echo $version | cut -d '.' -f 3)

patch=$((patch + 1))

new_version="$major.$minor.$patch"

echo "New version: $new_version"

# update src/__version__.py
sed -i "" "s/__version__ = \".*\"/__version__ = \"$new_version\"/g" src/Rocketstore/__version__.py

# update CITATION.cff
sed -i "" "/cff-version:/!s/version: .*/version: $new_version/g" CITATION.cff

# update pyproject.toml
sed -i "" "s/version = \".*\"/version = \"$new_version\"/g" pyproject.toml
2 changes: 1 addition & 1 deletion src/Rocket_Store.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Rocket-Store
Version: 0.0.7
Version: 0.0.9
Summary: Using the filesystem as a searchable database.
Author-email: Anton Sychev <[email protected]>
License: Rocket Store
Expand Down
6 changes: 4 additions & 2 deletions src/Rocketstore/Rocketstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def post(self, collection=None, key=None, record=None, flags=0) -> any:
if len(collection) < 1 or not collection or collection == "":
raise ValueError("No valid collection name given")

if identifier_name_test(collection) == False:
# True = is have illegal characters
if identifier_name_test(collection) == True:
raise ValueError("Collection name contains illegal characters")

# Remove wildcards (unix only)
Expand Down Expand Up @@ -221,10 +222,11 @@ def get(

collection = str(collection or "") if collection else ""

# identifier_name_test - True = is have illegal characters
if (
collection
and len(collection) > 0
and identifier_name_test(collection) == False
and identifier_name_test(collection) == True
):
raise ValueError("Collection name contains illegal characters")

Expand Down
Binary file modified src/Rocketstore/__pycache__/Rocketstore.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Rocketstore/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
__title__ = "Rocketstore"
__description__ = "Rocket Store (Python) - Fast and Simple Database"
__url__ = "https://github.com/klich3/rocket-store-python"
__version__ = "0.0.9"
__version__ = "0.0.10"
__build__ = 0x000031
__author__ = "Anton Sychev"
__author_email__ = "[email protected]"
Expand Down
Binary file modified src/Rocketstore/utils/__pycache__/files.cpython-311.pyc
Binary file not shown.
Loading

0 comments on commit 902a719

Please sign in to comment.