You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For changes that takes more than a day, we recommend you to leave a comment on the issue like **`I'm working on it`** or **`Can I work on this issue?`** to avoid duplicating work.
19
+
❤️ Contributors, please refer to 📙[Contributing Guide](https://cocoindex.io/docs/about/contributing).
20
+
Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like **`I'm working on it`** or **`Can I work on this issue?`** to avoid duplicating work. Our [Discord server](https://discord.com/invite/zpA9S2DR7s) is always open and friendly.
Copy file name to clipboardExpand all lines: docs/docs/about/contributing.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,20 @@ We tag issues with the ["good first issue"](https://github.com/cocoindex-io/coco
23
23
## Start hacking! Setting Up Development Environment
24
24
Following the steps below to get cocoindex build on latest codebase locally - if you are making changes to cocoindex funcionality and want to test it out.
Other arguments can be passed in as positional arguments or keyword arguments, aftert the function spec.
161
+
Other arguments can be passed in as positional arguments or keyword arguments, after the function spec.
168
162
169
163
<Tabs>
170
164
<TabItemvalue="python"label="Python"default>
@@ -300,6 +294,29 @@ CocoIndex provides a common way to configure indexes for various storages.
300
294
301
295
## Miscellaneous
302
296
297
+
### Target Declarations
298
+
299
+
Most time a target storage is created by calling `export()` method on a collector, and this `export()` call comes with configurations needed for the target storage, e.g. options for storage indexes.
300
+
Occasionally, you may need to specify some configurations for target storage out of the context of any specific data collector.
301
+
302
+
For example, for graph database targets like `Neo4j`, you may have a data collector to export data to Neo4j relationships, which will create nodes referenced by various relationships in turn.
303
+
These nodes don't directly come from any specific data collector (consider relationships from different data collectors may share the same nodes).
304
+
To specify configurations for these nodes, you can *declare* spec for related node labels.
305
+
306
+
`FlowBuilder` provides `declare()` method for this purpose, which takes the spec to declare, as provided by various target types.
307
+
308
+
<Tabs>
309
+
<TabItemvalue="python"label="Python"default>
310
+
311
+
```python
312
+
flow_builder.declare(
313
+
cocoindex.storages.Neo4jDeclarations(...)
314
+
)
315
+
```
316
+
317
+
</TabItem>
318
+
</Tabs>
319
+
303
320
### Auth Registry
304
321
305
322
CocoIndex manages an auth registry. It's an in-memory key-value store, mainly to store authentication information for a backend.
@@ -310,11 +327,10 @@ Operation spec is the default way to configure a backend. But it has the followi
310
327
* Once an operation is removed after flow definition code change, the spec is also gone.
311
328
But we still need to be able to drop the backend (e.g. a table) by `cocoindex setup` or `cocoindex drop`.
312
329
313
-
314
330
Auth registry is introduced to solve the problems above. It works as follows:
315
331
316
332
* You can create new **auth entry** by a key and a value.
317
-
* You can references the entry by the key, and pass it as part of spec for certain operations. e.g. `Neo4jRelationship` takes `connection` field in the form of auth entry reference.
333
+
* You can references the entry by the key, and pass it as part of spec for certain operations. e.g. `Neo4j` takes `connection` field in the form of auth entry reference.
0 commit comments