Skip to content

Commit

Permalink
#82: Remove setup.py and update poetry to 1.4.0 (#84)
Browse files Browse the repository at this point in the history
* Removed setup.py
* Updated poetry to 1.4.0 and introduced composite action for it
* Pinned ITDE to version 1.6.0 

Co-authored-by: Christoph Pirkl <christoph.pirkl@exasol.com>
  • Loading branch information
tkilias and kaklakariada committed Aug 21, 2023
1 parent 8eac7db commit b68bd0b
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 152 deletions.
19 changes: 19 additions & 0 deletions .github/actions/prepare_poetry_env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Prepare Poetry environment'
description: 'This composite actions checks out out the project, installs Poetry, and install the project in the Poetry environment'
inputs:
python-version:
description: 'The Python version to use'
required: true
default: '3.8'
runs:
using: "composite"
steps:
- uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.4.0
- name: Poetry install
run: poetry install
shell: bash
13 changes: 5 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: 1.2.0
- name: Install Poetry
run: poetry install

- name: Setup Python & Poetry Environment
uses: ./.github/actions/prepare_poetry_env

- name: Build Poetry
run: poetry build

- name: Install project whl
run: pip install dist/*.whl

Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/check_setup_py.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/language_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: 1.2.0

- name: Setup Python & Poetry Environment
uses: ./.github/actions/prepare_poetry_env

- name: Build language container
run: ./build_language_container.sh

- name: Archive language container
uses: actions/upload-artifact@v2
with:
name: exasol_sagemaker_extension_container
path: .build_output/cache/exports/*.tar.gz*

- name: Archive language container build logs
uses: actions/upload-artifact@v2
with:
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release_droid_upload_github_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: 1.2.0
- name: Install Poetry
run: poetry install

- name: Setup Python & Poetry Environment
uses: ./.github/actions/prepare_poetry_env

- name: Build Poetry
run: poetry build

- name: Install project whl
run: pip install dist/*.whl

Expand Down
2 changes: 1 addition & 1 deletion ci-isolation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>com.exasol</groupId>
<artifactId>ci-isolation-aws</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.exasol.ciisolation.aws.PolicyReader;
import com.exasol.ciisolation.aws.ciuser.CiUserStack;
import com.exasol.ciisolation.aws.ciuser.CiUserStack.CiUserStackProps;

import software.amazon.awscdk.App;

Expand All @@ -12,10 +13,11 @@ public class CiIsolationApp {
public static void main(final String[] args) {
final App app = new App();
final PolicyReader policyReader = new PolicyReader();
new CiUserStack(app, CiUserStack.CiUserStackProps.builder().projectName("exasol-sagemaker-extension")
CiUserStackProps props = CiUserStack.CiUserStackProps.builder().projectName("exasol-sagemaker-extension")
.addRequiredPermissions(
policyReader.readPolicyFromResources("s3-access.json"),
policyReader.readPolicyFromResources("sagemaker-access.json")).build());
policyReader.readPolicyFromResources("sagemaker-access.json")).build();
new CiUserStack(app, props);
app.synth();
}
}
1 change: 0 additions & 1 deletion githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ REPO_DIR=$(git rev-parse --show-toplevel)
GITHOOKS_PATH="$REPO_DIR/githooks"
pushd "$REPO_DIR"
bash "$GITHOOKS_PATH/prohibit_commit_to_main.sh"
bash "$GITHOOKS_PATH/update_setup_py.sh"
popd


Expand Down
45 changes: 0 additions & 45 deletions githooks/update_setup_py.sh

This file was deleted.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ include = ["lua", "resources", "deployment"]
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
pandas = ">=1.4.2,<2.0.0"
boto = "^2.49.0"
boto3 = "1.26.163"
botocore = "1.29.163"
protobuf = ">=3.1,<=3.20.0"
sagemaker = "^2.59.1"
pyexasol = "^0.24.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function install_localstack {
function checkout_exasol_test_container {
cnt_func=$((cnt_func+1))
echo -e "${YEL} Step-$cnt_func: ${GRA} Checkout Exasol test container ${NC}"
git clone https://github.com/exasol/integration-test-docker-environment.git
git clone --branch 1.6.0 https://github.com/exasol/integration-test-docker-environment.git
}

function spawn_exasol_environment {
Expand Down
46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

0 comments on commit b68bd0b

Please sign in to comment.