From dc5f764654dd7282b2db622d00efefa3a85bd624 Mon Sep 17 00:00:00 2001 From: Yajo Date: Tue, 22 Mar 2022 12:25:38 +0000 Subject: [PATCH] feat: support Gitpod Just click on the readme badge and get into a full development environment with python, pytest and test debugging integration. --- .gitignore | 2 ++ .gitpod.yml | 4 ++++ .vscode/extensions.json | 5 +++++ .vscode/settings.json | 3 +++ Readme.md | 2 ++ setup.py | 9 +++++++++ 6 files changed, 25 insertions(+) create mode 100644 .gitpod.yml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index d1d6f31..d7b0521 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ debug/reqs.txt result debug/overrides.nix !.github +*.egg-info +/build \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..9495c88 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,4 @@ +# See https://www.gitpod.io/docs/config-gitpod-file + +tasks: + - init: pip install -e .[test] diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..3a390d4 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "ms-python.python" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f44ca33 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.testing.pytestEnabled": true +} \ No newline at end of file diff --git a/Readme.md b/Readme.md index 6a75364..fa03747 100644 --- a/Readme.md +++ b/Readme.md @@ -227,6 +227,8 @@ If a package is built by overriding nixpkgs, the following attributes are modifi ## Contributing Contributions to this project are welcome in the form of GitHub PRs. If you are planning to make any considerable changes, you should first present your plans in a GitHub issue so it can be discussed. +[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/DavHau/mach-nix) + ## Limitations - Currently mach-nix does not provide any functionality which supports you in publishing python projects, like [Poetry](https://python-poetry.org/) does for example. diff --git a/setup.py b/setup.py index a7e3e70..e744fb8 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,13 @@ pwd = dirname(abspath(__file__)) with open(pwd + '/mach_nix/VERSION') as f: version = f.read().strip() +test_deps = [ + 'pytest', +] +extras = { + 'test': test_deps, +} + setup( name='mach-nix', version=version, @@ -29,4 +36,6 @@ setup( 'toml', 'tree-format == 0.1.2', ], + tests_require=test_deps, + extras_require=extras, )