-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from FREVA-CLINT/solr_api
Solr api
- Loading branch information
Showing
44 changed files
with
1,174 additions
and
580 deletions.
There are no files selected for viewing
This file contains 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 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,38 +1,34 @@ | ||
name: Tests | ||
run-name: ${{ github.actor }} is doing some smoke tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
Smoke-tests: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- name: Set up services | ||
run: docker-compose up -d --remove-orphans | ||
- name: Create conda env | ||
uses: conda-incubator/setup-miniconda@v2 | ||
# https://github.com/marketplace/actions/setup-micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
activate-environment: freva-web | ||
environment-name: freva-web | ||
environment-file: conda-env.yml | ||
python-version: "3.11" | ||
auto-activate-base: false | ||
- name: Run checks in python | ||
run: make tests | ||
- name: Lint python | ||
run: make lint | ||
- name: Prepare node | ||
run: npm install | ||
- name: Lint js formatting | ||
run: npm run lint-format | ||
- name: Lint javascript | ||
run: npm run lint | ||
- name: Test building the prod system | ||
run: npm run build-production | ||
- name: Test building the dev system | ||
run: npm run build | ||
cache-environment: false | ||
cache-downloads: false | ||
init-shell: bash | ||
- name: Lint js code and python | ||
run: micromamba run -n freva-web make lint | ||
- name: Run build checks for js and python smoke tests | ||
run: micromamba run -n freva-web make tests |
This file contains 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 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,3 +1,4 @@ | ||
[submodule "docker/config"] | ||
path = docker/config | ||
url = https://github.com/FREVA-CLINT/freva-service-config.git | ||
branch = main |
This file contains 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 |
---|---|---|
|
@@ -2,16 +2,61 @@ | |
|
||
export EVALUATION_SYSTEM_CONFIG_FILE := $(PWD)/docker/local-eval-system.conf | ||
export EVALUATION_SYSTEM_DRS_CONFIG_FILE := $(PWD)/docker/drs_config.toml | ||
run: | ||
python manage.py runserver | ||
export DJANGO_SUPERUSER_PASSWORD := secret | ||
export DEV_MODE := 1 | ||
|
||
.PHONY: all run runserver runfrontend stopserver stopfrontend stop setup | ||
|
||
all: setup runserver runfrontend | ||
@echo "All services are running in the background." | ||
|
||
dummy-data: | ||
docker/dummy_plugin_runs.sh | ||
python3 docker/solr/ingest_dummy_data.py | ||
|
||
lint: | ||
|
||
setup-django: | ||
python manage.py makemigrations base | ||
python manage.py migrate --fake-initial | ||
python manage.py migrate --fake contenttypes | ||
python manage.py createsuperuser --noinput --username admin --email [email protected] || echo | ||
|
||
setup-node: | ||
npm install | ||
|
||
runserver: | ||
@echo "Starting Django development server..." | ||
python manage.py runserver > runserver.log 2>&1 & | ||
@echo "Django development server is running..." | ||
@echo "To watch the Django server logs, run 'tail -f runserver.log'" | ||
|
||
runfrontend: | ||
@echo "Starting npm development server..." | ||
npm run dev > npm.log 2>&1 & | ||
@echo "npm development server is running..." | ||
@echo "To watch the npm logs, run 'tail -f npm.log'" | ||
|
||
stopserver: | ||
ps aux | grep '[m]anage.py runserver' | awk '{print $$2}' | xargs -r kill | ||
echo "Stopped Django development server..." > runserver.log | ||
|
||
stopfrontend: | ||
pkill -f "npm run dev" | ||
echo "Stopped npm development server..." > npm.log | ||
|
||
stop: stopserver stopfrontend | ||
@echo "All services have been stopped." | ||
|
||
setup: setup-node setup-django dummy-data | ||
|
||
run: runfrontend runserver | ||
|
||
lint: setup-node | ||
npm run lint-format | ||
npm run lint | ||
black -t py310 --check . | ||
|
||
tests: | ||
tests: setup-node | ||
npm run build-production | ||
npm run build | ||
rm -rf node_modules | ||
pytest -vv $(PWD) tests/ |
This file contains 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 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.