-
Notifications
You must be signed in to change notification settings - Fork 1
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 aviyan-dev (2024-02-03)
- Loading branch information
Showing
39 changed files
with
596 additions
and
161 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
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
# NOTE: --rm removes container afterwards; -it is for --interactive with --tty | ||
# TODO2: --mount => --volume??? | ||
# 3. [Optional] Run a bash shell using the created image: | ||
# $ docker run -it --rm --entrypoint='/bin/bash' --mount type=bind,source="$(pwd)",target=/home/shell-scripts my-shell-scripts | ||
# $ docker run -it --rm --entrypoint='/bin/bash' --mount type=bind,source="$(pwd)",target=/home/shell-scripts shell-scripts-dev | ||
# # note: might need to tag the image (maldito docker): see local-workflows.sh | ||
# 4. Remove the image: | ||
# $ docker rmi shell-scripts-dev | ||
|
@@ -30,21 +30,17 @@ FROM catthehacker/ubuntu:act-20.04 | |
|
||
# Set default debug level (n.b., use docker build --build-arg "arg1=v1" to override) | ||
# Also optionally set the regex of tests to run. | ||
# Note: maldito act/nektos/docker not overriding properly | ||
## TODO2: fixme (see tests/run_tests.bash for workaround) | ||
## TODO4: ARG DEBUG_LEVEL=2 | ||
# Note: can be overriden via _temp-user-docker.env | ||
ARG DEBUG_LEVEL=4 | ||
## DEBUG: ARG DEBUG_LEVEL=5 | ||
ARG TEST_REGEX="" | ||
## DEBUG: ARG TEST_REGEX="testing-tips" | ||
|
||
# [Work in progress] | ||
# Set branch override: this is not working due to subtle problem with the tfidf package | ||
# ValueError: '/home/tomohara/python/tfidf' is not in the subpath of '/tmp/pip-req-build-4wdbom6g' | ||
# OR one path is relative and the other is absolute. | ||
# Note: this is intended to avoid having to publish an update to PyPI. | ||
ARG GIT_BRANCH="" | ||
## HACK: hardcode branch to tom-dev due to stupid problems with act/docker | ||
## TEST: hardcode branch to tom-dev due to stupid problems with act/docker | ||
## DEBUG: ARG GIT_BRANCH="tom-dev" | ||
|
||
# Trace overridable settings | ||
|
@@ -66,20 +62,15 @@ RUN apt-get update && \ | |
RUN if [ "$DEBUG_LEVEL" -ge 4 ]; then apt-get install --yes emacs kdiff3 less tcsh zip || true; fi | ||
|
||
# Set the Python version to install | ||
# NOTE: The workflow yaml files now handle this (e.g., via matrix support) | ||
## TODO: keep in sync with .github/workflows | ||
## OLD: ARG PYTHON_VERSION=3.9.16 | ||
# Note: The workflow yaml files only handle version for VM runner (e.g., via matrix support) | ||
## TEST: ARG PYTHON_VERSION=3.8.12 | ||
ARG PYTHON_VERSION=3.11.4 | ||
|
||
|
||
# Download pre-compiled python build | ||
# TODO2: Make this step optional because it conflict with python matrix in yaml files (e.g., github/worflow/github.yml). | ||
# To find URL links, see https://github.com/actions/python-versions: | ||
# ex: https://github.com/actions/python-versions/releases/tag/3.11.4-5199054971 | ||
# | ||
# maldito https://github.com/actions uses stupid idiosyncratic tag | ||
## OLD: ARG PYTHON_TAG="" | ||
## TEST: ARG PYTHON_TAG="117929" | ||
ARG PYTHON_TAG="5199054971" | ||
# | ||
|
@@ -104,10 +95,8 @@ RUN if [ "$PYTHON_VERSION" != "" ]; then | |
# Copy the project's requirements file to the container | ||
ARG REQUIREMENTS=$WORKDIR/requirements.txt | ||
COPY requirements.txt $REQUIREMENTS | ||
## TODO3?: COPY tests/_test-config.bash $WORKDIR/tests | ||
|
||
# Install the project's dependencies | ||
## OLD: RUN pip install --verbose --no-cache-dir --requirement $REQUIREMENTS | ||
RUN if [ "$PYTHON_VERSION" != "" ]; then \ | ||
pip install --verbose --no-cache-dir --requirement $REQUIREMENTS; \ | ||
fi | ||
|
@@ -134,14 +123,7 @@ fi | |
# Enable github access | ||
# Note: This is not secure, but scrappycito only has access to | ||
# to dummy repo's like https://github.com/tomasohara/git-bash-test. | ||
## TODO: | ||
## RUN git config --global user.email "[email protected]" && \ | ||
## git config --global user.name "SCrappy Cito" && \ | ||
## export MY_GIT_TOKEN=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 && \ | ||
## git config --global url."https://api:[email protected]/".insteadOf "https://github.com/" && \ | ||
## git config --global url."https://ssh:[email protected]/".insteadOf "ssh://[email protected]/" && \ | ||
## git config --global url."https://git:[email protected]/".insteadOf "[email protected]:" | ||
|
||
## # Run the test, normally pytest over ./tests | ||
|
||
# Run the test, normally pytest over ./tests/*.py and batspp over ./tests/*.ipynb | ||
# Note: the status code (i.e., $?) determines whether docker run succeeds (e.h., OK if 0) | ||
ENTRYPOINT DEBUG_LEVEL=$DEBUG_LEVEL TEST_REGEX="$TEST_REGEX" './tests/run_tests.bash' |
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
File renamed without changes.
File renamed without changes.
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
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
Oops, something went wrong.