MarkAPI is a project designed to tag, validate, and convert XML documents in the SciELO publishing context. It offers tools for:
- Tagging XML structure and content
- Validating XML against defined schemas, business rules and content
- Converting XML to HTML, DOCX, and PDF
License: GPLv3
You can use Docker directly or via make. To see available commands:
make helpExample output:
Usage: make [target] [argument] ...
Argument:
compose = {compose_file_name}
Targets:
help Show this help
app_version Show app version
vcs_ref Show last commit ref
build_date Show build date
build Build app using $(COMPOSE_FILE_DEV)
up Start app using $(COMPOSE_FILE_DEV)
logs Show logs using $(COMPOSE_FILE_DEV)
stop Stop app using $(COMPOSE_FILE_DEV)
ps Show containers using $(COMPOSE_FILE_DEV)
rm Remove containers using $(COMPOSE_FILE_DEV)
django_shell Open Django shell
wagtail_sync Sync Wagtail page fields
wagtail_update_translation_field Update Wagtail translation fields
django_createsuperuser Create Django superuser
django_bash Bash into Django container
django_test Run Django tests
django_fast Run fast Django tests
django_makemigrations Make migrations
django_migrate Apply migrations
django_makemessages Run makemessages
django_compilemessages Run compilemessages
django_dump_auth Dump Django auth data
django_load_auth Load Django auth data
dump_data Dump database to .sql
restore_data Restore database from .sqlBuild the development environment:
make build compose=local.yml
# or simply
makeStart the project:
make upStop the project:
make stopTo use a custom .yml or environment, copy .envs and compose folders, then run:
make <target> compose=your_config.ymlThe stack uses two Docker Compose files:
local.yml(development)production.yml(production)
Refer to the settings documentation.
- Normal user: Sign up via UI. Confirm email using the console output.
- Superuser: Run:
python manage.py createsuperuserUse different browsers to test both user types simultaneously.
mypy coreRun tests and generate coverage report:
coverage run -m pytest
coverage html
open htmlcov/index.htmlOr just:
pytestTo start a worker:
cd core
celery -A config.celery_app worker -l infoEnsure you're in the correct directory (core) for Celery to work properly.
A local SMTP server with web UI is included.
Access at: http://127.0.0.1:8025
See Docker deployment docs for details.
Sentry is pre-configured for logging. Set the DSN URL in production.
Signup at: https://sentry.io/signup/?code=cookiecutter
See full Docker deployment guide.