-
Notifications
You must be signed in to change notification settings - Fork 101
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
Clean up tox ini #105
Clean up tox ini #105
Conversation
@@ -1,9 +1,5 @@ | |||
dbt-core==0.19.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were duplicate, i.e. already present in setup.py
requirements.txt
Outdated
@@ -1,9 +1,5 @@ | |||
dbt-core==0.19.0 | |||
pyodbc>=4.0.27 | |||
azure-identity>=1.4.0 | |||
black~=20.8b1 | |||
pytest-dbt-adapter~=0.4.0 | |||
tox==3.2.0 | |||
flake8>=3.5.0 | |||
certifi==2020.6.20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this used in the package? Or something like tox
and flake
, i.e. used when developing the package.
tox.ini
Outdated
@@ -1,18 +1,6 @@ | |||
[tox] | |||
skipsdist = True | |||
envlist = unit, flake8, integration-sqlserver, integration-synapse | |||
envlist = py37,py38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our test suite is ran for python 3.7 and 3.8
dev_requirements.txt
Outdated
@@ -1,9 +1,6 @@ | |||
dbt-core==0.19.0 | |||
pyodbc>=4.0.27 | |||
azure-identity>=1.4.0 | |||
black~=20.8b1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed it to dev_requirements
since it are the packages you need to install for local development. Dbt also has a dev_requirements.txt
tox.ini
Outdated
[testenv] | ||
commands = pytest {posargs} | ||
deps = pytest~=6.2.2 pytest-dbt-adapter~=0.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are the test dependencies
.circleci/config.yml
Outdated
@@ -6,7 +6,9 @@ orbs: | |||
|
|||
jobs: | |||
integration-sqlserver: &sqlserver | |||
docker: | |||
docker: | |||
- image: cimg/python:3.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this to run testing for multiple python versions
@swanderz : When I try to install multiple python versions the CI does not work. Could you help? |
setup.py
Outdated
@@ -57,8 +57,8 @@ def _dbt_sqlserver_version(): | |||
] | |||
}, | |||
install_requires=[ | |||
'dbt-core~=0.19.0', | |||
"dbt-core>=0.19.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fairly certain that we want to keep the tilde character bc (according to this SO answer), it is a combination of to a combination of the following clauses:
>= 0.19.0
and== 0.19.*
This way a user will get an error if they try to install dbt-core==0.20.0
before we cut a compatible release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that is true. Though, we might miss when there is a new minor version and thus forget to leverage that.
The projects I use as examples - like [tox](https://github.com/tox-dev/tox/blob/master/setup.cfg)
or [pre-commit](https://github.com/pre-commit/pre-commit/blob/master/setup.cfg)
- have lower bounded requirement version. Sometimes you see an upper bound for the major release dbt-core>=0.19.0,<1.0.0
.
I think the idea is that dbt-core
should be backwards compatible for minor releases, however, it could of course happen that that is not the case.
I will change it back to the ~
for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. no strong opinion here. @mikaelene might have one though!
for "unauthorized" issue, there's a setting that should is already enabled for this repo:
https://circleci.com/docs/2.0/oss/#example-open-source-projects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totally on board with this clean up. next steps (as I see them):
- pull in Add pytest for unit testing #103
- get CircleCI jobs passing
- add entry to changelog
- get consensus from Mikael and Jeremy on this new approach
…r into clean-up-tox-ini
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're ready to merge. much cleaner now IMHO. @mikaelene -- I approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a tox expert. Looks good to me and the tests seems to work. Always good to clean things up :-). We don't have that much code to keep clean.
As discussed in #103, here some suggestion to change the use of
setup.py
,requirements.txt
andtox.ini
. I think we should merge #103 first and sync this with that one.