Skip to content

[project][ENG-7225] share clean(up)grade 2025 (milestone 2: upgrade) #850

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

Draft
wants to merge 53 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8664265
delete (some) sharev2 api [ENG-7388]
aaxelb Mar 5, 2025
f83fa72
delete sharev2 ingest, models [ENG-7389][ENG-7390]
aaxelb Mar 5, 2025
5232fef
wip
aaxelb Mar 5, 2025
1346073
wip
aaxelb Mar 6, 2025
ba7ac2f
wip
aaxelb Mar 6, 2025
8cb4987
wipwip
aaxelb Mar 6, 2025
1f3da71
wip
aaxelb Mar 6, 2025
f3ed6fc
wip
aaxelb Mar 6, 2025
a8d6daa
wip
aaxelb Mar 6, 2025
fea31e7
wip
aaxelb Mar 6, 2025
8f0fb3e
get tests passing; remove SourceIcon
aaxelb Mar 7, 2025
6092fa2
tests.trove.factories
aaxelb Mar 7, 2025
7dfe2b7
fix: randomly failing test
aaxelb Mar 7, 2025
3a01660
update github actions workflow
aaxelb Mar 7, 2025
58199b8
remove 'behave' run
aaxelb Mar 7, 2025
78925f3
chore: remove ember-share handling [ENG-7392]
aaxelb Mar 11, 2025
0edfb79
trim requirements
aaxelb Mar 11, 2025
0ab0a9a
wip
aaxelb Mar 12, 2025
c5e985b
removed share.bin and sharectl and moved to django management commands
bodintsov Mar 12, 2025
b0e8bbd
wip
aaxelb Mar 12, 2025
a4ffaf7
reverted changes to changelog, updated docker-compose and moved tests
bodintsov Mar 13, 2025
4ddca1f
fixed test_shtrove_commands, fix flake8
bodintsov Mar 13, 2025
3b35af3
Merge pull request #849 from bodintsov/feature/cleanup_remove_sharectl
aaxelb Mar 13, 2025
d4cf420
Merge branch 'feature/share-cleanupgrade-2025' into mob/2025-03-05
aaxelb Mar 13, 2025
654423d
Merge pull request #847 from aaxelb/mob/2025-03-05
aaxelb Mar 13, 2025
af289b4
Merge branch 'develop' into feature/share-cleanupgrade-2025
aaxelb Mar 13, 2025
947ba8d
updated python version, updated django, updated containers, images, r…
bodintsov Apr 7, 2025
017a465
fix tests, updated dockerfile
bodintsov Apr 8, 2025
fd3268a
Merge pull request #853 from bodintsov/feature/share-cleanupgrade-pyt…
aaxelb Apr 9, 2025
07780e2
fix: ignore deleted-but-still-indexed items
aaxelb Apr 11, 2025
0ff7439
fix: configure sentry_sdk
aaxelb Apr 11, 2025
c20fff9
updated dev requirements
bodintsov Apr 15, 2025
859a77b
Merge pull request #854 from bodintsov/feature/share-cleanupgrade-202…
aaxelb Apr 15, 2025
8465f08
wip: poetry
aaxelb Mar 26, 2025
8a1ebac
wip
aaxelb Mar 26, 2025
7b92a4f
wip
aaxelb Mar 26, 2025
2b137f6
shtrove not installable (...yet)
aaxelb Mar 26, 2025
68bf437
wip (poetry run)
aaxelb Mar 26, 2025
512f89d
try specifying source for coverage
aaxelb Mar 27, 2025
bb24a8e
wip (python version range)
aaxelb Apr 9, 2025
2514ad6
remove py3.10 tests
aaxelb Apr 9, 2025
636de98
bump deps; fix build after py-upgrade merge
aaxelb Apr 9, 2025
95790ca
poetry config: explicit package-mode
aaxelb Apr 9, 2025
2448562
remove elasticsearch5 use
aaxelb Apr 9, 2025
3b7176b
remove trove_indexcard_flats index strategy
aaxelb Apr 9, 2025
2a50077
use python deps from the built image
aaxelb Apr 9, 2025
28e507f
Revert "use python deps from the built image"
aaxelb Apr 9, 2025
8502306
fix requirements in docker-compose
aaxelb Apr 9, 2025
25bf800
clarify poetry venv usage
aaxelb Apr 10, 2025
bd055bb
finish removing elasticsearch5
aaxelb Apr 10, 2025
19344e1
fix: dockerfile warnings
aaxelb Apr 15, 2025
e698c8d
add toml (for coveralls)
aaxelb Apr 17, 2025
8bbaada
Merge pull request #852 from aaxelb/mob/2025-03-26
aaxelb Apr 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .docker-compose.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672
DATABASE_HOST=postgres
ELASTICSEARCH8_URL=https://elastic8:9200/
# ELASTICSEARCH5_URL=http://elasticsearch:9200/
EMBER_SHARE_URL=http://frontend:4200
LOGIN_REDIRECT_URL=http://localhost:8003/
OSF_API_URL=http://localhost:8000
RABBITMQ_HOST=rabbitmq
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ docker-compose.yml
.gitignore
celerybeat.pid
/static/
.venv/

