Pre paper updates #369
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 | |
| # specify trigger events for ci workflow | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize, review_requested] | |
| jobs: | |
| # apply formating and linting | |
| # I am deactivating snakefmt for now since it reformats snakemake rules in a way that breaks them. | |
| # The snakefmt linter in super-linter is an unknown old version that does not support the latest snakemake/snakefmt syntax. | |
| # Format: | |
| # runs-on: ubuntu-22.04 | |
| # steps: | |
| # - uses: actions/checkout@v3 | |
| # - name: Apply snakefmt | |
| # uses: github/super-linter@latest | |
| # env: | |
| # VALIDATE_ALL_CODEBASE: false | |
| # DEFAULT_BRANCH: main | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # LINTER_RULES_PATH: snekmer/rules/ | |
| # VALIDATE_SNAKEMAKE_SNAKEFMT: true | |
| # run all tests | |
| Test: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Create venv and install deps | |
| run: | | |
| python3.11 -m venv snekmer_env | |
| source snekmer_env/bin/activate | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install . | |
| echo "VIRTUAL_ENV=$PWD/snekmer_env" >> $GITHUB_ENV | |
| echo "$PWD/snekmer_env/bin" >> $GITHUB_PATH | |
| - name: Show environment info | |
| run: | | |
| ./snekmer_env/bin/python -V | |
| ./snekmer_env/bin/pip freeze | |
| - name: Install test dependencies | |
| run: pip install pytest | |
| - name: Unit tests | |
| run: pytest tests/ -m "not integration and not docker" -v | |
| - name: Integration tests | |
| run: pytest tests/test_integration.py -m integration -v | |
| # - shell: bash -l {0} | |
| # run: mamba env create -f .test/test-env.yml | |
| # - shell: bash -l {0} | |
| # run: pip install -e git+https://github.com/PNNL-CompBio/Snekmer@learn_decoy_implementation#egg=snekmer | |
| #test clustering step | |
| - name: Snekmer Cluster | |
| run: | | |
| snekmer cluster --configfile .test/config.yaml -d .test | |
| rm -rf .test/output | |
| # --use-conda --conda-cleanup-pkgs cache --show-failed-logs --conda-frontend mamba | |
| # run modeling step and move output files for search | |
| - name: Snekmer Model | |
| run: | | |
| snekmer model --configfile .test/config.yaml -d .test --cores 1 | |
| mkdir -p .test/output/example-model | |
| mv .test/output/model/*.model .test/output/example-model/ | |
| mv .test/output/kmerize/*.kmers .test/output/example-model/ | |
| mv .test/output/scoring/*.scorer .test/output/example-model/ | |
| # search against previously generated model files | |
| - name: Snekmer Search | |
| run: | | |
| ls .test | |
| pwd | |
| snekmer search --configfile .test/config.yaml -d .test --cores 1 | |
| rm -rf .test/output | |
| # run Snekmer Learn kmer counts and confidence creation | |
| - name: Snekmer Learn | |
| run: | | |
| snekmer learn --configfile .test/config_learnapp.yaml -d .test --cores 1 | |
| mv .test/apply_inputs/* .test || true | |
| rm -rf .test/output | |
| # run Snekmer Learn against previously generated counts files | |
| - name: Snekmer Apply | |
| run: | | |
| snekmer apply --configfile .test/config_learnapp.yaml -d .test --cores 1 | |
| rm -rf .test/output |