-
Notifications
You must be signed in to change notification settings - Fork 8
16 refactor tests #20
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
Open
alexgrent
wants to merge
77
commits into
master
Choose a base branch
from
16-refactor-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
f12af5c
:sparkles: introduce the molecule type for re when it's used as an in…
cqgong 93a926d
:truck: Move reactome-pwp repos to reactome organisation
EliotRagueneau 23c3467
Merge remote-tracking branch 'origin/dev' into dev
EliotRagueneau 0f875fc
:loud_sound: Make logs use maven properties properly
EliotRagueneau ea366f7
:sparkles: Support bounded physical entity subunits
EliotRagueneau fa72c48
:recycle: Support additional views where relationships have explicit …
EliotRagueneau 7703a31
:white_check_mark: Update some tests
EliotRagueneau 84d9f87
:bug: Ignore new fake fields from ReactomeSchema
EliotRagueneau d4bc5e3
:bug: Fix Class cast issue with getComposedOf
EliotRagueneau ff1c5e6
:card_file_box: Include refs in enhanced cypher query
cqgong 551c88f
Merge branch 'feature/add-molecule-type' into feature/new-pwb-changes
cqgong f815654
:card_file_box: Include authors from publication
cqgong fe64f74
Merge branch 'feature/enhanced-query-with-refs' into feature/new-pwb-…
cqgong cee8703
Ref. tests
alexgrent aba7513
:wheelchair: Access person info for instanceEdit
cqgong 9572242
Test Ref test DB
alexgrent 2f27db7
Merge remote-tracking branch 'origin/feature/nested-components' into …
EliotRagueneau 65bba7e
Merge branch 'refs/heads/feature/nested-components' into feature/new-…
EliotRagueneau 135f2b5
:sparkles: Add diseasePathways
EliotRagueneau db119dd
Advanced linkage service mock ref
alexgrent 9214fc0
:sparkles: Support enhancedQuery for drugs end chemicals
EliotRagueneau 6e5f01b
Test Refactoring
alexgrent 8e676f5
Test Ref CompartmentTest
alexgrent a608cd2
Test Ref Database object
alexgrent ecb2930
Test Ref Database with ID
alexgrent c8ec339
Test Ref DeletedInstanceServiceTest
alexgrent 5069811
Test Ref Delted service test
alexgrent 9e0f8a0
TR Diagram service Test
alexgrent 8e7a754
TR DOI test
alexgrent c99d424
TR Events service Test, change Basetests top level pathway
alexgrent 1ef6346
TR inffered to
alexgrent b31bad6
TR Mapping Service
alexgrent 64a5750
:sparkles: Custom interaction query for new UI
cqgong 9746a06
:loud_sound: Configue logs to use @logging.level@ and say where they …
EliotRagueneau 13d7f66
:adhesive_bandage: Add missing URL to custom interaction
cqgong c6b6120
:mute: Remove neo4j warning
EliotRagueneau 5d38c18
Merge remote-tracking branch 'origin/feature/new-pwb-changes' into fe…
EliotRagueneau e74e5f4
:mute: Remove neo4j warning
EliotRagueneau da229d7
:rotating_light: Avoid error on getDeleted
EliotRagueneau fdf62db
TR InteractionTest
alexgrent 3829429
TR Mapping service test
alexgrent 64f4c40
TR OrthologyServiceTest
alexgrent 12de08d
Base test adapation
alexgrent 77746d9
TR ParticipantServiceTest
alexgrent 68810e5
TR PathwaysService
alexgrent 3a626a5
TR PathwaysService, PersonServiceTest
alexgrent 76c0415
base test adaption
alexgrent e60fb67
physical test service ref
alexgrent caa1e7a
test ref, schem, publication, reference entity
alexgrent 4222424
test ref SchemaDatasetTest
alexgrent 8cfdc88
test ref SortingAspectsTest
alexgrent cfa78cb
test ref species service
alexgrent df55a49
test ref update tracker
alexgrent aa5f991
test ref bug Physical Entity
alexgrent af8b22c
test StabilityAndConsistencyTest
alexgrent cd08eb9
bug MappingService
alexgrent cb4a920
bug InteractionTest
alexgrent cde77c9
bug SpeciesServiceTest
alexgrent 70a654b
Merge remote-tracking branch 'origin/feature/new-pwb-changes' into 16…
alexgrent 94e1944
bug db version
alexgrent 7732ca8
GKinstance test
alexgrent c5bec12
test ref
alexgrent 139ae25
test ref BUG fix
alexgrent 3305d00
test hysical entity bug fix
alexgrent e6a1e4d
test add ewas data
alexgrent 92d81b3
test ref
alexgrent 2c2b849
test ref
alexgrent ce3b3d1
Ref Tests
alexgrent 80d8ece
Location pathway browser
alexgrent 21341b2
bug test
alexgrent c970a2b
bug test
alexgrent 756d447
Relationship refactoring
alexgrent 2baf75e
base test
alexgrent f2ec762
add modifcation Enum
alexgrent 9948241
enum reacitonType
alexgrent 3fde312
base test
alexgrent 6f4e2a0
hierachy test
alexgrent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,18 @@ | ||
| <img src=https://cloud.githubusercontent.com/assets/6883670/22938783/bbef4474-f2d4-11e6-92a5-07c1a6964491.png width=220 height=100 /> | ||
|
|
||
| Aspect-Oriented Programming with Spring | ||
| Aspect Oriented Programming with Spring | ||
| === | ||
|
|
||
| :warning: Changes in this package have to be taken carefully, considering it is going to reflect in the whole application | ||
|
|
||
| ### What is Aspect-Oriented Programming - AOP? | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that was better before |
||
| Spring AOP framework is used to modularize cross-cutting concerns in aspects. Simply, it’s just an interceptor to intercept some processes, for example, when a method is executed, Spring AOP can hijack the executing method, and add extra functionality before or after the method execution. The most used feature is logging. | ||
| Spring AOP framework is used to modularize cross-cutting concerns in aspects. Simply, t’s just an interceptor to intercept some processes, for example, when a method is execute, Spring AOP can hijack the executing method, and add extra functionality before or after the method execution. The most used feature is logging. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that was better before |
||
| However, in Reactome, we are taking benefit of this concept in order to implement our own Lazy-Loading mechanism. This functionality is also available in ORM frameworks, such as, Hibernate and to achieve this they are implementing AOP concepts. Sorting and Logging aspect are present as well. | ||
|
|
||
| Complete information on Spring AOP you'll find [here](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html). | ||
| Complete information of Spring AOP you'll find [here](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/aop.html). | ||
|
|
||
| ### What are the `@PointCut` in Reactome for LazyLoading? | ||
| ### What are the `@PointCut` in Reactome for LazyLoading ? | ||
|
|
||
| ```java | ||
| execution(public java.util.Collection<org.reactome.server.graph.domain.model.DatabaseObject+>+ org.reactome.server.graph.domain.model.*.get*(..)) | ||
|
|
@@ -24,7 +24,7 @@ execution(public org.reactome.server.graph.domain.model.DatabaseObject+ org.reac | |
| ``` | ||
| Intercepting ALL the getters in our Domain Model whose return type is `DatabaseObject` or `instance of` | ||
|
|
||
| ### How does it work? | ||
| ### How does it work ? | ||
|
|
||
| Mainly, we are loading DEPTH{2} data from the graph without any relationship previously loaded, only identifiers. Once intercepted, the code checks whether the AOP is enabled and whether the object has been loaded previously. Substantially using Java Reflection, the code is capable to identify all the information regarding the method that has been intercepted, for instance, return type (`Collection` or `DatabaseObject`) and `@Relationship` which contains important information for querying against the Graph. Up to this point, the data have been retrieve and the code invokes the setter and proceed. | ||
|
|
||
|
|
@@ -95,19 +95,19 @@ public LazyFetchAspect lazyFetchAspect() { | |
| </plugin> | ||
| ``` | ||
|
|
||
| #### What is the flag `enableAOP`? | ||
| #### What is the flag `enableAOP` ? | ||
|
|
||
| The AOP is enabled by default, but in certain projects like [Content Service](https://github.com/reactome/content-service.git) where we respond a serialised JSON, the `@PointCut` will be invoked everywhere, every time, endless times. Thus, given the `Content Service` requirements, it makes sense that we disable this feature. However, we kept it enabled in the [Data Content](https://github.com/reactome/data-content). | ||
| The AOP is enabled by default, but in certain projects like [Content Service](https://github.com/reactome/content-service.git) where we respond a serialised JSON, the `@PointCut` will be invoked every where, every time, endless times. Thus, given the requirements of the `Content Service` it makes sense that we disable this feature. However, in the [Data Content](https://github.com/reactome/data-content) we kept it enabled. | ||
|
|
||
|
|
||
| = | ||
|
|
||
| ### SortingAspect? | ||
| ### SortingAspect ? | ||
|
|
||
| Intercepting ALL the getters in our Domain Model whose return type is `Collection<? extends DatabaseObject>` and sorting the list based on the `displayName`. | ||
|
|
||
| = | ||
|
|
||
| ### LoggingAspect? | ||
| ### LoggingAspect ? | ||
|
|
||
| Logging everything at the service level. The package `service` is being intercepted to measure the execution time. | ||
| Logging everything at the service level. The package `service` is being intercepted in order to measure the execution time. | ||
10 changes: 10 additions & 0 deletions
10
src/main/java/org/reactome/server/graph/domain/annotations/StoichiometryView.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package org.reactome.server.graph.domain.annotations; | ||
|
|
||
| public class StoichiometryView { | ||
|
|
||
| public interface Flatten { } | ||
|
|
||
| public interface Nested { } | ||
|
|
||
| public interface NestedAggregated extends Nested { } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 29 additions & 24 deletions
53
src/main/java/org/reactome/server/graph/domain/model/CandidateSet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 21 additions & 8 deletions
29
src/main/java/org/reactome/server/graph/domain/model/Cell.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
that was better before