-
Notifications
You must be signed in to change notification settings - Fork 18
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
feature/SPRIND-83 #267
feature/SPRIND-83 #267
Conversation
…SPRIND-83 # Conflicts: # pnpm-lock.yaml
…nstructor of the plugin
…ource/SSI-SDK into feature/SPRIND-83_test # Conflicts: # packages/anomaly-detection/src/agent/AnomalyDetection.ts
# Conflicts: # packages/tsconfig.json # pnpm-lock.yaml
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.
Found bad import
@@ -0,0 +1,16 @@ | |||
import {IAgentContext, IPluginMethodMap} from '@veramo/core' | |||
import {AnomalyDetectionStoreArgs, IAnomalyDetectionStore} from "@sphereon/ssi-sdk.anomaly-detection-store"; | |||
import {Optional} from "nx/src/project-graph/plugins"; |
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.
/src import
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.
It looks like a mixed it up with Java 🙈
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.
Replaced it with a Partial
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.
LGTM when import is fixed.
When this is not possible for some reason, add a comment
|
||
--- | ||
|
||
A Veramo anomaly detection store plugin. This plugin stores the result of the location lookup which is part of the anomaly detection 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.
Please stop using the word Veramo everywhere. This really is not a Veramo 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.
Replaced Veramo with Sphereon
|
||
const agent = createAgent<IAnomalyDetectionStore>({ | ||
plugins: [ | ||
new AnomalyDetectionStore({ |
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 should be renamed to GeoLocationStore
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.
geolocation is a single word: https://dictionary.cambridge.org/dictionary/english/geolocation. Doesn't it make more sense to rename it to GeolocationStore?
### Lookup a location: | ||
|
||
```typescript | ||
const result = await agent.lookupLocation({ |
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.
Agent plugin should prefix something, to ensure that a developer can actually make head or tails about the 100+ methods available in a plugin.
So geoLookupLocation makes sense
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.
geolocation is a single word: https://dictionary.cambridge.org/dictionary/english/geolocation. If we want to prefix the method with geo, doesn't it make more sense to call it geolocationLookup?
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
/** | ||
* {@inheritDoc IAnomalyDetectionStore} | ||
*/ | ||
export class AnomalyDetectionStore implements IAgentPlugin { |
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.
Please rename to GeoLocationStore. This is only about Geo locations, which happens to be part of anomaly detection. We will not store other data in this plugin in the future.
So rename the class and also this store plugin. But do not rename the anomaly-detection plugin itself. That just uses the renamed GeoLocationStore module/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.
geolocation is a single word: https://dictionary.cambridge.org/dictionary/english/geolocation. Doesn't it make more sense to rename it to GeolocationStore?
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.
of course
No description provided.