-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add contributing docs #453
Conversation
Nice work, I guess it'd be nice to split this into multiple PRs so reviewing it can be easier. |
You want to split adding docker and adding windows compatibility in separate PRs? |
yeah and contributing docs too. |
But contributing already includes a section about running tests with docker, so you want me to create a separate version that will be overwritten by the next pr? 😛 |
OK now it's only docker support and contributing |
@aminalaee Any chance for a review of those 2 (plus #454 )? |
To be honest I've taken a look but I'm not sure if it's the best approach. Sorry I appreciate the effort but I wouldn't like that. You can also wait for someone else maybe they do have a different opinion here. I would personally leave docker out of this and only do the contributing docs here. I'll put the comment for the other one there. |
@aminalaee The alternative is a need to install all databases servers on your local machine but that post several problems, among others:
You get a virtual environment in python for a reason, to separate it from other projects. Not to mention it's still fully optional. You want to test as you do now - sure, you got it - run tests against CI as you do now and everything works as it used to. |
Yeah I understand the use case and I am familiar with docker. Don't get me wrong. The question is not that if we should use docker or not. I already have a docker-compose.yml file and set everything up and run the tests. In some cases you don't even need to test with all databases, as you're changing a single backend. This is such a general question/issue I think we can ask for feedback from @encode/maintainers here. |
Ok, you are right - it's a valid question. For me, the benefits are:
If we don't want to add the code maybe a sample configuration in contributing docs? |
…_local_tests_and_support_windows
…com/encode/databases into add_local_tests_and_support_windows
@aminalaee OK, I left only contributing docs, can you review it again? |
|
||
## Contribute | ||
|
||
1. Formatting and linting - databases uses black for formatting, autoflake for linting and mypy for type hints check |
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.
The ./scripts/lint
won't run mypy, when you run ./scripts/test
it will call ./scripts/check
which does those checks. Needs a bit of re-wording.
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.
why? It should run mypy:
Lines 10 to 13 in f8bff8f
${PREFIX}autoflake --in-place --recursive databases tests | |
${PREFIX}isort --project=databases databases tests | |
${PREFIX}black databases tests | |
${PREFIX}mypy databases |
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.
Hmmm. In all other encode projects we don't have that line.
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.
Should we unify this or do I leave it as it is?
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 it's worth unifiying it, but not that important really. Up to you.
Co-authored-by: Eric Jolibois <[email protected]>
Co-authored-by: Eric Jolibois <[email protected]>
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.
Nice 👍
Allows testing all backends on local using docker.
Added contributing section in docs.