Separate fallback model setting and raise daily limit #41
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: PaperFlow CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint with flake8 | |
| run: | | |
| pip install flake8 | |
| # Stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,__pycache__,.pytest_cache,.venv,venv,data,models,release,ablation_packages,llm_model_experiment_packages,outputs | |
| # Exit-zero treats all errors as warnings | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.git,__pycache__,.pytest_cache,.venv,venv,data,models,release,ablation_packages,llm_model_experiment_packages,outputs | |
| - name: Test with pytest | |
| run: | | |
| pip install pytest pytest-cov | |
| python -m pytest tests/ -v --cov=. --cov-report=xml | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| fail_ci_if_error: false | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Check project structure | |
| run: | | |
| echo "Checking required files..." | |
| test -f README.md || exit 1 | |
| test -f requirements.txt || exit 1 | |
| test -f .env.example || exit 1 | |
| echo "All required files present" | |
| - name: Validate configuration files | |
| run: | | |
| python -c "import yaml; yaml.safe_load(open('config/conferences.yaml'))" | |
| python -c "import yaml; yaml.safe_load(open('config/journals.yaml'))" | |
| python -c "import yaml; yaml.safe_load(open('config/scoring_weights.yaml'))" | |
| python -c "import json; json.load(open('config/user-profile-template.json'))" | |
| echo "All configuration files are valid" |