|
| 1 | +name: "Copilot Setup Steps" |
| 2 | + |
| 3 | +# Automatically run the setup steps when they are changed to allow for easy validation, |
| 4 | +# and allow manual testing through the repository's "Actions" tab |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + push: |
| 8 | + paths: |
| 9 | + - .github/workflows/copilot-setup-steps.yml |
| 10 | + pull_request: |
| 11 | + paths: |
| 12 | + - .github/workflows/copilot-setup-steps.yml |
| 13 | + |
| 14 | +jobs: |
| 15 | + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. |
| 16 | + copilot-setup-steps: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + |
| 19 | + # Set the permissions to the lowest permissions possible needed for your steps. |
| 20 | + # Copilot will be given its own token for its operations. |
| 21 | + permissions: |
| 22 | + # Required for actions/checkout - Copilot needs to access the repository |
| 23 | + contents: read |
| 24 | + |
| 25 | + # Configure the environment for TNFR development |
| 26 | + # Purpose: Enable exploration, study, investigation, and development of TNFR |
| 27 | + # (Resonant Fractal Nature Theory - modeling coherent patterns through resonance) |
| 28 | + steps: |
| 29 | + - name: Checkout TNFR repository |
| 30 | + uses: actions/checkout@v5 |
| 31 | + |
| 32 | + - name: Set up Python |
| 33 | + uses: actions/setup-python@v6 |
| 34 | + with: |
| 35 | + # Using Python 3.11 - the primary version for TNFR development and CI |
| 36 | + python-version: "3.11" |
| 37 | + cache: "pip" |
| 38 | + |
| 39 | + - name: Install TNFR dependencies |
| 40 | + run: | |
| 41 | + python -m pip install --upgrade pip |
| 42 | + # Install TNFR directly from repository source code (NOT from PyPI) |
| 43 | + # Using editable mode (-e) to work with the latest development version |
| 44 | + # This provides full environment for exploring and developing TNFR: |
| 45 | + # - Core operators (13 canonical structural transformations) |
| 46 | + # - Test infrastructure for validating invariants |
| 47 | + # - Serialization for state preservation |
| 48 | + # - NumPy for structural computations |
| 49 | + python -m pip install -e .[test,numpy,yaml,orjson] |
| 50 | +
|
| 51 | + - name: Verify TNFR installation |
| 52 | + run: | |
| 53 | + # Verify the TNFR package is properly installed from repo (not PyPI) |
| 54 | + python -c "import tnfr; print(f'TNFR version: {tnfr.__version__}')" |
| 55 | + python -c "import tnfr, os; print(f'TNFR location: {os.path.dirname(tnfr.__file__)}')" |
| 56 | + # Verify core modules are accessible |
| 57 | + python -c "from tnfr.operators import Emission, Coherence, Resonance; print('✓ Core operators available')" |
| 58 | + python -c "from tnfr.metrics.coherence import compute_global_coherence; print('✓ Metrics available')" |
| 59 | + # Display Python environment info |
| 60 | + python --version |
| 61 | + pip list | grep -E "(tnfr|pytest|numpy|networkx)" |
0 commit comments