Skip to content
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

Filtering for release/staging - spec #52

Open
dosumis opened this issue Oct 13, 2020 · 5 comments
Open

Filtering for release/staging - spec #52

dosumis opened this issue Oct 13, 2020 · 5 comments
Assignees

Comments

@dosumis
Copy link
Member

dosumis commented Oct 13, 2020

Delete all ds:DataSet where ds.production or not exists(ds.production)

Delete all i:Individual where (ds)-[:has_source]-(i:Individual)<-[:depicts]-(ch:Individual) WHERE ds.production is False or not exists(ds.production) unless the pipeline is configured for staging and i.staging = True

Delete any node where n.block is True
Delete any edge where e.block is True

@Robbie1977 @matentzn - please review

@matentzn
Copy link
Collaborator

Makes sense to me!

Blocking would be really easy to do like that:

  1. select all nodes with blocked=true, delete (ROBOT remove)
  2. ROBOT remove --term n2o:block

@Robbie1977
Copy link
Contributor

Happy with that but @dosumis do you mean 'ds.staging = True' rather than 'i.staging = True'

@dosumis
Copy link
Member Author

dosumis commented Oct 14, 2020

Hi @Robbie1977 - I probably should have described use cases first.

For staging, my understanding was that we want to be able to use it to test small numbers of images in a dataset - hence the tag on individual. I have no objection to being able to use it for a whole dataset too.

In which case:

  • Delete all ds:DataSet where ds.production or not exists(ds.production) unless the pipeline is configured for staging ds.staging = True

  • Delete all i:Individual where (ds)-[:has_source]-(i:Individual)<-[:depicts]-(ch:Individual) WHERE ds.production is False or not exists(ds.production) unless the pipeline is configured for staging and i.staging = True or ds.staging =True

@matentzn
Copy link
Collaborator

STAGING=DEV

  • staging true & prod false: dont delete
  • staging true | prod true: dont delete
  • staging false & prod true: dont delete
  • staging false & prod false: delete

To put more simply:
IF((staging=false || unbound(staging) && prod = false) -----> DELETE

@matentzn
Copy link
Collaborator

Correction:

IF((staging=false || unbound(staging)) && (prod = false || unbound(prod)) ) -----> EMBARGO

matentzn added a commit to VirtualFlyBrain/vfb-pipeline-collectdata that referenced this issue Oct 15, 2020
This pull implements the blocking and staging logics, which are totally independent.
- Blocking is implemented through cypher queries, see process.sh lines 56-57.
- Staging is the rest. We only care here about the embargo logic of staging. So if we embargo, then, depending on whether we are in the prod or dev stage mode (see Dockerfile), we will embargo different things. The logic corresponds to what was discussed [here](VirtualFlyBrain/neo4j2owl#52). The implementation is realised through two different sets of sparql queries (one for prod, one for dev), which apply differently rigorous embargo rules. The prod queries are unchanged, and the embargo rules in dev are tighter (i.e. less stuff gets embargoed).

see #8
see VirtualFlyBrain/neo4j2owl#52
@matentzn matentzn assigned dosumis and unassigned matentzn Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants