cumulusci-plus 5.0.20__py3-none-any.whl → 5.0.21.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cumulusci-plus might be problematic. Click here for more details.

cumulusci/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "5.0.20"
1
+ __version__ = "5.0.21.dev0"
cumulusci/cumulusci.yml CHANGED
@@ -749,6 +749,14 @@ tasks:
749
749
  options:
750
750
  level: info
751
751
  group: Utilities
752
+ copy_file:
753
+ description: "Copy a file for src to dest with environment variable support, Ex: &TMPDIR&/src resolves to /tmp/src on linux or %TMPDIR%/src on windows."
754
+ class_path: cumulusci.tasks.util.CopyFile
755
+ group: Utilities
756
+ load_dot_env:
757
+ description: "Log the contents of the .env file"
758
+ class_path: cumulusci.tasks.util.LoadDotEnv
759
+ group: Utilities
752
760
  configure_env:
753
761
  description: Get or set environment variables.
754
762
  class_path: cumulusci.tasks.utility.env_management.EnvManagement
@@ -68,7 +68,7 @@ class CreateBlankProfile(BaseSalesforceMetadataApiTask):
68
68
  def _get_profile_id(self, profile_name):
69
69
  """Returns the Id of a Profile from a given Name"""
70
70
  res = self._query_sf(
71
- f"SELECT Id, Name FROM Profile WHERE FullName = '{profile_name}' LIMIT 1"
71
+ f"SELECT Id, Name FROM Profile WHERE Name = '{profile_name}' LIMIT 1"
72
72
  )
73
73
  if res["records"]:
74
74
  return res["records"][0]["Id"]
@@ -124,7 +124,7 @@ def test_run_task_success():
124
124
  result = task._run_task()
125
125
  assert result == "001R0000029IyDPIA0"
126
126
  assert responses.calls[0].request.params == {
127
- "q": "SELECT Id, Name FROM Profile WHERE FullName = 'Test Profile Name' LIMIT 1"
127
+ "q": "SELECT Id, Name FROM Profile WHERE Name = 'Test Profile Name' LIMIT 1"
128
128
  }
129
129
  assert responses.calls[1].request.params == {
130
130
  "q": "SELECT Id, Name FROM UserLicense WHERE Name = 'Foo' LIMIT 1"
@@ -281,7 +281,7 @@ def test_run_task_success_with_skip_if_exists_false():
281
281
 
282
282
  assert result == "10056000000VGjUAAW"
283
283
  assert responses.calls[0].request.params == {
284
- "q": "SELECT Id, Name FROM Profile WHERE FullName = 'Test Profile Name' LIMIT 1"
284
+ "q": "SELECT Id, Name FROM Profile WHERE Name = 'Test Profile Name' LIMIT 1"
285
285
  }
286
286
 
287
287
 
@@ -182,6 +182,47 @@ class TestUtilTasks:
182
182
 
183
183
  assert os.path.exists(dest)
184
184
 
185
+ @pytest.mark.skipif(os.name == "posix", reason="Only run on POSIX systems")
186
+ def test_CopyFileVars(self):
187
+ src_expanded = os.path.expandvars(os.path.join("$TMPDIR", "src"))
188
+ with open(src_expanded, "w"):
189
+ pass
190
+
191
+ src = os.path.join("&TMPDIR&", "src")
192
+ dest = os.path.join("&TMPDIR&", "dest")
193
+
194
+ task_config = TaskConfig({"options": {"src": src, "dest": dest}})
195
+ task = util.CopyFile(self.project_config, task_config, self.org_config)
196
+ task()
197
+
198
+ assert os.path.exists(os.path.expandvars(os.path.join("$TMPDIR", "dest")))
199
+
200
+ def test_CopyFileVars_Windows(self):
201
+ """Test CopyFile environment variable replacement on Windows."""
202
+ with mock.patch("os.name", "nt"): # Mock Windows
203
+ src = os.path.join("&TMPDIR&", "src")
204
+ dest = os.path.join("&TMPDIR&", "dest")
205
+
206
+ task_config = TaskConfig({"options": {"src": src, "dest": dest}})
207
+ task = util.CopyFile(self.project_config, task_config, self.org_config)
208
+
209
+ # On Windows, &TMPDIR& should become %TMPDIR%
210
+ assert task.options["src"] == os.path.join("%TMPDIR%", "src")
211
+ assert task.options["dest"] == os.path.join("%TMPDIR%", "dest")
212
+
213
+ def test_CopyFileVars_POSIX(self):
214
+ """Test CopyFile environment variable replacement on POSIX."""
215
+ with mock.patch("os.name", "posix"): # Mock POSIX
216
+ src = os.path.join("&TMPDIR&", "src")
217
+ dest = os.path.join("&TMPDIR&", "dest")
218
+
219
+ task_config = TaskConfig({"options": {"src": src, "dest": dest}})
220
+ task = util.CopyFile(self.project_config, task_config, self.org_config)
221
+
222
+ # On POSIX, &TMPDIR& should become $TMPDIR
223
+ assert task.options["src"] == os.path.join("$TMPDIR", "src")
224
+ assert task.options["dest"] == os.path.join("$TMPDIR", "dest")
225
+
185
226
  def test_LogLine(self):
186
227
  task_config = TaskConfig({"options": {"level": "debug", "line": "test"}})
187
228
  task = util.LogLine(self.project_config, task_config, self.org_config)
cumulusci/tasks/util.py CHANGED
@@ -1,5 +1,6 @@
1
1
  import glob
2
2
  import os
3
+ import re
3
4
  import shutil
4
5
  import time
5
6
 
@@ -220,9 +221,44 @@ class CopyFile(BaseTask):
220
221
  },
