Skip to content

Commit

Permalink
Merge pull request #4 from ollionorg/bug-01
Browse files Browse the repository at this point in the history
fix: discover dtype issue and test cases added
  • Loading branch information
jatinyadav-cc authored Jan 19, 2024
2 parents ce75540 + 6f0d359 commit 2a79df6
Show file tree
Hide file tree
Showing 9 changed files with 267 additions and 65 deletions.
3 changes: 3 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These owners will be the default owners for everything in
# the repo.
* @ollionorg/datapipes-repo-admin @rishabh-cldcvr @jatinyadav-cc
21 changes: 21 additions & 0 deletions airbyte-integrations/connectors/source-file/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [1.2.4] - 2024-01-18

Here we would have the update steps for 1.2.4 for people to follow.

### Added

### Changed

- Added the test case for [test_dtype_to_json_type](https://github.com/ollionorg/datapipes-airbyte/blob/ce7554021f15fb981aacbf74031f9dfea5cf2143/airbyte-integrations/connectors/source-file/unit_tests/test_client.py#L102) .

### Fixed
- fixed the mapping between pandas dtype to airbyte types.

37 changes: 37 additions & 0 deletions airbyte-integrations/connectors/source-file/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM python:3.9-slim as base

# Install libassuan0 package
RUN apt-get clean
RUN apt-get update && apt-get install -y libldap2-dev rng-tools libbz2-dev zlib1g-dev libsqlite3-dev libreadline-dev pcscd scdaemon
RUN apt-get install -y make wget file pinentry-tty ca-certificates lbzip2 bzip2 gcc

ARG GPG_VERSION=2.4.3
ENV GPG_VERSION "gnupg-$GPG_VERSION"
RUN wget "https://gnupg.org/ftp/gcrypt/gnupg/${GPG_VERSION}.tar.bz2"
RUN wget "https://gnupg.org/ftp/gcrypt/gnupg/${GPG_VERSION}.tar.bz2.sig"
RUN tar xf ${GPG_VERSION}.tar.bz2
RUN ln -s ${GPG_VERSION} gpg
RUN cd ${GPG_VERSION} && make -f build-aux/speedo.mk native INSTALL_PREFIX=/usr/local -j4
RUN ldconfig
RUN gpg -K

FROM base as builder

WORKDIR /airbyte/integration_code
COPY setup.py ./
RUN pip install --prefix=/install .

# Copy GPG from the builder stage to the final base stage
FROM base
#COPY --from=builder /usr/bin/gpg /usr/bin/gpg
COPY --from=builder /install /usr/local

WORKDIR /airbyte/integration_code
COPY main.py ./
COPY source_file ./source_file

ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.33-v4.4.3
LABEL io.airbyte.name=airbyte/source-file
3 changes: 2 additions & 1 deletion airbyte-integrations/connectors/source-file/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
"lxml==4.9.1",
"html5lib==1.1",
"beautifulsoup4==4.11.1",
"pyarrow==9.0.0",
"pyarrow==13.0.0",
"xlrd==2.0.1",
"openpyxl==3.0.10",
"pyxlsb==1.0.9",
"python-gnupg==0.5.2",
]

TEST_REQUIREMENTS = ["requests-mock~=1.9.3", "pytest~=6.2", "pytest-docker~=2.0.1", "pytest-mock~=3.6.1"]
Expand Down
Loading

0 comments on commit 2a79df6

Please sign in to comment.