-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add_consume_file
- Loading branch information
Showing
23 changed files
with
484 additions
and
93 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
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,34 @@ | ||
name: Python Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] # Test with Python 3.10 to the latest available version | ||
|
||
steps: | ||
# Checkout the latest commit associated with the PR | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Debug matrix value | ||
run: echo "Python version is ${{ matrix.python-version }}" | ||
|
||
# Set up Python based on the matrix version | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Install dependencies, including test dependencies from pyproject.toml | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install '.[test]' # Install all dependencies, including test-specific ones | ||
# Run pytest on the specified directory | ||
- name: Run tests | ||
run: pytest src/python/tests |
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,34 @@ | ||
# Image source code: https://github.com/axonasif/workspace-images/tree/tmp | ||
# Also see https://github.com/gitpod-io/workspace-images/issues/1071 | ||
FROM axonasif/workspace-base@sha256:8c057b1d13bdfe8c279c68aef8242d32110c8d5310f9a393f9c0417bc61367d9 | ||
|
||
# Set user | ||
USER gitpod | ||
|
||
# Install Miniconda | ||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py311_24.1.2-0-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
/bin/bash ~/miniconda.sh -b -p $HOME/miniconda && \ | ||
rm ~/miniconda.sh | ||
|
||
# Add Miniconda to PATH | ||
ENV PATH="$HOME/miniconda/bin:$PATH" | ||
|
||
# Initialize conda in bash config files: | ||
RUN conda init bash | ||
|
||
# Set up Conda channels | ||
RUN conda config --add channels conda-forge && \ | ||
conda config --add channels bioconda && \ | ||
conda config --set channel_priority strict | ||
|
||
# Set libmamba as solver | ||
RUN conda config --set solver libmamba | ||
|
||
# Persist ~/ (HOME) and lib | ||
RUN echo 'create-overlay $HOME /lib' > "$HOME/.runonce/1-home-lib_persist" | ||
|
||
# Referenced in `.vscode/settings.json` | ||
ENV PYTHON_INTERPRETER="$HOME/miniconda/bin/python" | ||
|
||
# Pycharm recognizes this variables | ||
ENV PYCHARM_PYTHON_PATH="${PYTHON_INTERPRETER}" |
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,25 @@ | ||
image: | ||
file: .gitpod.Dockerfile | ||
|
||
tasks: | ||
- name: Init Gitpod Workspace | ||
init: | | ||
conda install --yes --solver=libmamba -c conda-forge -c bioconda "compilers" "maturin>=1,<2" "pytest" "rust" "scipy" "toml" | ||
conda clean --all --yes | ||
command: | | ||
echo "Running: $GITPOD_WORKSPACE_URL" | ||
ports: | ||
- name: Jupyter Notebook | ||
port: 8888 | ||
onOpen: open-browser | ||
|
||
vscode: | ||
extensions: | ||
- eamodio.gitlens | ||
- github.vscode-pull-request-github | ||
- janisdd.vscode-edit-csv | ||
- mechatroner.rainbow-csv | ||
- ms-python.debugpy | ||
- ms-python.python | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.