221
222
  }
222
223
 
224
+ def _init_options(self, kwargs):
225
+ super(CopyFile, self)._init_options(kwargs)
226
+ self.options["src"] = self.replace_env_vars(self.options["src"])
227
+ self.options["dest"] = self.replace_env_vars(self.options["dest"])
228
+
223
229
  def _run_task(self):
224
230
  self.logger.info("Copying file {src} to {dest}".format(**self.options))
225
- shutil.copyfile(src=self.options["src"], dst=self.options["dest"])
231
+ shutil.copyfile(
232
+ src=os.path.expandvars(self.options["src"]),
233
+ dst=os.path.expandvars(self.options["dest"]),
234
+ )
235
+
236
+ def replace_env_vars(self, text):
237
+ """
238
+ Environment variable replacement that handles:
239
+ - &VAR& -> $VAR (POSIX) or %VAR% (Windows)
240
+ """
241
+ if not text:
242
+ return text
243
+
244
+ pattern = r"\&([A-Za-z_][A-Za-z0-9_]*)\&"
245
+ if os.name == "posix":
246
+ # POSIX: Convert &VAR& to $VAR
247
+ replacement = r"$\1"
248
+ else:
249
+ # Windows: Convert &VAR$ to %VAR%
250
+ replacement = r"%\1%"
251
+
252
+ return re.sub(pattern, replacement, text)
253
+
254
+
255
+ class LoadDotEnv(BaseTask):
256
+ def _run_task(self):
257
+ from dotenv import load_dotenv
258
+
259
+ load_dotenv()
260
+
261
+ self.logger.info("Loaded .env file")
226
262
 
227
263
 
228
264
  class LogLine(BaseTask):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cumulusci-plus
3
- Version: 5.0.20
3
+ Version: 5.0.21.dev0
4
4
  Summary: Build and release tools for Salesforce developers
5
5
  Project-URL: Homepage, https://github.com/jorgesolebur/CumulusCI
6
6
  Project-URL: Changelog, https://cumulusci.readthedocs.io/en/stable/history.html
@@ -35,6 +35,7 @@ Requires-Dist: psutil
35
35
  Requires-Dist: pydantic<2
36
36
  Requires-Dist: pyjwt
37
37
  Requires-Dist: python-dateutil
38
+ Requires-Dist: python-dotenv
38
39
  Requires-Dist: pytz
39
40
  Requires-Dist: pyyaml
40
41
  Requires-Dist: requests
