Skip to content

Splitted up common.py#447

Merged
tomuben merged 12 commits intomainfrom
refactoring/430_split_common
Feb 13, 2025
Merged

Splitted up common.py#447
tomuben merged 12 commits intomainfrom
refactoring/430_split_common

Conversation

@tomuben
Copy link
Copy Markdown
Collaborator

@tomuben tomuben commented Feb 10, 2025

fixes #430

All Submissions:

  • Is the title of the Pull Request correct?
  • Is the title of the corresponding issue correct?
  • Have you updated the changelog?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you mentioning the issue which this PullRequest fixes ("Fixes...")
  • Are the CLI usage examples up to date?

Details

  1. Created module "models"
  2. Moved lib/config -> lib/models/config
  3. Moved lib/data -> lib/models/data
  4. Moved libapi/api_errors.py -> lib/models/api_errors.py
  5. Extracted run_tasks.py from common.py and moved to lib/base/run_tasks.py
  6. Extracted decorator functions from common.py -> lib/utils
  7. Extracted rest from common.py in appropriate files



def import_build_steps(flavor_path: Tuple[str, ...]):
# TODO Move to script-languages-container-tools: https://github.com/exasol/script-languages-container-tool/issues/268
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was confused for the moment, because the framework for building the docker images is used also for the test container, but it is only about the build steps file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, more correct would be probably extracting the docker images build part into a repo and the import with it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I see that the flavor_path and and FlavorsBaseTask and so on, which are tasks specific for exaslct are also here. So I guess you are right, and it's does not make sense to move this single function only then to exaslct. I will close exasol/script-languages-container-tool#268

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However FlavorBaseTask doesn't belong here, contrary to the import build steps. Also the test env should not know about flavors, that should be added in slct

Comment thread pyproject.toml
module = [ "luigi.*", "docker.*", "humanfriendly", "configobj", "toml", "netaddr", "joblib.testing", "networkx",
"fabric", "requests", "pyexasol", "paramiko.ssh_exception", "six", "jsonpickle", "exasol.toolbox.*",
"paramiko", "exasol"]
"paramiko", "exasol", "networkx.classes"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the exasol override, if yes then the question which repo is the offender

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we should fix it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2. Moved common.py -> base/import_build_step.py
3. Moved run_task.py -> base/run_task.py
from exasol_integration_test_docker_environment.cli.cli import cli
from exasol_integration_test_docker_environment.lib import api
from exasol_integration_test_docker_environment.lib.api.api_errors import HealthProblem
from exasol_integration_test_docker_environment.lib.models.api_errors import (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like you might change the external interface, because moving externally used files might break imports. i have the feeling, we really need to set up a check for potential API breakage. https://github.com/StardustDL/aexpy

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Increased Major version to 4.0.0

Comment thread doc/changes/unreleased.md Outdated
Co-authored-by: Torsten Kilias <tkilias@users.noreply.github.com>
@tomuben tomuben merged commit 734f689 into main Feb 13, 2025
@tomuben tomuben deleted the refactoring/430_split_common branch February 13, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split common.py

2 participants