/au.*/
/be.*/
Expand Down
35 changes: 12 additions & 23 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10'] # TODO: 3.11, 3.12
postgres-version: ['15', '17']
python-version: ['3.13']
postgres-version: ['17']
runs-on: ubuntu-latest
services:
postgres:
Expand All @@ -37,12 +37,6 @@ jobs:
cluster.initial_master_nodes: singlenode
ports:
- 9208:9200
elasticsearch5:
image: elasticsearch:5.4
env:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
ports:
- 9205:9200
rabbitmq:
image: rabbitmq:management
ports:
Expand All @@ -54,33 +48,28 @@ jobs:
- name: install non-py dependencies
run: sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev libpq-dev git gcc

- name: set up python${{ matrix.python-version }}
- name: Install poetry
run: pipx install poetry

- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
dev-requirements.txt

- name: install py dependencies
run: pip install -r dev-requirements.txt
cache: 'poetry'

- name: install share
run: python setup.py develop
- name: install despondencies
run: poetry install --with dev

- name: flake it
run: flake8 .
run: poetry run flake8 .

- name: run tests
run: |
coverage run -m pytest --create-db
coverage run --append -m behave
coverage xml -o _shtrove_coverage.xml
poetry run coverage run -m pytest --create-db
poetry run coverage xml -o _shtrove_coverage.xml
env:
DATABASE_PASSWORD: postgres
ELASTICSEARCH8_URL: http://localhost:9208/
# ELASTICSEARCH5_URL: http://localhost:9205/

- name: coveralls
uses: coverallsapp/github-action@v2
Expand Down
38 changes: 26 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-slim-bullseye as app
FROM python:3.13-slim-bullseye AS app

RUN apt-get update \
&& apt-get install -y \
Expand All @@ -25,35 +25,49 @@ RUN update-ca-certificates
RUN mkdir -p /code
WORKDIR /code

RUN pip install -U pip
RUN pip install uwsgi==2.0.21
###
# python dependencies

COPY ./requirements.txt /code/requirements.txt
COPY ./constraints.txt /code/constraints.txt
# note: installs dependencies on the system, roundabouts `/usr/local/lib/python3.13/site-packages/`

RUN pip install --no-cache-dir -c /code/constraints.txt -r /code/requirements.txt
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_OPTIONS_ALWAYS_COPY=1 \
POETRY_VIRTUALENVS_CREATE=0 \
POETRY_VIRTUALENVS_IN_PROJECT=0 \
POETRY_CACHE_DIR=/tmp/poetry-cache \
POETRY_HOME=/tmp/poetry-venv

RUN python -m venv $POETRY_HOME

RUN $POETRY_HOME/bin/pip install poetry==2.1.1

COPY pyproject.toml .
COPY poetry.lock .

RUN $POETRY_HOME/bin/poetry install --compile

RUN apt-get remove -y \
gcc \
zlib1g-dev
zlib1g-dev \
&& apt-get autoremove -y

COPY ./ /code/

RUN python manage.py collectstatic --noinput

ARG GIT_TAG=
ARG GIT_COMMIT=
ENV VERSION ${GIT_TAG}
ENV GIT_COMMIT ${GIT_COMMIT}

RUN python setup.py develop
ENV VERSION=${GIT_TAG}
ENV GIT_COMMIT=${GIT_COMMIT}

CMD ["python", "manage.py", "--help"]

### Dist
FROM app AS dist

RUN $POETRY_HOME/bin/poetry install --compile --only deploy

### Dev
FROM app AS dev

RUN pip install --no-cache-dir -c /code/constraints.txt -r /code/dev-requirements.txt
RUN $POETRY_HOME/bin/poetry install --compile --only dev
3 changes: 0 additions & 3 deletions api/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ def initial(self, request, *args, **kwargs):
class RootView(views.APIView):
def get(self, request):
links = {
'normalizeddata': 'api:normalizeddata-list',
'rawdata': 'api:rawdatum-list',
'sourceregistrations': 'api:sourceregistration-list',
'sources': 'api:source-list',
'users': 'api:user-list',
'schema': 'api:schema',
'status': 'api:status',
'rss': 'api:rss',
'atom': 'api:atom',
Expand Down
19 changes: 0 additions & 19 deletions api/formattedmetadatarecords/serializers.py

This file was deleted.

7 changes: 0 additions & 7 deletions api/formattedmetadatarecords/urls.py

This file was deleted.

15 changes: 0 additions & 15 deletions api/formattedmetadatarecords/views.py

This file was deleted.

30 changes: 0 additions & 30 deletions api/normalizeddata/serializers.py

This file was deleted.

7 changes: 0 additions & 7 deletions api/normalizeddata/urls.py

This file was deleted.

108 changes: 0 additions & 108 deletions api/normalizeddata/views.py

This file was deleted.

7 changes: 0 additions & 7 deletions api/schemas/urls.py

This file was deleted.

13 changes: 0 additions & 13 deletions api/schemas/views.py

This file was deleted.

18 changes: 0 additions & 18 deletions api/sourceregistrations/serializers.py

This file was deleted.

Loading