Fix NameError in sensor readout test by adding missing pytest import #67
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'scripts/**' | |
| - '.github/workflows/**' | |
| - 'pyproject.toml' | |
| - 'pytest.ini' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'scripts/**' | |
| - '.github/workflows/**' | |
| - 'pyproject.toml' | |
| - 'pytest.ini' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.12" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| path: negative-energy-generator | |
| - uses: actions/checkout@v3 | |
| with: | |
| repository: arcticoder/lqg-first-principles-gravitational-constant | |
| path: lqg-first-principles-gravitational-constant | |
| - name: Set PYTHONPATH | |
| run: echo "PYTHONPATH=${{ github.workspace }}/negative-energy-generator/src" >> $GITHUB_ENV | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install the local gravitational constant package first | |
| python -m pip install ./lqg-first-principles-gravitational-constant | |
| # Install core dependencies and test tools | |
| python -m pip install numpy scipy matplotlib pandas h5py pytest | |
| # Install the project package | |
| cd negative-energy-generator | |
| python -m pip install . | |
| - name: Run unit tests | |
| run: | | |
| cd negative-energy-generator | |
| pytest --maxfail=1 | |
| - name: Run CLI demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/lattice_sweep_demo.py | |
| - name: Run backreaction demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/backreaction_demo.py | |
| - name: Run dynamic evolution demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/dynamic_evolution_demo.py | |
| - name: Run dynamic evolution analysis | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/dynamic_evolution_analysis.py | |
| - name: Run dynamic evolution report | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/dynamic_evolution_report.py | |
| - name: Run QFT toy ansatz UQ demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/qft_toy_ansatz_uq.py --samples 10 --grid-size 8 --dx 0.1 --output results/qft_uq_metrics.json | |
| - name: Run local energy resolution UQ demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/local_energy_resolution_uq.py --alpha 1.0 --beta 1.0 --N 50 100 200 --L 10.0 --output results/local_energy_resolution_uq.json | |
| - name: Run detection threshold UQ demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/detection_threshold_uq.py --alpha 1.0 --beta 1.0 --thresholds -1.0 0.0 1.0 --N 50 --L 10.0 --output results/detection_threshold_uq.json | |
| - name: Run sensor readout simulation demo | |
| run: | | |
| cd negative-energy-generator | |
| python scripts/simulate_sensor_readout.py --data results/dynamic_evolution.h5 --noise-std 0.01 --gain 1.5 --seed 42 --output results/sensor_readout.json |