Comments (8)
I would involve:
- Adding an option for it (and default to pytest) in https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/cookiecutter.json#L17
- Adding it in the cookiecutter test builder suite https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/ci/setup.cfg#L1
- Run
./ci/bootstrap.py
to regenerate the test .cookiecutterrc files. - Changing the bare tox.ini to have an conditional for it, eg https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/%7B%7Bcookiecutter.repo_name%7D%7D/tox.ini#L43-L45
- Changing the template tox.ini (don't forget the raw sections) to have an conditional for it, eg https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/%7B%7Bcookiecutter.repo_name%7D%7D/ci/templates/tox.ini#L20-L24 (this tox.ini file is used with the test_matrix_configurator=yes option)
Then just push branch and make PR (Travis will run the tests) and we'll figure out what to do from there.
from cookiecutter-pylibrary.
If you get stuck, just make the PR with whatever you have so far.
from cookiecutter-pylibrary.
Thank, you. Will send a pull request.
from cookiecutter-pylibrary.
@ionelmc here is a pull: #9
What is the best way to test if it works correctly?
from cookiecutter-pylibrary.
If you wanna test locally you can run cookiecutter path/to/your/fork
.
You can also run the whole suite (just run tox
), but be warned, it will override your ~/.cookiecutterrc
- I will fix that soon-ish.
from cookiecutter-pylibrary.
@ionelmc could you please help me with tox?
I tried to run it locally, but have got this strange error:
test create: /Users/art/projects/cookiecutter-pylibrary/.tox/test
test installdeps: cookiecutter==1.0.0, bumpversion==0.5.1, tox==1.9.0
test runtests: PYTHONHASHSEED='2864253310'
test runtests: commands[0] | /Users/art/projects/cookiecutter-pylibrary/ci/test.cmd matrix-nosetests
ERROR: invocation failed (errno 13), args: ['/Users/art/projects/cookiecutter-pylibrary/ci/test.cmd', 'matrix-nosetests'], cwd: /Users/art/projects/cookiecutter-pylibrary
Traceback (most recent call last):
File "/Users/art/.local/bin/tox", line 9, in <module>
load_entry_point('tox==1.8.1', 'console_scripts', 'tox')()
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 26, in main
retcode = Session(config).runcommand()
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 310, in runcommand
return self.subcommand_test()
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 455, in subcommand_test
self.runtestenv(venv)
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 463, in runtestenv
venv.test(redirect=redirect)
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_venv.py", line 347, in test
self._pcall(argv, cwd=cwd, action=action, redirect=redirect)
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_venv.py", line 370, in _pcall
return action.popen(args, cwd=cwd, env=env, redirect=redirect)
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 97, in popen
stdout=f, stderr=STDOUT)
File "/Users/art/.local/venvs/tox/lib/python2.7/site-packages/tox/_cmdline.py", line 159, in _popen
stdout=stdout, stderr=stderr, env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
As I understand, cookiecutter-pylibrary/ci/test.cmd
is a script for windows environment, right? Why it is executed on OSX?
from cookiecutter-pylibrary.
My bad, I accidentally unset the exec perms on that file. Run chmod +x ci/test.cmd
to fix.
test.cmd
is just a shim (can run as both windows batch or unix shell).
from cookiecutter-pylibrary.
Seems I also have the wrong slash inside (should be ci/test.sh
instead of ci\test.sh
).
from cookiecutter-pylibrary.
Related Issues (20)
- Shortcut option to disable python 2 versions HOT 10
- Adding GitHub Actions workflows HOT 1
- Remove Landscape.io
- tox bootstrap fails HOT 2
- Error with bumpversion if not github hosting HOT 4
- pytest command does not work without workarounds HOT 5
- CI Bootstrapping errors HOT 8
- Distribution vs package naming HOT 4
- linter_config; or more broadly, options to enable automation HOT 3
- Generating CI configuration step fails
- Bad ``pre-commit`` reference for ``flake8``
- WARNING: autodoc: failed to import module 'XXX'; the following exception was raised: No module named 'pandas' HOT 5
- Add support for creating a virtual environment inside the rendered template HOT 4
- codecov coverage uploader is deprecated
- bumpversion didn't find 'version='0.0.0'' in file: 'setup.py'
- TemplateNotFound: .github\workflows\github-actions.yml HOT 1
- Multiple extensions modules from different languages HOT 2
- Bad configuration when sphnix_theme is set to furo
- Possible skip logic issue on codacy question? HOT 2
- ``bump2version`` is deprecated, new development is in **Bump My Version** HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-pylibrary.