-
Notifications
You must be signed in to change notification settings - Fork 469
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
Migrate plugins #2378
Migrate plugins #2378
Conversation
d5a1234
to
29c4ae3
Compare
e4999f3
to
c5e9119
Compare
6eb8da9
to
e742a70
Compare
a985549
to
3316c3c
Compare
- name: Optionally run the base testing | ||
run: | | ||
SUPERDUPER_CONFIG="plugins/${{ matrix.plugin }}/plugin_test/config.yaml" | ||
if [ -f "$SUPERDUPER_CONFIG" ]; then | ||
echo "Running the base testing..." | ||
make unit_testing SUPERDUPER_CONFIG=$SUPERDUPER_CONFIG | ||
make usecase_testing SUPERDUPER_CONFIG=$SUPERDUPER_CONFIG | ||
else | ||
echo "No config file found, skipping..." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugin located under the plugin_test
folder, which includes a config.yaml
file, not only runs its own tests but also uses this configuration file to run test cases for superduper, including both unittest and usecase tests.
d2fca4e
to
a905f01
Compare
a905f01
to
aecb5b7
Compare
|
||
class FieldType(Leaf): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A unified data type identifier used to record native datatypes, replacing the original dtype
in Ibis
.github/workflows/ci_plugins.yaml
Outdated
- name: Optionally run custom CI script | ||
run: | | ||
if [ -f "plugins/${{ matrix.plugin }}/.ci_extend.sh" ]; then | ||
echo "Running custom CI script..." | ||
bash ./plugins/${{ matrix.plugin }}/.ci_extend.sh | ||
else | ||
echo "No custom CI script found, skipping..." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the officially released package to prepare the dependency plugins.
Do this in the next release pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just extract the dependent plugins from the pyproject.toml
scripts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[project.optional-dependencies]
test = [
"vcrpy>=5.1.0",
# Annotation plugin dependencies will be installed in CI
# :CI: plugins/mongodb
]
Added this for installing local dependencies instead of those on PyPI, which is useful when modifying multiple interdependent plugins at the same time. Using the names directly from PyPI will lead to dependencies on outdated versions for running CI.
.github/workflows/ci_plugins.yaml
Outdated
|
||
- name: Install DevKit (docs, testing, etc) | ||
run: | | ||
make install_devkit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should combine these 2 things into .[test]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I especially like how quickly the CI is running now.
What shall we do with "core" plugins/ extensions, for example ext/numpy
? Shouldn't we move this somehow? Also, what is the plan for moving away from the superduper.ext.*
sub-packages? Shall we raise a warning which can become an error later?
e850ae8
to
5d1ab10
Compare
14e6095
to
de31d8f
Compare
We need to retain some core plugins, which are pre-set, and can continue to use this I added the warning, and I think we can directly remove those plugins in the next one or two versions, at which point an import error will be thrown. |
'pymongo': MongoClient, | ||
'ibis': BaseBackend, | ||
"lance": LanceVectorSearcher, | ||
"in_memory": InMemoryVectorSearcher, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have we thought about making vector index implementations as plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should do this later. The VectorSearcher backend should be the plugin, and keep the InMemoryVectorSearcher as pre-set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
@@ -169,57 +137,46 @@ def test_refer_to_applied_item(db): | |||
|
|||
|
|||
def test_column_encoding(db): | |||
import PIL | |||
|
|||
img = PIL.Image.open('test/material/data/test.png') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have removed the Pillow dependency and replaced it with another non-native datatype.
|
||
data = { | ||
"img": PIL.Image.open("test/material/data/test.png"), | ||
"df": pd.DataFrame(np.random.randn(10, 10)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not keep both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have removed the Pillow dependency and replaced it with another non-native datatype.
test/utils/database/query.py
Outdated
@@ -185,14 +160,14 @@ def test_insert_with_auto_schema(db): | |||
datas_from_db = list(table_or_collection.select().execute()) | |||
|
|||
for d, d_db in zip(datas, datas_from_db): | |||
assert d["img"].size == d_db["img"].size | |||
assert d["df"].sum().sum() == d_db["df"].sum().sum() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np.sum(d['df'])
might reduce it
just a small pick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not work with using np.sum(d['df'])
, I changed to d["df"].values.sum()
de31d8f
to
8aafbf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release the specified plugin with the following commit message
[PLUGINS] Bump Version [plugin_name_1 | plugin_name_2]
Release all plugins with the following commit message
[PLUGINS] Bump Version [all]
bb8c05a
to
54ccb3e
Compare
54ccb3e
to
26eccc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
Description
Related Issues
Checklist
make unit_testing
andmake integration-testing
successfully?Additional Notes or Comments