Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish to v0.0.1-alpha #7

Merged
merged 11 commits into from
Oct 13, 2023
28 changes: 14 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ jobs:
run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry install
# - name: Bump package version
# run: |
# poetry version ${{ needs.get-new-tag.outputs.tag-id }}
# echo '__version__ = "${{ needs.get-new-tag.outputs.tag-id }}"' > databooks/version.py
# - name: Configure PiPy, version and build
# run: |
# poetry config pypi-token.pypi ${{ secrets.PIPY_TOKEN }}
# poetry config repositories.test-pypi https://test.pypi.org/legacy/
# poetry config pypi-token.test-pypi ${{ secrets.TEST_PIPY_TOKEN }}
# poetry build
# - name: Publish packages
# run: |
# poetry publish -r test-pypi
# poetry publish
- name: Bump package version
run: |
poetry version ${{ needs.get-new-tag.outputs.tag-id }}
echo '__version__ = "${{ needs.get-new-tag.outputs.tag-id }}"' > prefect_dbt_flow/version.py
- name: Configure PiPy, version and build
run: |
poetry config pypi-token.pypi ${{ secrets.PIPY_TOKEN }}
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{ secrets.TEST_PIPY_TOKEN }}
poetry build
- name: Publish packages
run: |
poetry publish -r test-pypi
poetry publish
- name: Tag
uses: actions/github-script@v5
with:
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,43 @@ name: 'tests'
on: [push, pull_request]

jobs:
tests:
linting:
env:
POETRY_VERSION: 1.5.0 # set your poetry version here
POETRY_VERSION: 1.5.1
runs-on: ubuntu-latest
strategy: # drop this if you only want to test for a specific version
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} # or your python specific version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }} # or your python specific version
python-version: ${{ matrix.python-version }}
- name: setup poetry
run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
- name: run precommit hooks
run: pre-commit run --all-files
tests:
env:
POETRY_VERSION: 1.5.1
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: setup poetry
run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
- name: run pytest
run: poetry run pytest
11 changes: 1 addition & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,4 @@ repos:
language: system
pass_filenames: false
always_run: true
fail_fast: true
# - id: pytest
# name: pytest
# stages: [commit]
# types: [python]
# entry: poetry run pytest
# language: system
# pass_filenames: false
# always_run: true
# fail_fast: true
fail_fast: true
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,24 @@ pip install prefect-dbt-flow
### Create a flow

``` python
TODO flow description
import prefect_dbt_flow as dbtFlow

my_flow = dbtFlow.dbt_flow(
project=dbtFlow.DbtProject(
name="my_flow",
project_dir="path_to/dbt_project",
profiles_dir="path_to/dbt_profiles",
),
profile=dbtFlow.DbtProfile(
target="dev",
),
dag_options=dbtFlow.DbtDagOptions(
run_test_after_model=True,
),
)

if __name__ == "__main__":
my_flow()
```

## License
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- [x] Feature: Basic DAG generation
- [x] Make sure everything is typed (and checked with mypy)
- [ ] Add cicd to push package to pypi
- [x] Add cicd to push package to pypi
- [x] Documentation
- [ ] Add basic example
- [ ] Add some simple tests
Expand Down
Loading