From c56de4bb107a16ccf1437af7ec0824359e9cbee7 Mon Sep 17 00:00:00 2001 From: Michael Marchetti Date: Mon, 16 Oct 2023 08:23:08 -0400 Subject: [PATCH 1/2] Don't exclude environment directories by name --- rsconnect/bundle.py | 4 ---- tests/test_bundle.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/rsconnect/bundle.py b/rsconnect/bundle.py index cd0a5093..2bb9cdfd 100644 --- a/rsconnect/bundle.py +++ b/rsconnect/bundle.py @@ -39,17 +39,13 @@ # noinspection SpellCheckingInspection directories_ignore_list = [ ".Rproj.user/", - ".env/", ".git/", ".svn/", - ".venv/", "__pycache__/", - "env/", "packrat/", "renv/", "rsconnect-python/", "rsconnect/", - "venv/", ] directories_to_ignore = {Path(d) for d in directories_ignore_list} diff --git a/tests/test_bundle.py b/tests/test_bundle.py index 663796bf..145b4037 100644 --- a/tests/test_bundle.py +++ b/tests/test_bundle.py @@ -537,10 +537,6 @@ def test_keep_manifest_specified_file(self): self.assertFalse(keep_manifest_specified_file("rsconnect-python")) self.assertFalse(keep_manifest_specified_file("rsconnect-python/bogus.file")) self.assertFalse(keep_manifest_specified_file(".svn/bogus.file")) - self.assertFalse(keep_manifest_specified_file(".env/share/jupyter/kernels/python3/kernel.json")) - self.assertFalse(keep_manifest_specified_file(".venv/bin/activate")) - self.assertFalse(keep_manifest_specified_file("env/pyvenv.cfg")) - self.assertFalse(keep_manifest_specified_file("venv/lib/python3.8/site-packages/wheel/__init__.py")) # noinspection SpellCheckingInspection self.assertFalse(keep_manifest_specified_file(".Rproj.user/bogus.file")) From 749a839b853317a14b5d625d8cb0ed6a3705733d Mon Sep 17 00:00:00 2001 From: Michael Marchetti Date: Mon, 16 Oct 2023 08:25:06 -0400 Subject: [PATCH 2/2] udpate changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ce5225c..45dff38c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - The `https_proxy` environment variable is recognized as a synonym for `HTTPS_PROXY`. +- Common environment directories (`env, venv, .env, .venv`) are no longer + excluded by name. Environments are detected by the presence of a python + executable in `bin` or `Scripts` and excluded. ### Added - Added support for the `no_proxy` or `NO_PROXY` environment variables to specify