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

Batch Aggregation #785

Merged
merged 38 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
430519f
Add Celery and a test route
zwolf Feb 10, 2024
25b7711
Add new dependencies
zwolf Feb 10, 2024
3e0e23c
Test task tests
zwolf Feb 10, 2024
1c3e2fc
Docker updates
zwolf Feb 10, 2024
4af8104
Scripts folder
zwolf Feb 10, 2024
07ae2fa
Setup deploy to test env
zwolf Feb 10, 2024
2e1f841
Link redis container via docker
zwolf Feb 13, 2024
edc1957
Modify test task
zwolf Feb 20, 2024
803d4ed
Add redis service to test workflow
zwolf Feb 20, 2024
7290b82
Hook up services
zwolf Feb 20, 2024
8c593c3
Fix test arguments
zwolf Feb 20, 2024
80e4edd
flake8
zwolf Feb 20, 2024
a94bbd5
newline
zwolf Feb 20, 2024
0504d47
rename and refactor
zwolf Feb 26, 2024
e9d929f
Taking a swing at extraction
zwolf Feb 27, 2024
15e34c9
oops
zwolf Feb 27, 2024
b780f03
update .gitignore
zwolf Feb 27, 2024
ae7adea
Remove deploy files
zwolf Mar 5, 2024
afc4523
Update .gitignore
zwolf Mar 5, 2024
916456c
Clean up test tests
zwolf Mar 12, 2024
0b23229
Add router tests
zwolf Mar 12, 2024
931eeba
Extremely placeholder BA lib tests
zwolf Mar 12, 2024
501ce4d
Only override local import
zwolf Apr 2, 2024
1f945fb
First few batch agg specs
zwolf Apr 2, 2024
c6e8ba9
Updates to BatchAggregation & tests
zwolf May 22, 2024
71528fe
less flake8y
zwolf May 22, 2024
1f8b51f
Add final POST message to Panoptes
zwolf May 28, 2024
e268e89
Merge branch 'master' into batch-aggregation
zwolf May 29, 2024
db95913
Flake
zwolf May 29, 2024
d4635b9
flake
zwolf May 29, 2024
194b0ae
Pull etag before atempting update
zwolf May 29, 2024
55fec65
Remove unnecessary mocks
zwolf Jun 3, 2024
5285b23
Assert result set, not method called
zwolf Jun 4, 2024
8b3db20
clean up spec mocks
zwolf Jun 4, 2024
c2ec0ce
Add permissions checking, fix some specs, refactor Panoptes update
zwolf Jun 4, 2024
76221bd
Flake
zwolf Jun 4, 2024
de7bc99
Use os.path for platform independence
zwolf Jun 4, 2024
ad9682b
Undeleting deploy template
zwolf Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ on:
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
Expand All @@ -30,11 +40,14 @@ jobs:
- name: Run tests
env:
TRAVIS: true # one test is skipped on CI and looks for this env value
REDIS_HOST: redis
CELERY_BROKER_URL: redis://localhost:6379/0
CELERY_RESULT_BACKEND: redis://localhost:6379/0
run: |
coverage run
coverage report
- name: Coveralls
if: ${{ matrix.python-version == 3.10 }}
env:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ endpoints.yml

.vscode/
.noseids
tmp/*
.DS_Store
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ COPY . .
RUN pip install -U .[online,test,doc]

# make documentation
RUN /bin/bash -lc ./make_docs.sh
RUN /bin/bash -lc ./scripts/make_docs.sh

ADD ./ /usr/src/aggregation

ARG REVISION=''
ENV REVISION=$REVISION

# load configs and start flask app
CMD ["bash", "./start-flask.sh"]
CMD ["bash", "./scripts/start-flask.sh"]
51 changes: 48 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,59 @@ services:
args:
REVISION: fake-git-sha-id
volumes:
- ./panoptes_aggregation:/usr/src/aggregation/panoptes_aggregation
- ./:/usr/src/aggregation
- ~/.aws:/root/.aws
environment:
- AWS_REGION=${AWS_REGION}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}
- AWS_SECURITY_TOKEN=${AWS_SECURITY_TOKEN}
- LISTEN_PORT=5000
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- FLASK_DEBUG=1
- FLASK_ENV=development
- LISTEN_PORT=4000
ports:
- "5000:5000"
- "4000:4000"
links:
- redis:redis

worker:
build:
context: ./
args:
REVISION: fake-git-sha-id
command: celery --app panoptes_aggregation.tasks.celery worker --loglevel=info
volumes:
- ./:/usr/src/aggregation
environment:
- FLASK_DEBUG=1
- APP_SETTINGS=project.server.config.DevelopmentConfig
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- FLASK_ENV=development
links:
- redis:redis
depends_on:
- redis

dashboard:
build: .
command: celery --app panoptes_aggregation.tasks.celery flower --port=5555 --broker=redis://redis:6379/0
ports:
- 5556:5555
environment:
- FLASK_DEBUG=1
- APP_SETTINGS=project.server.config.DevelopmentConfig
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
links:
- redis:redis
depends_on:
- redis
- worker

redis:
image: redis
command: redis-server --appendonly yes
120 changes: 0 additions & 120 deletions kubernetes/deployment-production.tmpl

This file was deleted.

Loading
Loading