This repository was archived by the owner on Aug 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5b831a7
list_dirs
Borda 1710604
wip
Borda a61f492
fixing
Borda 0e9f0f4
reqs
Borda 92f82de
tests
Borda ff14e81
titanic
Borda 3038679
default
Borda 9025c87
Merge branch 'main' into ci/update
Borda 17f4a13
Merge branch 'main' into ci/update
Borda c415f67
Apply suggestions from code review
Borda 2494b2a
Apply suggestions from code review
Borda 5bc4f65
Apply suggestions from code review
Borda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,5 @@ Fire | |
| tqdm | ||
| PyYAML | ||
| wcmatch | ||
| requests | ||
| pip | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import os | ||
|
|
||
| import pytest | ||
| from assistant import AssistantCLI | ||
|
|
||
| _PATH_ROOT = os.path.dirname(os.path.dirname(__file__)) | ||
| _PATH_TEMPLATES = os.path.join(_PATH_ROOT, "templates") | ||
| _PATH_DIR_SIMPLE = os.path.join(_PATH_TEMPLATES, "simple") | ||
| _PATH_DIR_TITANIC = os.path.join(_PATH_TEMPLATES, "titanic") | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( | ||
| "cmd,args", | ||
| [ | ||
| ("list_dirs", []), | ||
| ("bash_render", [_PATH_DIR_SIMPLE]), | ||
| ("bash_test", [_PATH_DIR_SIMPLE]), | ||
| # ("group_folders", [_PATH_SIMPLE]), | ||
| ("augment_script", [_PATH_DIR_SIMPLE]), | ||
| ("copy_notebooks", [_PATH_ROOT]), | ||
| ("update_env_details", [_PATH_DIR_SIMPLE]), | ||
| ], | ||
| ) | ||
| def test_assistant_commands(cmd: str, args: list): | ||
| AssistantCLI().__getattribute__(cmd)(*args) |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: CI internal | ||
|
|
||
| # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows | ||
| on: # Trigger the workflow on push or pull request, but only for the main branch | ||
| push: {} | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| pytest-internal: | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-20.04 ] | ||
| python-version: ["3.9"] | ||
| # Timeout: https://stackoverflow.com/a/59076067/4521646 | ||
| timeout-minutes: 10 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install requirements | ||
| run: | | ||
| pip --version | ||
| pip install -q -r .actions/requirements.txt | ||
| pip install -q "pytest==6.*" coverage jupytext | ||
| # this is needed to be able to run package version parsing test | ||
| pip install -q matplotlib -r requirements/default.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html | ||
|
|
||
Borda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - name: Convert templates | ||
| run: | | ||
| jupytext --set-formats ipynb,py:percent templates/simple/template.py | ||
| jupytext --set-formats ipynb,py:percent templates/titanic/tutorial.py | ||
| # mv templates/simple/template.ipynb templates/simple.ipynb | ||
|
|
||
| - name: Testing | ||
| run: | | ||
| coverage run -m pytest .actions -v --junitxml="junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml" | ||
|
|
||
| - name: Upload pytest test results | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: pytest-results-${{ runner.os }}-${{ matrix.python-version }} | ||
| path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml | ||
| if: failure() | ||
|
|
||
| - name: Statistics | ||
| if: success() | ||
| run: | | ||
| coverage report | ||
| coverage xml | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v1 | ||
| if: always() | ||
| # see: https://github.com/actions/toolkit/issues/399 | ||
| continue-on-error: true | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| file: coverage.xml | ||
| flags: pytest,${{ runner.os }} | ||
| name: CLI-coverage | ||
| fail_ci_if_error: false | ||
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.