Skip to content

Commit

Permalink
remove unused code, add deprecated annotation, makr TODO in ci and sc…
Browse files Browse the repository at this point in the history
…ript, adjust java version for client ci
  • Loading branch information
Thespica committed Oct 9, 2024
1 parent 2ddcda3 commit a87db4b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 16 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
COMMIT_ID: 6a4041e
strategy:
fail-fast: false
# matrix:
# JAVA_VERSION: [ '8' ]
matrix:
JAVA_VERSION: [ '8' ]
steps:
# - name: Install JDK 8
# uses: actions/setup-java@v3
# with:
# java-version: ${{ matrix.JAVA_VERSION }}
# distribution: 'zulu'
- name: Install JDK 11 for server environment
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'

- name: Cache Maven packages
uses: actions/cache@v3
Expand All @@ -61,13 +61,21 @@ jobs:
- name: Prepare env and service
run: |
# $TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
# TODO(@Thespica): Replace the script while server is ready
$TRAVIS_DIR/install-hugegraph-from-source.sh

- name: Install Java ${{ matrix.JAVA_VERSION }} for client
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'zulu'

- name: Run test
run: |
cd hugegraph-client && ls *
mvn test -Dtest=UnitTestSuite -ntp || true
mvn test -Dtest=ApiTestSuite || true
mvn test -Dtest=UnitTestSuite -ntp
mvn test -Dtest=ApiTestSuite
mvn test -Dtest=FuncTestSuite
- name: Upload coverage to Codecov
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/loader-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
run: |
$TRAVIS_DIR/install-hadoop.sh
$TRAVIS_DIR/install-mysql.sh ${{ env.DB_DATABASE }} ${{ env.DB_PASS }}
# $TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
# TODO(@Thespica): Replace the script while server is ready
$TRAVIS_DIR/install-hugegraph-from-source.sh

- name: Run test
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/spark-connector-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
- name: Prepare env and service
run: |
# $TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
# TODO(@Thespica): Replace the script while server is ready
$TRAVIS_DIR/install-hugegraph-from-source.sh

- name: Run test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#
set -ev

# TODO(@Thespica): restore the script while server is ready
#if [[ $# -ne 1 ]]; then
# echo "Must input an existing commit id of hugegraph server" && exit 1
#fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ public class EdgeLabel extends SchemaLabel {
private String parentLabel;
@JsonProperty("frequency")
private Frequency frequency;
// TODO(@Thespica): remove unused documented code
// @JsonProperty("source_label")
// private String sourceLabel;
// @JsonProperty("target_label")
// private String targetLabel;
@JsonProperty("links")
private Set<Map<String, String>> links;
@JsonProperty("sort_keys")
Expand Down Expand Up @@ -263,6 +258,8 @@ public Builder link(String sourceLabel, String targetLabel) {
HashMap<String, String> map = new HashMap<>();
map.put(sourceLabel, targetLabel);
this.edgeLabel.links.add(map);
this.sourceLabel = null;
this.targetLabel = null;
return this;
}

Expand All @@ -286,7 +283,12 @@ public Builder asGeneral() {
}


// TODO(@Thespcia): should be marked as @Deprecated?
/**
* Set the source label of the edge label
* @deprecated
* Suggested use {@link #link(String, String)} to set the source and target label pair
*/
@Deprecated
@Override
public Builder sourceLabel(String label) {
E.checkArgument(this.edgeLabel.links.isEmpty(),
Expand All @@ -296,7 +298,12 @@ public Builder sourceLabel(String label) {
return this;
}

// TODO(@Thespcia): should be marked as @Deprecated?
/**
* Set the target label of the edge label
* @deprecated
* Suggested use {@link #link(String, String)} to set the source and target label pair
*/
@Deprecated
@Override
public Builder targetLabel(String label) {
E.checkArgument(this.edgeLabel.links.isEmpty(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#
set -ev

# TODO(@Thespica): restore the script while server is ready
#if [[ $# -ne 1 ]]; then
# echo "Must input an existing commit id of hugegraph server" && exit 1
#fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#
set -ev

# TODO(@Thespica): restore the script while server is ready
#if [[ $# -ne 1 ]]; then
# echo "Must input an existing commit id of hugegraph server" && exit 1
#fi
Expand Down

0 comments on commit a87db4b

Please sign in to comment.