-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User-defined "pinned versions" for JEDI repos (#38)
* adding pinned version handling * coding norms * commit clone and check fix * adding github action * action name * debugging github action * debugging * adding back pinned versions * debugging actions * chdir issue on action * clean up * more clean up * Update README.md * modifications based on comments * yaml fix * testing github action changes * github action changes * adding to tests * github action fix * github action fix * adding comment * changes based on comments * jedi_bundle's first type hint Co-authored-by: Alexey Shiklomanov <[email protected]> * import typing * Remove unnecessary `import typing` --------- Co-authored-by: Alexey Shiklomanov <[email protected]>
- Loading branch information
Showing
9 changed files
with
158 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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,41 @@ | ||
name: JEDI Bundle Pinned Version Test | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
|
||
jobs: | ||
buildbundle: | ||
name: Run jedi_bundle with pinned_versions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
|
||
# Setup Python | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Clone the code repo | ||
- name: Clone code repo | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: Install JEDI bundle and dependencies | ||
run: python -m pip install --use-deprecated=legacy-resolver -r requirements.txt --user . | ||
- name: Put executables in the path | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
# Run an application test | ||
- name: Run JEDI Bundle application test | ||
run: jedi_bundle --pinned_versions | ||
|
||
# Check if build.yaml has pinned_versions | ||
- name: Check for pinned_versions | ||
run: python src/jedi_bundle/tests/test_pinned_versions.py ${GITHUB_WORKSPACE}/build.yaml |
This file contains 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 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 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 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 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,3 @@ | ||
- ufo: | ||
branch: 64655cf61a9d22c88c0f20e740554ca5225790bc | ||
commit: True |
This file contains 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,15 @@ | ||
import sys | ||
from jedi_bundle.utils.logger import Logger | ||
from jedi_bundle.utils.yaml import load_yaml | ||
|
||
''' | ||
Script to search for 'pinned_versions' keyword in build.yaml | ||
during github action test. | ||
''' | ||
|
||
logger = Logger('Pinned Versions Test') | ||
build_yaml_path = sys.argv[1] | ||
build_dict = load_yaml(logger, build_yaml_path) | ||
|
||
if 'pinned_versions' not in build_dict: | ||
raise Exception('Pinned versions not found in build_dict') |
This file contains 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
Oops, something went wrong.