Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b435bc5
Primeros pasos de label
luisza Apr 27, 2026
4b4bb25
Merge branch 'development' into labels
luisza Apr 27, 2026
f782b1e
Merge remote-tracking branch 'origin/development' into labels
luisza Jun 27, 2026
abf3008
Integra motor de etiquetas SGA (label_engine) coherente con el recipi…
luisza Jun 27, 2026
080807a
fixed translation
liwBh Jul 3, 2026
9c4c6df
Updated form view
liwBh Jul 3, 2026
a981f5d
Fixed translation table
liwBh Jul 3, 2026
cd62530
fixed duplicate registry
liwBh Jul 3, 2026
dc4e81d
Updated view companies
liwBh Jul 3, 2026
e55b96a
advances in the labels
Kejebo Jul 7, 2026
49e7dab
advances in the labels
Kejebo Jul 7, 2026
cfadb8c
advanced in create recipients
Kejebo Jul 9, 2026
7f71339
Added permissions in recipient module
Kejebo Jul 9, 2026
5dd8a83
merge with development
Kejebo Jul 17, 2026
d9a10bb
advance in move substances
Kejebo Jul 24, 2026
82a41c5
new migrations
Kejebo Aug 5, 2026
20d1e50
Migrate sustancecharaterics of laboratory to sga
Kejebo Aug 5, 2026
66020d4
update reports
Kejebo Aug 5, 2026
99d63f2
added new translations
Kejebo Aug 5, 2026
eeeeb4d
updated urls
Kejebo Aug 5, 2026
22b1ef8
fixed error in js
Kejebo Aug 11, 2026
43f0f6c
fixed error in js
Kejebo Aug 11, 2026
fdd5de2
Centraliza características de sustancias y trazabilidad de SDS en SGA
luisza Aug 15, 2026
9bc90e0
Updated coverage.svg
github-actions[bot] Aug 15, 2026
5372f4a
Merge branch 'editor-v2' into predevelopment
luisza Aug 15, 2026
2107936
Repara el etiquetado: frases combinadas, nombre, tamaño y estado físico
luisza Aug 15, 2026
e7bd07a
Completa las frases GHS que la base guardaba a medias
luisza Aug 15, 2026
e6be834
Corrige la ortografía de las indicaciones de peligro GHS
luisza Aug 15, 2026
31c0cad
Formatea con black el código nuevo del etiquetado
luisza Aug 15, 2026
8c95ce7
Acelera las pruebas de Selenium y cubre el flujo de etiquetado
luisza Aug 16, 2026
0485a27
Repara 4 de las 13 pruebas Selenium y el permiso que las causaba
luisza Aug 16, 2026
f3efe22
Acota el cuelgue de las pruebas de reservaciones
luisza Aug 16, 2026
f9a6f55
Cierra el cuelgue de Selenium: la suite de capacitación queda en verde
luisza Aug 16, 2026
6fad01e
Repara el fixture de Selenium que quedó apuntando al modelo movido
luisza Aug 16, 2026
b1538c0
Add more test
luisza Aug 20, 2026
6c1d432
Merge branch 'predevelopment' of github.com:Solvosoft/organilab into …
luisza Aug 20, 2026
58e8ff9
Updated coverage.svg
github-actions[bot] Aug 20, 2026
c32d5ef
Etapas 0-8 djgentelella 0.6.0: análisis, limpieza, async_notification…
luisza Aug 29, 2026
475fa30
Retira objectview_list, duplicado vacío de las pantallas de objetos
luisza Aug 29, 2026
390ffb5
Convierte el listado IPER a ObjectCRUD sobre viewset (etapa 10c)
luisza Aug 29, 2026
52dabe9
Convierte el listado de Register User QR a ObjectCRUD y deja el lint …
luisza Aug 29, 2026
c03c24e
Migra los hijos de ProcedureStep a BaseInlineObjectManagement (etapa …
luisza Aug 29, 2026
b8ea909
Cierra la sección 10c del roadmap con el resumen de conversiones
luisza Aug 29, 2026
6e8e70b
Convierte los modales a mano a los includes de la lib (etapa 10a)
luisza Aug 29, 2026
b85f477
Reemplaza django-location-field por GTPointField/MapPointInput (etapa…
luisza Aug 29, 2026
eb3a9d2
Marca la etapa 10 como hecha en el roadmap
luisza Aug 29, 2026
da0a0a6
Rehabilita los 3 tests selenium rescatados y cierra las etapas 9 y 11
luisza Aug 29, 2026
0fc87bf
Valida la migración completa: unit 902/902, selenium íntegro en verde…
luisza Aug 30, 2026
dc01a74
Registra el fix de orden de get_data en la lista de cambios a djgente…
luisza Aug 30, 2026
d023066
Adopta el history de djgentelella con relaciones y extras JSON (proye…
luisza Aug 30, 2026
0a29105
Adopta la papelera org-scoped con pilotos Protocol y Procedure (proye…
luisza Aug 30, 2026
b7b2dee
Documenta la etapa 14 (labview): plan ejecutable y arquitectura
luisza Aug 30, 2026
ed15c3a
Añade el prototipo visual de la vista de laboratorio (etapa 14)
luisza Aug 30, 2026
4fd890c
Inventaria en la etapa 14 las funciones que la vista actual no puede …
luisza Aug 30, 2026
b6501fc
Reconstruye el prototipo del labview con las funciones integradas
luisza Aug 30, 2026
a8f5558
Cierra el proyecto 13: papelera sin fugas, residuos fuera y fase D di…
luisza Aug 30, 2026
f253c1e
Construye el labview sobre API: dataconfig canónico, árbol, editor y …
luisza Aug 30, 2026
fd131a1
Prueba el módulo de dataconfig y cierra la fuga que borraba el mueble
luisza Aug 30, 2026
a58ea01
Prueba la matriz de permisos del labview por el camino real
luisza Aug 30, 2026
0deefbc
Prueba el aislamiento entre inquilinos y la equivalencia de las acciones
luisza Aug 30, 2026
ade2f08
Prueba el inventario de funciones y completa los permisos concedibles
luisza Aug 30, 2026
9d4a6e4
Fija la forma del árbol y quita el N+1 del overlay de riesgo
luisza Aug 30, 2026
a382245
Genera las dos migraciones pendientes y fija el estado con una prueba
luisza Aug 30, 2026
c26d830
Añade el smoke selenium del labview y repara el repintado del editor
luisza Aug 31, 2026
9c6e6c7
Salda la deuda menor: pin de la librería, Chart.js y overrides muertos
luisza Aug 31, 2026
0a8332c
Traduce las cadenas nuevas del labview y corrige las que llegaron tor…
luisza Aug 31, 2026
a0ee986
Corta el deadlock entre el hilo del live server y el flush del teardown
luisza Aug 31, 2026
6e36b58
Clasifica las rutas y recorre las páginas con un smoke sin navegador
luisza Aug 31, 2026
0d1f281
Hace que el Makefile traiga su propio entorno y sus herramientas
luisza Aug 31, 2026
e7876ca
Merge remote-tracking branch 'origin/development' into labview
luisza Sep 1, 2026
68376d6
Fixed requirements for texting
luisza Sep 1, 2026
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
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@ Command to update users roles
- python manage.py update_roles
- python manage.py clean_orphaned_profilepermissions

09/07/2026
Commands to update users roles and permissions
- python manage.py update_roles
- python manage.py load_urlname_permissions

03/07/2026
Command to Gestion SGA
- python manage.py merge_duplicate_warning_words

31/06/2026
Command to update users roles
- python manage.py update_roles
- python manage.py load_urlname_permissions


25/06/2026
Command to update risk zones
- python manage.py reorder_zones
Expand Down
137 changes: 102 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
.PHONY: help clean clean-pyc clean-build list test test-parallel test-selenium test-selenium-4 test-selenium-xvfb docs release sdist
.PHONY: help clean clean-pyc clean-build list setup check-env venv-info url-inventory url-inventory-check test-urls test test-parallel test-selenium test-selenium-4 test-selenium-xvfb test-selenium-bitacora docs release sdist

# Variables
setup_version := `python3 src/organilab/__init__.py`
ROOT_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
VENV ?= $(ROOT_DIR)/.venv
# Si el entorno virtual existe se usa siempre, sin necesidad de activarlo; si no,
# se cae al python del PATH para no romper quien ya trabaje dentro de otro venv.
PYTHON ?= $(shell test -x $(VENV)/bin/python && echo $(VENV)/bin/python || command -v python || command -v python3)
SYSTEM_PYTHON ?= python3

setup_version := `$(PYTHON) src/organilab/__init__.py`
current_path := `pwd`


Expand All @@ -20,37 +27,55 @@ help: ## Mostrar esta ayuda
@echo


##--------------------------------------------------------
## Entorno virtual
##--------------------------------------------------------

setup: ## - crea .venv (si no existe) e instala runtime + dependencias de prueba
@test -x $(VENV)/bin/python || $(SYSTEM_PYTHON) -m venv $(VENV)
$(VENV)/bin/python -m pip install --upgrade pip
$(VENV)/bin/python -m pip install -r requirements.txt
$(VENV)/bin/python -m pip install -r test_requirements.txt
@$(MAKE) --no-print-directory check-env

check-env: ## - verifica dependencias, chromedriver y conexión a PostgreSQL
@$(PYTHON) scripts/check_env.py

venv-info: ## - muestra qué intérprete usarán los targets
@echo "VENV = $(VENV)"
@echo "PYTHON = $(PYTHON)"

##--------------------------------------------------------
## Project setup & server
##--------------------------------------------------------

start: ## - run project local
cd src && python manage.py migrate \
&& python manage.py init_checks \
&& python manage.py load_urlname_permissions
cd src && $(PYTHON) manage.py migrate \
&& $(PYTHON) manage.py init_checks \
&& $(PYTHON) manage.py load_urlname_permissions

run_celery: ## - run celery for development mode
./run_celery.sh

database_config: ## - init config data base
cd src && python manage.py migrate && python manage.py init_checks && python manage.py load_urlname_permissions
cd src && $(PYTHON) manage.py migrate && $(PYTHON) manage.py init_checks && $(PYTHON) manage.py load_urlname_permissions

run_docker_selenium: ## - run project in docker with selenium
docker run --network="host" -v $(current_path)/src:/organilab/src -v $(current_path)/fixtures:/organilab/fixtures -v $(current_path)/docs:/organilab/docs -ti organilabselenium:$(setup_version) $(run)

migrate: ## - makemigrations && migrate
cd src && python manage.py makemigrations && \
python manage.py migrate
cd src && $(PYTHON) manage.py makemigrations && \
$(PYTHON) manage.py migrate

requirements: ## - install all dependencies
pip install -r requirements.txt
$(PYTHON) -m pip install -r requirements.txt

test-requirements: ## - install all test dependencies
pip install -r test_requirements.txt
$(PYTHON) -m pip install -r test_requirements.txt

create-profile: ## - create user and user profile
cd src && python manage.py createsuperuser && \
python manage.py shell -c "\
cd src && $(PYTHON) manage.py createsuperuser && \
$(PYTHON) manage.py shell -c "\
from auth_and_perms.models import Profile; \
from django.contrib.auth.models import User; \
user = User.objects.last(); \
Expand All @@ -59,15 +84,15 @@ create-profile: ## - create user and user profile
check-move-organization-data: ## Validate organization migration (Example: make check-move-organization-data FROM=5 TO=9)
@echo "Validating organization data migration..."
@echo "FROM=$(FROM) → TO=$(TO)"
cd src && python manage.py move_organization_data --from-org $(FROM) --to-org $(TO) --dry-run
cd src && $(PYTHON) manage.py move_organization_data --from-org $(FROM) --to-org $(TO) --dry-run


move-organization-data: ## Execute organization migration (Example: make move-move-organization-data FROM=5 TO=9)
@echo "You are about to move data from one organization to another"
@echo "FROM=$(FROM) → TO=$(TO)"
@read -p "Do you want to continue? [y/N]: " confirm; \
if [ "$$confirm" = "y" ]; then \
cd src && python manage.py move_organization_data --from-org $(FROM) --to-org $(TO); \
cd src && $(PYTHON) manage.py move_organization_data --from-org $(FROM) --to-org $(TO); \
else \
echo "Operation cancelled"; \
fi
Expand All @@ -90,46 +115,69 @@ clean: ## - remove build artifacts and remove Python file artifacts
$(MAKE) clean-build && $(MAKE) clean-pyc

test: ## - run tests quickly with the default Python
cd src && python manage.py test --no-input --exclude-tag=selenium
cd src && $(PYTHON) manage.py test --no-input --exclude-tag=selenium

test-parallel: ## - run tests in parallel (auto-detect workers)
cd src && python manage.py test --no-input --exclude-tag=selenium --parallel -v 2
cd src && $(PYTHON) manage.py test --no-input --exclude-tag=selenium --parallel -v 2

single-test: ## Run Django tests (optional: TEST=path.to.test, example: make single-test TEST=laboratory.tests.test_provider.ProviderViewTest)
cd src && python manage.py test $(TEST) --no-input --exclude-tag=selenium
cd src && $(PYTHON) manage.py test $(TEST) --no-input --exclude-tag=selenium

test-selenium: ## Run Selenium tests, workers auto (optional: TEST=path.to.test, example: make test-selenium TEST=laboratory.tests.selenium_tests)
cd src && $(PYTHON) manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel -v 2

test-selenium-parallel: ## Run Selenium tests with a fixed worker count (WORKERS=12 by default, optional: TEST=path.to.test)
cd src && $(PYTHON) manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel $(or $(WORKERS),12) -v 2

test-selenium: ## Run Selenium tests (optional: TEST=path.to.test, example: make test-selenium TEST=laboratory.tests.selenium_tests)
cd src && python manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel -v 2
test-selenium-xvfb: ## Run Selenium tests headless via xvfb-run, workers auto (optional: TEST=path.to.test)
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" sh -c "cd src && $(PYTHON) manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel -v 2"

test-selenium-parallel: ## Run Selenium tests with 4 workers (optional: TEST=path.to.test)
cd src && python manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel 20 -v 2
test-selenium-fast: ## Run Selenium tests without GIF generation, workers auto (optional: TEST=path.to.test)
cd src && GENERATE_SCREENSHOTS=False $(PYTHON) manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel -v 2

test-selenium-xvfb: ## Run Selenium tests with virtual display via xvfb-run (optional: TEST=path.to.test)
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" sh -c "cd src && python manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel 12 -v 2"
test-selenium-single-fast: ## Run a single Selenium test without GIF generation, serial (TEST=path.to.test)
cd src && GENERATE_SCREENSHOTS=False $(PYTHON) manage.py test $(TEST) --tag=selenium --no-input -v 2

test-selenium-fast: ## Run Selenium tests without GIF generation (fast mode, optional: TEST=path.to.test)
cd src && GENERATE_SCREENSHOTS=False python manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel -v 2
test-selenium-dev: ## Run Selenium tests fast, headless, reusing the DB (optional: TEST=...). OJO --keepdb: si la BD reciclada queda sin permisos, loaddata revienta en setUpClass; borrar test_organilab y relanzar
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" \
sh -c "cd src && GENERATE_SCREENSHOTS=False $(PYTHON) manage.py test $(or $(TEST),) --tag=selenium --no-input --keepdb --parallel -v 2"

test-selenium-single-fast: ## Run a single Selenium test without GIF generation (TEST=path.to.test)
cd src && GENERATE_SCREENSHOTS=False python manage.py test $(TEST) --tag=selenium --no-input -v 2

##--------------------------------------------------------
## Bitácora de Selenium
##--------------------------------------------------------

BITACORA_DIR ?= $(ROOT_DIR)/selenium-results
BITACORA ?= $(BITACORA_DIR)/bitacora_$(shell date +%Y%m%d_%H%M%S).log

test-selenium-bitacora: ## Corre Selenium headless sin GIF y deja el log completo en selenium-results/ (optional: TEST=..., WORKERS=N, BITACORA=ruta.log)
@mkdir -p $(BITACORA_DIR)
@echo "Bitácora: $(BITACORA)"
-@xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" \
sh -c "cd src && GENERATE_SCREENSHOTS=False $(PYTHON) manage.py test $(or $(TEST),) --tag=selenium --no-input --parallel $(or $(WORKERS),) -v 2" \
> $(BITACORA) 2>&1
@echo
@echo "----- resumen -----"
@grep -E '^(FAIL|ERROR): |^Ran |^OK|^FAILED|^SKIP: ' $(BITACORA) || echo "sin fallos registrados"
@echo "-------------------"
@echo "Log completo: $(BITACORA)"

docs: clean ## - generate Sphinx HTML documentation, including API docs
pip install 'sphinx==8.2.3' sphinx-rtd-theme==3.0.2 sphinxcontrib-video==0.4.2
$(PYTHON) -m pip install 'sphinx==8.2.3' sphinx-rtd-theme==3.0.2 sphinxcontrib-video==0.4.2
$(MAKE) -C docs clean
$(MAKE) -C docs html
sphinx-build -b linkcheck ./docs/source ./docs/build/
sphinx-build -b html ./docs/source ./docs/build/
python docs/fix_capacitacion_images.py
$(PYTHON) docs/fix_capacitacion_images.py

docs_full: ## - generate full docs, Sphinx HTML documentation, including API docs
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" sh -c "cd src && python manage.py test --no-input --tag=selenium --parallel 12"
xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24" sh -c "cd src && $(PYTHON) manage.py test --no-input --tag=selenium --parallel"
$(MAKE) -C docs clean
$(MAKE) -C docs html
pip install 'sphinx==8.2.3' sphinx-rtd-theme==3.0.2 sphinxcontrib-video==0.4.2
$(PYTHON) -m pip install 'sphinx==8.2.3' sphinx-rtd-theme==3.0.2 sphinxcontrib-video==0.4.2
sphinx-build -b linkcheck ./docs/source ./docs/build/
sphinx-build -b html ./docs/source ./docs/build/
python docs/fix_capacitacion_images.py
$(PYTHON) docs/fix_capacitacion_images.py

messages: ## - extract messages for translations
cd src && django-admin makemessages --all --no-location --no-obsolete && django-admin makemessages -d djangojs -l es --ignore *.min.js --no-location --no-obsolete
Expand All @@ -156,7 +204,26 @@ build_docker_selenium: ## - build docker images with selenium
docker build -f docker/Dockerfile.selenium -t organilabselenium:$(setup_version) .

load-perms: ## - load permissions
$(MAKE) trans && cd src && python manage.py load_urlname_permissions
$(MAKE) trans && cd src && $(PYTHON) manage.py load_urlname_permissions

##--------------------------------------------------------
## Inventario de rutas
##--------------------------------------------------------

# Se genera con test_settings y DEBUG=False a propósito: es el urlconf que ve el
# guardián de presentation/tests/test_url_inventory.py (Django fuerza DEBUG=False
# al correr pruebas), y `organilab/urls.py:106` monta rutas distintas según DEBUG.
# Sin fijarlo, el fichero commiteado dependería del entorno de quien lo regenere.
url-inventory: ## - regenera roadmap/INVENTARIO_URLS.md y el CSV con la clasificación de rutas
cd src && DEBUG=False $(PYTHON) manage.py url_inventory --settings=organilab.test_settings --format md -o $(ROOT_DIR)/roadmap/INVENTARIO_URLS.md
cd src && DEBUG=False $(PYTHON) manage.py url_inventory --settings=organilab.test_settings --format csv -o $(ROOT_DIR)/roadmap/inventario_urls.csv
cd src && DEBUG=False $(PYTHON) manage.py url_inventory --settings=organilab.test_settings

url-inventory-check: ## - falla si el inventario commiteado quedó desactualizado
cd src && DEBUG=False $(PYTHON) manage.py url_inventory --settings=organilab.test_settings --check $(ROOT_DIR)/roadmap/INVENTARIO_URLS.md

test-urls: ## - smoke de las vistas navegables, sin navegador
cd src && $(PYTHON) manage.py test organilab_test.tests.test_url_smoke --no-input -v 2

##--------------------------------------------------------
## Project utils
Expand All @@ -165,7 +232,7 @@ lint: ## - check style with flake8
pycodestyle --exclude=*/migrations/* --max-line-length=200 src

update_sds: ## - update SDS files in batches
cd src && python manage.py update_sds --batch-size 10 --batch-delay 30 --delay 2
cd src && $(PYTHON) manage.py update_sds --batch-size 10 --batch-delay 30 --delay 2

clean_orphan_media: ## - elimina archivos en MEDIA_ROOT no referenciados en la BD
cd src && python manage.py clean_orphan_media
cd src && $(PYTHON) manage.py clean_orphan_media
2 changes: 1 addition & 1 deletion coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading