Commit graph

60 commits

Author SHA1 Message Date
Noortheen Raja
4983e67224 test: python completers have become flaky
fix: qa error, it is not a class method

still B019 is raised from bugbear

fix: failing vox tests in windows

fix: unc check on windows on ci

fix: vox failing on windows

get_binary_path already appends .exe
2022-03-22 19:13:11 +05:30
Oliver Bestwalter
7a04133611
implement vox create --prompt (#4676)
Pass the prompt arg through to venv.
Additionally, upgrade needs to be adjusted to keep a prompt setting if it is there.
2022-02-21 14:51:31 +05:30
Noortheen Raja
78091a22f3 style: isort imports
fix #4584
2022-01-31 11:16:51 -05:00
Noorhteen Raja NJ
b76d6f994f
refactor: break multi-line question (#4621)
ignore error in fish completions
2022-01-15 14:44:46 +05:30
Noorhteen Raja NJ
7c4e207abd
update test xsh usage (#4581)
* todo

* test: remove usage of DummyEnv and setting .env attribute on xession fixture

one step closer to making too much of tweaking to xession during tests

* test: fix tests vox and gitstatus-prompt

* docs: update test-fixture usage

* fix: import flake8 error

* test: remove direct access to XSH in tests

* test: remove usage of XSH in test files

* todo

* test: use tmp-dir to create stubs

* refactor: use fixture factory to mock out XonshSession

* refactor: remove direct access of XSH from functions

* refactor: remove direct access of XSH from functions

* fix: qa checks

* refactor: rename variables to match their values

* test: update failing tests because it had no PATH set previously

* fix: remove builtins usage from pyghooks.py

* style:

* refactor: update tests to use fixtures

* fix: env varialbe is setup per function

some tests accidentally update the env variables and that is leaking
into next tests

* fix: failing vox tests

* test: set commands_cache per test

* test: fix failing tests

* fix: failing tests on linux

ptk-highlight

* fix: failing tests on Windows

cwd-prompt

* test: copy env as to not affect original object

* fix: lazily evaluate cmds-cache in pyghooks

* test: fix failing tests

* fix: qa errors import

* test: set commands-cache per test

while caching path results

* test: speedup test_thread_local_swap

* fix: failing tests on windows

* refactor: Execer doesn't control session

* refactor: XSH.unload will take care of reversing builtins attrs set

* test: use env.update over monkeypatch

* Revert "test: use env.update over monkeypatch"

This reverts commit 010a5022247a098f1741966b8af1bf758663480e.
2022-01-07 17:33:22 -05:00
Noortheen Raja
f5367f6083 feat: add upgrade command
fixes #2095
2021-12-23 06:32:47 +05:30
Noorhteen Raja NJ
6d756ef7c9
Vox improvements (#4549)
* refactor: confirm before deleting the folder

fix: failing tests

* feat: shorter positional argument which is optional

cli-utils

* refactor: vox-default interpreter from system's default

* feat: add new vox commands info, wipe

* feat: add new vox commands toggle-ssp, runin, runinall

* feat: add new vox commands toggle-ssp, runin, runinall

* feat: add new vox commands project-set, project-get

* feat: implement vox new 'pip installs/requirements' and project linking

* test: update failing tests
2021-11-26 23:37:35 +05:30
Noorhteen Raja NJ
ca9338149c
fix: vox system_site_packages option not passed (#4404)
* fix: vox system_site_packages option not passed

* docs: add news item

* docs: add todo nit
2021-08-11 09:46:32 +03:00
Noorhteen Raja NJ
948129b7a0
feat: add flake8-bugbear (#4288)
* feat: add flake8-bugbear

* style: remove pylint disable comments

* chore: add flake8 as pre-push check

* chore: add bunch pf pre-commit hooks

* style: remove hasattr __call__
2021-05-26 23:15:34 +03:00
Noorhteen Raja NJ
38295a1dd9
Remove globals (#4280)
* refactor: remove usage of global variables in abbrevs.py

* chore: add flake8-mutable to prevent mutable defaults

* fix: abbrevs expand test

* refactor: add xonsh session singleton

* refactor: fix circular errors when using xonshSession as singleton

* refactor: remove black magicked builtin attributes

* style: black format tests as well

* refactor: update tests to use xonsh-session singleton

* refactor: update abbrevs to not use builtins

* test: remove DummyCommandsCache and patch orig class

* fix: failing test_command_completers

* test: use monkeypatch to update xession fixture

* fix: failing test_pipelines

* fix: failing test_main

* chore: run test suit as single invocation

* test: fix tests/test_xonsh.xsh

* refactor: remove builtins from docs/conf.py

* fix: mypy error in jobs

* fix: test error from test_main

* test: close xession error in test_command_completers

* chore: use pytest-cov for reporting coverage

this will include subprocess calls, and will increase coverage

* style:
2021-05-20 13:14:26 +03:00
Noortheen Raja
7fe724255f feat: upgrade black version to 20.8b1
this changes docstring indendation
but facilitates additional control over new lines with comma
2020-11-25 12:46:35 +05:30
Noortheen Raja
8c88030d6b refactor: some backlog from when flake8 setup 2020-11-08 23:31:10 +05:30
Noortheen Raja
197251e818 fix: during amalgamate it removes type-ignore comments 2020-10-09 20:19:09 +05:30
Bob Hyman
a9048d2841 Allow "ANSICON", "TERM", "VIRTUAL_ENV" registered envvars to not be in env. 2020-09-07 20:39:35 -04:00
David Strobach
f4794caef7 vox: Fix virtual environment removal
Virtual environment was impossible to delete after
activation/deactivation cycle.
2020-08-23 20:49:32 +02:00
David Strobach
5c2e5a3d8d vox: Restore vox functionality
After the recent changes in environment defaults, the vox xontrib
could not "see" the virtual environments and work with them.
2020-08-23 11:16:26 +02:00
Caleb Hattingh
b4b5d262c7 Add the new path parameter to the documentation. 2019-08-15 23:23:26 +10:00
Caleb Hattingh
220923f084 Include path as a kwarg on activate and deactivate events 2019-08-14 17:50:06 +10:00
Caleb Hattingh
16edba8fe8 Apply abspath() to the env_dir, and add a test to verify. 2019-08-04 12:20:04 +10:00
Caleb Hattingh
2c4b64ad16 vox activate - use absolute path in $PATH 2019-08-03 12:11:22 +10:00
Gil Forsyth
258c2fc610 Run black on all bundled xontribs 2019-04-26 11:11:11 -04:00
Anthony Scopatz
e4c6a2fd2c
remove empty args 2019-01-02 18:45:47 -05:00
Stephan Fitzpatrick
38da59fcc9 use list as opposed to shlex for command parsing 2018-12-30 03:15:39 -08:00
Stephan Fitzpatrick
e073545077 python 3.4/3.5 compat for vox 2018-12-21 18:39:26 -08:00
Stephan Fitzpatrick
fa75b37737 python 3.4 support 2018-12-21 14:40:31 -08:00
Stephan Fitzpatrick
fe39472ddb derp 2018-12-20 20:36:41 -08:00
Stephan Fitzpatrick
51c31a6b40 allow user to invoke specific interpreter for vox virtualenv creation 2018-12-20 20:27:47 -08:00
Sagar Tewari
9ceba90335 fixed news.rst and made vox check for python executable to find venvs 2018-11-14 20:22:18 +05:30
Sagar Tewari
97acffb8b1 addressed issue 2929 2018-11-13 23:39:26 +05:30
Anthony Scopatz
2264f72b45 fixed some more bugs 2018-09-13 17:08:01 -04:00
Sagar Tewari
968af51d61 Fixed a typo
added changelog
2018-08-25 11:49:13 +05:30
Sagar Tewari
506b8c94d5 fixed issue 2785 2018-08-25 11:15:32 +05:30
Stephan Fitzpatrick
650524bd9b fixes valueerror raises when executing vox list -- originally caused by modifying dirnames in-place while iterating over it 2018-08-15 14:33:55 -07:00
Anthony Scopatz
ca49e2e246 more style fixes 2018-07-15 17:26:22 -05:00
Gil Forsyth
da1f0a3d91 Merge pull request #2368 from anddam/anddam-patch-1
Minor change: fix typo, rephrase sentence
2017-05-01 09:24:05 -04:00
Andrea D'Amore
4784f7cd1a Minor change: fix typo, rephrase sentence 2017-04-28 23:23:34 +02:00
Jamie Bliss
39102ee401 Update vox_on_* 2017-01-14 19:06:49 -05:00
Jamie Bliss
5e5921802d add fspath support to vox 2016-12-09 23:14:41 -05:00
Jamie Bliss
ce98aa8fa9 Allow activation of environments in relative directories.
Also disallow the creation of venvs with reserved names
2016-10-02 21:49:38 -04:00
Jamie Bliss
50a412e798 don't override built-in names 2016-09-13 21:22:14 -04:00
Jamie Bliss
2afbdcc1dd Overtesting on Windows 2016-09-13 21:01:50 -04:00
Jamie Bliss
24887c59d8 Normalize paths, so that shenanigans get smoothed out 2016-09-13 20:58:03 -04:00
Jamie Bliss
dc8c5b5b53 Finally fix __iter__() so subdirs work correctly.
Also add a test for subdirs
2016-09-13 20:49:34 -04:00
Jamie Bliss
e2c981de78 Add an explicit (and more correct) __contains__() 2016-09-13 20:29:44 -04:00
Jamie Bliss
26c78b1642 Be more complete and helpful about the contents of venv dirs 2016-09-13 20:22:13 -04:00
Jamie Bliss
2e24b9a698 Deal with leading backslash, too 2016-08-28 23:34:11 -04:00
Jamie Bliss
d8bc83cd51 Add some documentations 2016-08-28 13:43:08 -04:00
Jamie Bliss
0d791d1bea Add events to vox. 2016-08-28 13:37:23 -04:00
Jamie Bliss
1fb5ee1757 flake8 2016-08-04 22:28:21 -04:00
Jamie Bliss
c305592c0b Remove leftover debugging statement 2016-07-30 03:36:59 -04:00