Conversation
@roll cool. I've got a version that looks almost the same to push to a generic example repo, hopefully today. |
@pwalsh With this tweak @vitorbaptista's suggestion about |
author='Open Knowledge Foundation', | ||
author_email='info@okfn.org', | ||
url='https://github.com/okfn/tabulator-py', | ||
license=LICENSE, |
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.
AFAIK, the license
here should be just MIT
, BSD-3
, GPL
, etc., and not the actual license text.
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 had the same feeling when writing it. I don't know why we read it. It looks like the issue was introduced earlier [TOFIX]
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.
that is correct, it shouldn't be here. usually people concat license text into readme for long description.
Great job, @roll! This is looking really good! I just have a couple suggestions. ToxInstead of using setup.py's test_requires, let tox handle them. The only requirement in test_requires would be tox itself. The non-test dependencies don't need to be there as well, as tox automatically installs our package (which should bring all of its dependencies). The [tox]
envlist=
py27
py33
py34
py35
[testenv]
deps=
pylint
mock
pytest
pytest-cov
coverage
coveralls
commands=
py.test tests \
--cov-config .coveragerc \
--cov-report term-missing \
{posargs} Actually, linting in my opinion is also a type of test, so it also should be handled by tox. With this sugestion, the [tox]
envlist=
py27
py33
py34
py35
lint
[testenv]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps=
mock
pytest
pytest-cov
coverage
coveralls
commands=
py.test \
--cov tabulator \
--cov-config .coveragerc \
--cov-report term-missing \
{posargs}
[testenv:lint]
deps=
{[testenv]deps}
pytest-pylint
commands=
py.test \
--pylint tabulator Note that I've also added My reasoning for linting by default is that, when developing I'm happy with whatever is decided, though. MakefileConsidering that Tox handles testing and linting, there are two remaining rules in the Makefile: running coveralls and installing the packages. We will only run coveralls inside Travis, so adding that logic inside There's also nothing special in how to install Tabulator. Simply running Given that, I think a Makefile is unnecessary for tabulator. It would be useful for packages that use Sphinx for the docs or other build tasks, but most of our projects won't have any. |
@vitorbaptista @roll great stuff. Other stuff I have in a WIP here on machine:
Then the CI is configured to deploy to These are the type of tasks that I want to keep a makfile around for. |
Also, |
@vitorbaptista
fails because in our venv only tox installed - not our test dependencies. They will be installed only in tox's venvs (if I correctly understand how tox works). |
@roll that is right. I like the whole thing @vitorbaptista has brought in here with tox very very much, but I want to be able to run pylint etc in a frictionless way too. Because of this, I think we still use Here is a slightly cleaner setup.py for that, based on what you had in the storages repo (expects text file
|
Also making tox.ini different for examples for 10 GOOG integrations = +10 tox.ini to maintain :) I think we have to be flexible here - if some big packages with many contributors like The main thing of unification could be maintaining off small similar packages. Let minimize here time to work with them! Like every developer should know only |
@roll sure, everything is and should be flexible. But as you see, we have a wide range of coding styles across various packages, so while of course, every package will still have its own particulars, we're doing this bike shedding now to help ease the burden as new people come in, and so that there is more or less the same pattern for anyone who wants to contribute. It is a real issue right now across our Python and JS libs. |
It's a standard (some requirements.txt) - no doubts dev will open those files (we should add comments on top of that like it's |
@roll that's why people use tox to handle linting as well. The process then becomes:
If I want to just lint, simply do You guys certainly know this post, but there's a difference between the purpose of |
@vitorbaptista About the famous post. Yes, of course. But I suppose main thought there is to understand logical difference between lib vs app deps. Just a deal of technique how we name it. But I agree:
|
@roll ( cc @vitorbaptista ) Evgeny, I pushed this basic repo but want to make sure that the final config is as you and Vitor agreed. Please go over what is there and make all changes based on last discussion on Tabulator. We've already discussed enough here, so just push directly onto master here and ping when done on #tech so all can see. Don't worry about any small unclear issues - we'll definitely adjust over time as people bring different perspectives. Then obviously close off these branches on tabulator, and make your final changes here so we can publish to pypi |
I've done some small modifications to |
@vitorbaptista issues disabled on purpose. Use coding-standards. Giving you ownership now. |
Work based on #40 PR and discussion.
All things in PR above
Included - pylint, travis, no activate, no editorconfig, no requirements.txt etc
Make for tasks
As discussed in the PR topic tox is a great test-runner but make is better suitable for run tasks. Also one of the main thing - there is no need to install make to do initial dependency install.
All metadata in setup.py
As suggested by @vitorbaptista the most pythonic way is to have all package metadata (except readme and version) in
setup.py
- that's true almost all devs look intosetup.py
to read it or figure out where to find it. So nopackage/info.json
,requirements*.txt
. Version has to be parsed from package (TODO, very simple).All tools available
After
make install
in venv contributor will be having all tools prepared to work. Environment variable has been removed fromtox
so all the toolspy.test, pylint, tox
etc could be used as usual withoutmake
call. Of course on high-level we providemake review
andmake test
.DRY
Unique files per project:
Initially standard files per project:
Basic contribution guide (only tech aspects) for this proposal - https://github.com/datapackages/tabulator-py/blob/feature/management-update/CONTRIBUTING.md - deadly simple with no deps to start.