Skip to content

Commit 8a21293

Browse files
authored
D->M (#463)
0.0.12 Forcing black to 22.1.0 to make sure that GHA doesn't suddenly fail Prevent jobs that never ran from submitting job execution stats 0.0.11 Add ability for kbase user to contact condor via token 0.0.10 Fixes bug with ee2 not recording all jobs with the catalog during the process of finishing a job Updates GHA with black and flake8 Fix flake8 and black formatting issues by formatting MANY files Updated docs for installing htcondor Update many python libs in requirements.txt
1 parent 9719893 commit 8a21293

38 files changed

Lines changed: 445 additions & 319 deletions

.flake8

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/ee2-tests.yml

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
1+
# This workflow will install Python dependencies, run tests and lint
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
# To ssh into this build add the following:
@@ -11,35 +11,61 @@
1111
name: Execution Engine 2 Test Suite
1212

1313
on:
14-
[pull_request]
14+
[ pull_request ]
1515

1616
jobs:
17-
build:
17+
Lint_with_Black:
1818
runs-on: ubuntu-latest
19+
name: Lint With Black
1920
steps:
20-
- uses: actions/checkout@v2
21-
- name: Set up Python 3.8
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: 3.8
25-
- name: Lint with flake8 and black
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install flake8 black pytest
29-
flake8 ./lib ./test
30-
black --check ./lib ./test
31-
- name: Install dependencies
32-
run: |
33-
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
34-
cd /opt
35-
git clone https://github.com/kbase/jars
36-
cd -
37-
- name: Build Docker Image
38-
run: |
39-
docker build . -t execution_engine2:test
40-
- name: Run Tests
41-
run: |
42-
docker-compose up -d
43-
cp test/env/test.travis.env test.env
44-
make test-coverage
45-
codecov
21+
- uses: actions/checkout@v3
22+
- uses: psf/black@stable
23+
with:
24+
options: "--check --verbose"
25+
src: "./lib"
26+
version: "22.10.0"
27+
- uses: psf/black@stable
28+
with:
29+
options: "--check --verbose"
30+
src: "./test"
31+
version: "22.10.0"
32+
33+
Lint_with_Flake8:
34+
runs-on: ubuntu-latest
35+
name: Lint With Flake8
36+
steps:
37+
- name: Check out source repository
38+
uses: actions/checkout@v3
39+
- name: Set up Python environment
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: "3.8"
43+
- name: flake8 Lint Lib
44+
uses: py-actions/flake8@v2
45+
with:
46+
path: "./lib"
47+
- name: flake8 Lint Test
48+
uses: py-actions/flake8@v2
49+
with:
50+
path: "./test"
51+
52+
53+
Build_and_Run_Tests_and_CodeCov:
54+
name: Build and Run Tests and CodeCov
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Check out source repository
58+
uses: actions/checkout@v3
59+
- name: Install dependencies
60+
run: |
61+
pip install -r requirements.txt
62+
git clone https://github.com/kbase/jars /opt/jars
63+
- name: Build Docker Image
64+
run: |
65+
docker build . -t execution_engine2:test
66+
- name: Run Tests
67+
run: |
68+
docker-compose up -d
69+
cp test/env/test.travis.env test.env
70+
make test-coverage
71+
codecov

.github/workflows/pr_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- opened
1111
- reopened
1212
- synchronize
13-
- merged
13+
- closed
1414
jobs:
1515
build-develop-open:
1616
if: github.base_ref == 'develop' && github.event.pull_request.merged == false

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: 22.1.0
3+
rev: 22.10.0
44
hooks:
55
- id: black
6-
exclude: '.+Impl.py'
6+
exclude: ".*execution_engine2Impl.py"
77
- repo: https://gitlab.com/pycqa/flake8
88
rev: '3.9.2'
99
hooks:

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ COPY ./ /kb/module
6161
RUN mkdir -p /kb/module/work && chmod -R a+rw /kb/module && mkdir -p /etc/condor/
6262

6363
WORKDIR /kb/module
64-
RUN make all
64+
# Due to older kb-sdk in this base image, getting some compilation results we don't want
65+
# Will have to manually use the correct version of kbase-sdk to compile impl/Server files
66+
RUN make build
6567

6668
# Remove Jars and old Conda for Trivy Scans and after compilation is done
6769
RUN rm -rf /sdk && rm -rf /opt

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ compile:
2121
--pysrvname $(SERVICE_CAPS).$(SERVICE_CAPS)Server \
2222
--pyimplname $(SERVICE_CAPS).$(SERVICE_CAPS)Impl;
2323

24+
2425
kb-sdk compile $(SPEC_FILE) \
2526
--out . \
2627
--html \
@@ -41,4 +42,4 @@ test-coverage:
4142

4243
build-condor-test-image:
4344
cd test/dockerfiles/condor && echo `pwd` && docker build -f Dockerfile . -t $(CONDOR_DOCKER_IMAGE_TAG_NAME)
44-
docker push $(CONDOR_DOCKER_IMAGE_TAG_NAME)
45+
docker push $(CONDOR_DOCKER_IMAGE_TAG_NAME)

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cachetools = "==3.1.1"
1515
certifi = "==2019.6.16"
1616
cffi = "==1.14.0"
1717
chardet = "==3.0.4"
18-
codecov = "==2.0.15"
18+
codecov = "==2.0.16"
1919
configparser = "==3.7.4"
2020
confluent-kafka = "==1.5.0"
2121
coverage = "==4.5.3"

Pipfile.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ pre-commit uninstall
6767
```
6868

6969
## Installing HTCondor Bindings from the mac
70-
* You may not be able to load without disabling the mac Security Gatekeeper with `sudo spctl --master-disable`
71-
* The HTCondor bindings only work on the Python.org install of python or your system install of python2.7. They will not work with anaconda. So download python from python.org
72-
* Download the mac bindings at https://research.cs.wisc.edu/htcondor/tarball/current/8.9.10/release/
73-
* Current version is [8.9.10](https://research.cs.wisc.edu/htcondor/tarball/current/8.9.10/release/condor-8.9.10-x86_64_MacOSX-unstripped.tar.gz)
74-
* Add <condor>/lib/python3 to PYTHONPATH.
70+
* `conda install -c conda-forge python-htcondor`
7571
* `import htcondor`
7672

7773
## Test Running Options

RELEASE_NOTES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# execution_engine2 (ee2) release notes
22
=========================================
33

4+
## 0.0.12
5+
* Forcing black to 22.1.0 to make sure that GHA doesn't suddenly fail
6+
* Prevent jobs that never ran from submitting job execution stats
7+
8+
9+
## 0.0.11
10+
* Add ability for `kbase` user to contact condor via token
11+
12+
## 0.0.10
13+
* Fixes bug with ee2 not recording all jobs with the catalog during the process
14+
of finishing a job
15+
* Updates GHA with black and flake8
16+
* Fix flake8 and black formatting issues by formatting MANY files
17+
* Updated docs for installing htcondor
18+
* Update many python libs in requirements.txt
19+
20+
421
## 0.0.9
522
* Update GHA with latest actions, remove old actions
623
* Change job defaults to result in

0 commit comments

Comments
 (0)