Skip to content

Commit

Permalink
create a pretrained units directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahmish committed Jan 22, 2025
1 parent cd3f29b commit cdb02ca
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 8 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,25 @@ jobs:
run: invoke pytest


unit-pretrained:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.11']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
run: |
pip install invoke .[pretrained]
- name: invoke pretrained
run: invoke pretrained


minimum:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -125,7 +144,7 @@ jobs:
run: invoke tutorials


pretrained:
pretrained-tutorials:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -141,5 +160,5 @@ jobs:
run: |
pip install "mistune>=2.0.3,<3.1"
pip install invoke jupyter .[pretrained]
- name: invoke pretrained
run: invoke pretrained
- name: invoke pretrained-tutorials
run: invoke pretrained-tutorials
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fix-lint: ## fix lint issues using autoflake, autopep8, and isort

.PHONY: test-unit
test-unit: ## run tests quickly with the default Python
invoke pytest
invoke unit

.PHONY: test-readme
test-readme: ## run the readme snippets
Expand All @@ -135,9 +135,13 @@ test-readme: ## run the readme snippets
test-tutorials: ## run the tutorial notebooks
invoke tutorials

.PHONY: test-pretrained
test-pretrained: ## run the tutorial notebooks
invoke pretrained

.PHONY: test-pretrained-tutorials
test-pretrained-tutorials: ## run the tutorial notebooks
invoke pretrained
invoke pretrained-tutorials

.PHONY: test
test: test-unit test-readme test-tutorials ## test everything that needs test dependencies
Expand Down
11 changes: 8 additions & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@


@task
def pytest(c):
c.run('python -m pytest --cov=orion')
def unit(c):
c.run('python -m pytest ./tests/unit --cov=orion')


@task
def pretrained(c):
c.run('python -m pytest ./tests/pretrained')


@task
Expand Down Expand Up @@ -107,7 +112,7 @@ def tutorials(c):
), hide='out')

@task
def pretrained(c):
def pretrained_tutorials(c):
pipelines = os.listdir(os.path.join('orion', 'pipelines', 'pretrained'))
for ipynb_file in glob.glob('tutorials/pipelines/*.ipynb'):
for pipeline in pipelines:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cdb02ca

Please sign in to comment.