@@ -127,7 +128,7 @@ license](https://github.com/SFDO-Tooling/CumulusCI/blob/main/LICENSE)
127
128
  and is not covered by the Salesforce Master Subscription Agreement.
128
129
 
129
130
  <!-- Changelog -->
130
- ## v5.0.20 (2025-09-05)
131
+ ## v5.0.21 (2025-09-08)
131
132
 
132
133
  <!-- Release notes generated using configuration in .github/release.yml at main -->
133
134
 
@@ -135,6 +136,6 @@ and is not covered by the Salesforce Master Subscription Agreement.
135
136
 
136
137
  ### Changes
137
138
 
138
- - Add Skil If Exists for create profile check by [@rupeshjSFDC](https://github.com/rupeshjSFDC) in [#65](https://github.com/jorgesolebur/CumulusCI/pull/65)
139
+ - Fix profile query from tooling api field to simple salesforce. by [@rupeshjSFDC](https://github.com/rupeshjSFDC) in [#67](https://github.com/jorgesolebur/CumulusCI/pull/67)
139
140
 
140
- **Full Changelog**: https://github.com/jorgesolebur/CumulusCI/compare/v5.0.19...v5.0.20
141
+ **Full Changelog**: https://github.com/jorgesolebur/CumulusCI/compare/v5.0.20...v5.0.21
@@ -1,8 +1,8 @@
1
- cumulusci/__about__.py,sha256=6sp8USgxlu5swzTs5D2mB0JR7vz8Xn-HA4oObvKMK48,23
1
+ cumulusci/__about__.py,sha256=i3WMS_7Fb8CAKGyU--F6gXeqPc104FDF2sr-0guxcIQ,28
2
2
  cumulusci/__init__.py,sha256=jdanFQ_i8vbdO7Eltsf4pOfvV4mwa_Osyc4gxWKJ8ng,764
3
3
  cumulusci/__main__.py,sha256=kgRH-n5AJrH_daCK_EJwH7azAUxdXEmpi-r-dPGMR6Y,43
4
4
  cumulusci/conftest.py,sha256=AIL98BDwNAQtdo8YFmLKwav0tmrQ5dpbw1cX2FyGouQ,5108
5
- cumulusci/cumulusci.yml,sha256=5w0fVZqfgWu-RkNN_uHt1HnZqpDM0f4WySCNxpcLjE4,73262
5
+ cumulusci/cumulusci.yml,sha256=qkUOhpQwa75QUL1fZZPHGqDS3UXkGnAi81mEYv0R92Y,73665
6
6
  cumulusci/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  cumulusci/cli/cci.py,sha256=yAq8jFoGde6g_1TeAAjzZYsk77itiONCQGBFe3g3nOs,11836
8
8
  cumulusci/cli/error.py,sha256=znj0YN8D2Grozm1u7mZAsJlmmdGebbuy0c1ofQluL4Q,4410
@@ -235,7 +235,7 @@ cumulusci/tasks/dx_convert_from.py,sha256=io-6S3Kfp86GR7CAsHyFhPAW6XEtVKWVeJdNO0
235
235
  cumulusci/tasks/metadeploy.py,sha256=33AX5701G2fyu42wNY9mitKAXq04Dxpg_WMIK59d4P8,15787
236
236
  cumulusci/tasks/metaxml.py,sha256=S71Q1a9ovt3kYNoMAJRO-f2UsYSROYUWt278tfFTeaU,3547
237
237
  cumulusci/tasks/sfdx.py,sha256=hZQls5HMG_NfeqgfkhfG-VcuzF3WSWVWZWKivVGAPgo,2627
238
- cumulusci/tasks/util.py,sha256=FqUhbW2AQ1-yS4ozpNoSI13TwY3lqTaf9Zfu5dqK2NE,8531
238
+ cumulusci/tasks/util.py,sha256=FDd4dl-P6fSwvg1jU0508hoV9G8eeDeu5aDQ_dwZQ5k,9534
239
239
  cumulusci/tasks/apex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
240
  cumulusci/tasks/apex/anon.py,sha256=vlCD2E_jG9jwoQgsFs6RU8g8z1aN2g30edVYcZVshFE,5923
241
241
  cumulusci/tasks/apex/batch.py,sha256=TeDy3KeJBbtdzQXG8eoH0fcUCnRgU8XGAsePc3iXzT8,6779
@@ -538,7 +538,7 @@ cumulusci/tasks/salesforce/network_member_group.py,sha256=sWkRr4A6Zm_Iv_7uzPmiNj
538
538
  cumulusci/tasks/salesforce/nonsourcetracking.py,sha256=kKaQGEOErCIaE53A_TO4Hc5Afhv2aIi97UjPAN-4cQM,8720
539
539
  cumulusci/tasks/salesforce/org_settings.py,sha256=0Xg_voNeHV94husGpo7HTpA0QpqQ1NBJKqBsvLM24NA,7105
540
540
  cumulusci/tasks/salesforce/package_upload.py,sha256=AKrguElY4cTprmReq4s5BtIuG-QoxeaP9-YT8385Hzo,13024
541
- cumulusci/tasks/salesforce/profiles.py,sha256=nW1UIx0wPdLOgpfXFh7VZqCMzIJYz357hU77Xwf-IL0,3852
541
+ cumulusci/tasks/salesforce/profiles.py,sha256=vvru3hu586EgcSvtzYJZV7BfoP_x83ZjzRty1l0vbjY,3848
542
542
  cumulusci/tasks/salesforce/promote_package_version.py,sha256=2mD_iOzkbelaglH_NJKfR_MJoJOVpnqPuaGmnRTL5Go,15186
543
543
  cumulusci/tasks/salesforce/retrieve_profile.py,sha256=VTO--xWQJ7sidMMkvrfvgd2fSUaumQWJK25Aqa0oSNU,7798
544
544
  cumulusci/tasks/salesforce/salesforce_files.py,sha256=91VHtOkZzi9Tabfy0IDFWBW5bZPi8xOPb_4RPCqmFaY,9193
@@ -583,7 +583,7 @@ cumulusci/tasks/salesforce/tests/test_install_package_version.py,sha256=f_hHO83v
583
583
  cumulusci/tasks/salesforce/tests/test_network_member_group.py,sha256=N0ZXcy74nNQdpmGrBnkVzY6mALW4KxoYhQtARrZJ578,13968
584
584
  cumulusci/tasks/salesforce/tests/test_nonsourcetracking.py,sha256=14yjidvGa0Q85n8uoWXwMeFsOWYJGqvFShevAbidfbU,9154
585
585
  cumulusci/tasks/salesforce/tests/test_org_settings.py,sha256=SRpqihPzRy29WEinOlU-l-DU8viyFP1guIzjfROTK7A,13532
586
- cumulusci/tasks/salesforce/tests/test_profiles.py,sha256=3BTUOCFh3h7QbrjYrRDlQgnDULF14vzjh-lIGDRyGUg,10540
586
+ cumulusci/tasks/salesforce/tests/test_profiles.py,sha256=biS9Btb7DVnZnLd0FTo50TS0QsXda84tDXZgvTvksvI,10532
587
587
  cumulusci/tasks/salesforce/tests/test_retrieve_profile.py,sha256=Ujbt1k34CmN6-CvcKhTY_vgVp-OtpvGb0NDXS-vGYSQ,9858
588
588
  cumulusci/tasks/salesforce/tests/test_salesforce_files.py,sha256=eBeyanF7ygldukf9TQrPSXmeTU5sLQi_vNHVplx8dd0,8005
589
589
  cumulusci/tasks/salesforce/tests/test_sourcetracking.py,sha256=n9dyJ21OZs8P574Ds3uzVESCVl6fK0_RYv2bKI1dm3E,12540
@@ -612,7 +612,7 @@ cumulusci/tasks/tests/test_promote_package_version.py,sha256=6sitwrB8kUnnOH943em
612
612
  cumulusci/tasks/tests/test_pushfails.py,sha256=9JG9D0iD4dR-1fKheaRN7BEy3lzzuOKeRnQy03cwvZk,3214
613
613
  cumulusci/tasks/tests/test_salesforce.py,sha256=yCGtuHapxyAEmXQhuF2g2fh2naknTu7Md4OfEJQvGAA,2594
614
614
  cumulusci/tasks/tests/test_sfdx.py,sha256=oUbHo28d796m5RuskXMLitJw2rCLjjXIfxggzr4gsso,3545
615
- cumulusci/tasks/tests/test_util.py,sha256=D1T0QnvPTS0PHeZWo2xiVgE1jVTYcLzGTGHwEIoVmxk,7296
615
+ cumulusci/tasks/tests/test_util.py,sha256=qejX50N8RjHLg_qoF-TkqhAFlAgKHjJKrYMRw1DaXa4,9174
616
616
  cumulusci/tasks/utility/env_management.py,sha256=hJX6ySEiXD2oFW38JqbGQKMj89ucxdSBsPwytSdkgO8,6591
617
617
  cumulusci/tasks/utility/tests/test_env_management.py,sha256=fw34meWGOe1YYZO449MMCi2O7BgSaOA_I_wScrIr1Uk,8702
618
618
  cumulusci/tasks/vcs/__init__.py,sha256=ZzpMZnhooXZ6r_ywBVTS3UNw9uMcXW6h33LylRqTDK0,700
@@ -740,9 +740,9 @@ cumulusci/vcs/tests/dummy_service.py,sha256=RltOUpMIhSDNrfxk0LhLqlH4ppC0sK6NC2cO
740
740
  cumulusci/vcs/tests/test_vcs_base.py,sha256=9mp6uZ3lTxY4onjUNCucp9N9aB3UylKS7_2Zu_hdAZw,24331
741
741
  cumulusci/vcs/tests/test_vcs_bootstrap.py,sha256=N0NA48-rGNIIjY3Z7PtVnNwHObSlEGDk2K55TQGI8g4,27954
742
742
  cumulusci/vcs/utils/__init__.py,sha256=py4fEcHM7Vd0M0XWznOlywxaeCtG3nEVGmELmEKVGU8,869
743
- cumulusci_plus-5.0.20.dist-info/METADATA,sha256=LrA2JGHdRQXYBOsRRppZq0qAWWCLC4Yq_AocAQ3zelc,5764
744
- cumulusci_plus-5.0.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
745
- cumulusci_plus-5.0.20.dist-info/entry_points.txt,sha256=nTtu04b9iLXhzADcTrb5PwmdXE6e2MTUAMh9OK6Z2pg,80
746
- cumulusci_plus-5.0.20.dist-info/licenses/AUTHORS.rst,sha256=PvewjKImdKPhhJ6xR2EEZ4T7GbpY2ZeAeyWm2aLtiMQ,676
747
- cumulusci_plus-5.0.20.dist-info/licenses/LICENSE,sha256=NFsF_s7RVXk2dU6tmRAN8wF45pnD98VZ5IwqOsyBcaU,1499
748
- cumulusci_plus-5.0.20.dist-info/RECORD,,
743
+ cumulusci_plus-5.0.21.dev0.dist-info/METADATA,sha256=wDMcEEuJ5nmE66hia9v48C7F7eXbt_CQaDgSthL6vCo,5817
744
+ cumulusci_plus-5.0.21.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
745
+ cumulusci_plus-5.0.21.dev0.dist-info/entry_points.txt,sha256=nTtu04b9iLXhzADcTrb5PwmdXE6e2MTUAMh9OK6Z2pg,80
746
+ cumulusci_plus-5.0.21.dev0.dist-info/licenses/AUTHORS.rst,sha256=PvewjKImdKPhhJ6xR2EEZ4T7GbpY2ZeAeyWm2aLtiMQ,676
747
+ cumulusci_plus-5.0.21.dev0.dist-info/licenses/LICENSE,sha256=NFsF_s7RVXk2dU6tmRAN8wF45pnD98VZ5IwqOsyBcaU,1499
748
+ cumulusci_plus-5.0.21.dev0.dist-info/RECORD,,