Skip to content

Commit

Permalink
refactor: package folder structure to match python convention
Browse files Browse the repository at this point in the history
  • Loading branch information
arjendev committed Nov 23, 2023
1 parent e8e4dd5 commit af79d72
Show file tree
Hide file tree
Showing 32 changed files with 16 additions and 31 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,25 @@ jobs:
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
working-directory: ./src
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install project
working-directory: ./src
run: poetry install --no-interaction
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
working-directory: ./src
run: |
source .venv/bin/activate
pytest tests
pytest .
- name: Set build version and build package
working-directory: ./src
run: |
source .venv/bin/activate
poetry version 0.0.0.alpha${{ github.run_number}}
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./src/dist
packages-dir: ./dist
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ paket-files/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
.pytest_cache

# Cake - Uncomment if you are using it
# tools/**
Expand Down Expand Up @@ -396,4 +397,7 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
.idea
.idea

# Distributions / Releases
dist
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ repos:
rev: 1.6.1
hooks:
- id: poetry-check
args: ["-C", "./src"]
args: []
- id: poetry-lock
args: ["-C", "./src", "--no-update"]
args: ["--no-update"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
Expand All @@ -16,7 +16,7 @@ repos:
hooks:
- id: pytest
name: pytest
entry: poetry -C src run pytest src
entry: poetry -C src run pytest .
language: system
types: [python]
require_serial: true
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.activities.activity import Activity
from azure_data_factory_testing_framework.state import RunParameterType
from azure_data_factory_testing_framework.state.run_parameter import RunParameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# flake8: noqa: E501
import pytest

from azure_data_factory_testing_framework.models.activities.activity import Activity
from azure_data_factory_testing_framework.models.pipeline import Pipeline
from azure_data_factory_testing_framework.state import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.activities.activity import Activity
from azure_data_factory_testing_framework.state import RunParameterType
from azure_data_factory_testing_framework.state.run_parameter import RunParameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# flake8: noqa: E501
import pytest

from azure_data_factory_testing_framework.models.pipeline import Pipeline
from azure_data_factory_testing_framework.state import (
PipelineRunState,
Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions src/pyproject.toml → pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
name = "azure-data-factory-testing-framework"
version = "0.0.0"
description = ""
authors = ["Arjen Kroezen <[email protected]>"]
readme = "../README.md"
authors = ["Arjen Kroezen <[email protected]>", "Yennifer Santos <[email protected]>", "Jaya Kumar <[email protected]>", "Leonard Herold <[email protected]>"]
readme = "README.md"
license = "MIT"
include = [ "README.md", "LICENSE" ]

[tool.poetry.dependencies]
python = "^3.9"
Expand All @@ -24,6 +25,7 @@ pre-commit = "^3.5.0"
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


[tool.ruff]
select = [
"A", # flake8 builtins
Expand Down
1 change: 0 additions & 1 deletion src/.gitignore

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.exceptions.pipeline_not_found_error import PipelineNotFoundError
from azure_data_factory_testing_framework.models.activities.activity import Activity
from azure_data_factory_testing_framework.state import RunParameter, RunParameterType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.exceptions.pipeline_activities_circular_dependency_error import (
PipelineActivitiesCircularDependencyError,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.exceptions.dataset_parameter_not_found_error import (
DatasetParameterNotFoundError,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.exceptions.function_call_invalid_arguments_count_error import (
FunctionCallInvalidArgumentsCountError,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from typing import Any, Union

import azure_data_factory_testing_framework.functions.functions_collection_implementation as collection_functions
import pytest
from pytest import param

import azure_data_factory_testing_framework.functions.functions_collection_implementation as collection_functions


@pytest.mark.parametrize(
["collection", "value", "expected"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest

import azure_data_factory_testing_framework.functions.functions_string_implementation as string_functions
import pytest


@pytest.mark.parametrize(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.activities.activity import Activity
from azure_data_factory_testing_framework.models.activities.execute_pipeline_activity import ExecutePipelineActivity
from azure_data_factory_testing_framework.models.data_factory_element import DataFactoryElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.activities.for_each_activity import ForEachActivity
from azure_data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity
from azure_data_factory_testing_framework.models.data_factory_element import DataFactoryElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.activities.if_condition_activity import IfConditionActivity
from azure_data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity
from azure_data_factory_testing_framework.models.data_factory_element import DataFactoryElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.activities.set_variable_activity import SetVariableActivity
from azure_data_factory_testing_framework.models.activities.until_activity import UntilActivity
from azure_data_factory_testing_framework.models.data_factory_element import DataFactoryElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.exceptions.variable_being_evaluated_does_not_exist_error import (
VariableBeingEvaluatedDoesNotExistError,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from azure_data_factory_testing_framework.models.pipeline import Pipeline
from azure_data_factory_testing_framework.state import RunParameterType
from azure_data_factory_testing_framework.state.run_parameter import RunParameter
Expand Down

0 comments on commit af79d72

Please sign in to comment.