Skip to content

Commit

Permalink
Use pyproject.toml instead of setup.py (#33)
Browse files Browse the repository at this point in the history
* Use pyproject.toml instead of setup.py

* Use pyproject.toml instead of setup.py

* Use pyproject.toml instead of setup.py
  • Loading branch information
ismailsimsek authored Nov 19, 2024
1 parent e5d8bbd commit b91ffae
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
pip install -q .[test] --prefer-binary
python --version
python -c "from dbt.version import get_installed_version as get_dbt_version;print(f'dbt version={get_dbt_version()}')"
python -m compileall -f opendbt setup.py
python -m compileall -f opendbt
- name: Run Tests
run: |
python -c "from dbt.version import get_installed_version as get_dbt_version;print(f'dbt version={get_dbt_version()}')"
python -m coverage run --source=./tests/ -m unittest discover -s tests/
python -m coverage report -m ./opendbt/*.py setup.py
python -m coverage report -m ./opendbt/*.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
logs
**.duckdb
**.user.yml
reset.sh
Expand Down
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "opendbt"
version = "0.8.0"
authors = [
{ name = "Memiiso Organization" },
]
description = "opendbt dbt-core with additional features"
readme = "README.md"
requires-python = ">=3.8"
keywords = ["dbt-core", "dbt"]
license = { text = "Apache License 2.0" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
]
dependencies = [
"dbt-duckdb>=1.6",
"sqlfluff",
"sqlfluff-templater-dbt"
]
[project.optional-dependencies]
airflow = ["apache-airflow"]
test = ["testcontainers>=3.7,<4.9", "apache-airflow"]

[tool.setuptools]
include-package-data = true
packages = ["opendbt"]

[project.scripts]
opendbt = "opendbt.__main__:main"

[project.urls]
Homepage = "https://github.com/memiiso/opendbt"
Documentation = "https://github.com/memiiso/opendbt"
Repository = "https://github.com/memiiso/opendbt"
33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/resources/airflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL authors="opendbt"
# install additional packages
COPY --chown=airflow:airflow opendbt /tmp/opendbt/opendbt
COPY --chown=airflow:airflow README.md /tmp/opendbt/README.md
COPY --chown=airflow:airflow setup.py /tmp/opendbt/setup.py
COPY --chown=airflow:airflow pyproject.toml /tmp/opendbt/pyproject.toml

RUN pip install -e /tmp/opendbt/
EXPOSE 8080

0 comments on commit b91ffae

Please sign in to comment.