Commit 2b41eec5 authored by vertighel's avatar vertighel
Browse files

CI: install only what each job needs

The runner is still out of disk during `pip install -e .`.
- run_pylint: `pip install -e . --no-deps` (the job never fails anyway)
- pages: install numpy, astropy and quart (used at import time) and
  noctua with --no-deps; the other packages are mocked through
  autodoc_mock_imports in docs/source/conf.py. Tested locally: the
  docs build, only templates.testpause fails to import (it imports a
  device `cam` that no longer exists, unrelated to this change).

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent b8a2e1bd
Loading
Loading
Loading
Loading
Loading
+7 −5
Changes for .gitlab-ci.yml: 7 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -73,8 +73,9 @@ run_pylint:
      artifacts: true
  before_script:
    - pip install pylint
    # Install dependencies so pylint can resolve imports
    - pip install -e .
    # No dependencies (the runner is short on disk): pylint reports the
    # unresolved imports, but this job never fails anyway (see `|| echo`).
    - pip install -e . --no-deps
  script:
    - pylint --rcfile=.pylintrc --fail-on=E,F ${PYLINT_TARGETS}/sequencer.py || echo "Pylint finished with issues"

@@ -84,11 +85,12 @@ pages:
  tags:
    - git-run-ia2
  before_script:
#    - apt-get update -y && apt install -y gnuplot
    - pip install --upgrade pip
#    - pip install gnuplotlib
    - pip install setuptools sphinx
    - pip install -e .
    # Only the dependencies needed at import time: the others are mocked
    # by autodoc_mock_imports in docs/source/conf.py (runner short on disk).
    - pip install numpy==2.3.5 astropy quart
    - pip install -e . --no-deps
    - pip install -r docs/requirements.txt
  script:
    - cp noctua/config/nodes.ini.template noctua/config/nodes.ini
+9 −0
Changes for docs/source/conf.py: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -25,6 +25,15 @@ extensions = [
    'sphinx.ext.viewcode',  # Add links to highlighted source code
]

# The CI installs noctua without its dependencies (the runner is short on
# disk), only numpy, astropy and quart, which are used at import time
# (np.pi arithmetic, astropy models, quart MethodView subclasses): autodoc
# imports the modules with the other packages mocked.
autodoc_mock_imports = [
    'AtikSDK', 'httpx', 'loguru', 'pipython', 'quart_cors', 'requests',
    'telnetlib3', 'uvicorn', 'vmbpy',
]

templates_path = ['_templates']
exclude_patterns = []