Skip to content

Commit f7a5ae9

Browse files
committed
Updates
1 parent d4fe77b commit f7a5ae9

5 files changed

Lines changed: 58 additions & 142 deletions

File tree

Lines changed: 51 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,76 @@
11
name: Python-Apollo
22

3-
on: ["push", "pull_request"]
3+
on:
4+
push:
5+
branches: [develop, apollo_g7]
6+
pull_request:
7+
branches: [develop]
48

59
jobs:
610
test-python-apollo:
711
name: test-python-apollo
8-
912
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
python-version: [3.9]
13+
1314
steps:
1415
- name: Checkout Apollo
15-
uses: actions/checkout@v2
16-
- name: Set up JDK 1.8
17-
uses: actions/setup-java@v1
16+
uses: actions/checkout@v4
17+
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v4
1820
with:
19-
java-version: 1.8
20-
- name: Run Apollo
21+
distribution: temurin
22+
java-version: 17
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Start Apollo
28+
working-directory: apollo7
2129
run: |
22-
cp test/config/python-apollo-config.groovy apollo-config.groovy
23-
date
24-
./grailsw run-app &
25-
echo "Sleeping here while Apollo builds"
26-
sleep 240
27-
echo "Done sleeping, I hope it is working"
28-
curl -i 'http://localhost:8080/apollo/annotator/system'
29-
- name: Setup python
30-
uses: actions/setup-python@v2
30+
cp ../test/config/python-apollo-config.groovy apollo-config.groovy
31+
./gradlew bootRun > apollo.log 2>&1 &
32+
33+
# Wait for health endpoint
34+
for i in $(seq 1 120); do
35+
response=$(curl -s 'http://localhost:8080/apollo/health/index' 2>/dev/null)
36+
if echo "$response" | grep -q '"status":"ready"'; then
37+
echo "Apollo is ready (${i}s)"
38+
break
39+
fi
40+
if [ $i -eq 120 ]; then
41+
echo "FAIL: Apollo not ready after 120 seconds"
42+
cat apollo.log
43+
exit 1
44+
fi
45+
sleep 1
46+
done
47+
48+
- name: Setup Python
49+
uses: actions/setup-python@v5
3150
with:
32-
python-version: ${{ matrix.python-version }}
33-
- name: Checkout Pypi
34-
uses: actions/checkout@v2
51+
python-version: '3.12'
52+
53+
- name: Checkout python-apollo
54+
uses: actions/checkout@v4
3555
with:
3656
repository: galaxy-genome-annotation/python-apollo
3757
path: python-apollo
3858
ref: master
39-
- name: Python install
59+
60+
- name: Install python-apollo
4061
run: |
41-
pwd
4262
cd python-apollo
43-
pip install "setuptools==68.2.2" nose apollo
44-
- uses: actions/cache@v4
45-
with:
46-
path: ~/.cache/pip
47-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
48-
restore-keys: |
49-
${{ runner.os }}-pip-
50-
- name: Bootstrap
63+
pip install apollo
64+
65+
- name: Bootstrap test data
5166
run: |
52-
pwd
53-
echo "Testing if awake"
54-
curl -i 'http://localhost:8080/apollo/annotator/system'
5567
cd python-apollo
56-
pwd
57-
export ARROW_GLOBAL_CONFIG_PATH=`pwd`/test-data/local-apollo2-arrow.yml
58-
echo "Testing arrow command"
68+
export ARROW_GLOBAL_CONFIG_PATH=$(pwd)/test-data/local-apollo2-arrow.yml
5969
arrow users get_users
60-
echo $ARROW_GLOBAL_CONFIG_PATH
61-
ls $ARROW_GLOBAL_CONFIG_PATH
62-
cat $ARROW_GLOBAL_CONFIG_PATH
6370
./bootstrap_apollo.sh --nodocker
71+
6472
- name: Run tests
6573
run: |
66-
pwd
6774
cd python-apollo
68-
pwd
69-
export ARROW_GLOBAL_CONFIG_PATH=`pwd`/test-data/local-apollo2-arrow.yml
70-
python setup.py nosetests
71-
72-
- uses: actions/cache@v4
73-
with:
74-
path: |
75-
~/.gradle/caches
76-
~/.gradle/wrapper
77-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
78-
restore-keys: |
79-
${{ runner.os }}-gradle-
80-
- name: Cache local Maven repository
81-
uses: actions/cache@v4
82-
with:
83-
path: ~/.m2/repository
84-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
85-
restore-keys: |
86-
${{ runner.os }}-maven-
75+
export ARROW_GLOBAL_CONFIG_PATH=$(pwd)/test-data/local-apollo2-arrow.yml
76+
python -m pytest || python setup.py nosetests

.github/workflows/react-apollo.yml.ignore

Lines changed: 0 additions & 78 deletions
This file was deleted.

apollo7/grails-app/controllers/org/bbop/apollo/AnnotationEditorController.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import org.grails.web.json.JSONObject
1414
import org.springframework.http.HttpStatus
1515
import org.springframework.messaging.handler.annotation.MessageMapping
1616
import org.springframework.messaging.handler.annotation.SendTo
17+
import org.springframework.messaging.simp.SimpMessagingTemplate
1718

1819
import java.lang.reflect.InvocationTargetException
1920
import java.nio.charset.Charset
@@ -45,7 +46,7 @@ class AnnotationEditorController extends AbstractApolloController implements Ann
4546
CannedCommentService cannedCommentService
4647
CannedAttributeService cannedAttributeService
4748
AvailableStatusService availableStatusService
48-
def brokerMessagingTemplate
49+
SimpMessagingTemplate brokerMessagingTemplate
4950

5051

5152
def index() {

apollo7/grails-app/controllers/org/bbop/apollo/LoginController.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ import org.grails.web.json.JSONException
77
import org.grails.web.json.JSONObject
88
import org.springframework.security.core.AuthenticationException
99

10+
import org.springframework.messaging.simp.SimpMessagingTemplate
11+
1012
import jakarta.servlet.http.HttpServletResponse
1113

1214
class LoginController extends AbstractApolloController {
1315

1416
UserService userService
15-
def brokerMessagingTemplate
17+
SimpMessagingTemplate brokerMessagingTemplate
1618

1719
def index() {}
1820

apollo7/grails-app/services/org/bbop/apollo/RequestHandlingService.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import org.grails.web.json.JSONArray
1414
import org.grails.web.json.JSONException
1515
import org.grails.web.json.JSONObject
1616
import org.hibernate.FetchMode
17+
import org.springframework.messaging.simp.SimpMessagingTemplate
1718

1819
/**
1920
* This class is responsible for handling JSON requests from the AnnotationEditorController and routing
@@ -45,7 +46,7 @@ class RequestHandlingService {
4546
GeneProductService geneProductService
4647
ProvenanceService provenanceService
4748
JsonWebUtilityService jsonWebUtilityService
48-
def brokerMessagingTemplate
49+
SimpMessagingTemplate brokerMessagingTemplate
4950

5051

5152
public static final List<String> viewableAnnotationFeatureList = [

0 commit comments

Comments
 (0)