Skip to content

Commit

Permalink
Refactoring of tests and restructuring of requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Old-Shatterhand committed Sep 29, 2024
1 parent dcf30f3 commit 4e2df12
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 12 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/run_test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Pytest

on: [push]
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch: # make is manually start-able

jobs:
build:
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
torch
lightning
torchmetrics
pandas
rich
fair-esm
wandb
tokenizers
transformers
beartype
wandb
torch
lightning
torchmetrics
datasets
tokenizers
transformers[torch]
pytest
pytest-cov
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion smtb/tests/test_data.py → tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import torch

from ..data import DownstreamDataModule, DownstreamDataset
from smtb.data import DownstreamDataModule, DownstreamDataset
from .fixtures import mock_data_dir


Expand Down
2 changes: 1 addition & 1 deletion smtb/tests/test_finetune.py → tests/test_finetune.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from ..train import train
from smtb.train import train
from .fixtures import mock_data_dir, sample_config


Expand Down
2 changes: 1 addition & 1 deletion smtb/tests/test_model.py → tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import torch

from ..model import RegressionModel
from smtb.model import RegressionModel
from .fixtures import sample_batch_x, sample_config


Expand Down
2 changes: 1 addition & 1 deletion smtb/tests/test_pooling.py → tests/test_pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import torch

from ..model import poolings
from smtb.model import poolings
from .fixtures import sample_batch_x, sample_config


Expand Down
2 changes: 1 addition & 1 deletion smtb/tests/test_tokenizers.py → tests/test_tokenizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datasets import Dataset, DatasetDict
from transformers import PreTrainedTokenizerFast

from ..tokenization import TOKENIZATION_TYPES, train_tokenizer
from smtb.tokenization import TOKENIZATION_TYPES, train_tokenizer


def tokenization_types():
Expand Down

0 comments on commit 4e2df12

Please sign in to comment.