Skip to content

Commit b2200f7

Browse files
authored
Merge branch 'main' into dependabot/pip/pytest-cov-6.1.1
2 parents 618cfb3 + 4803263 commit b2200f7

File tree

6 files changed

+46
-8
lines changed

6 files changed

+46
-8
lines changed

.github/workflows/python-checks.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
python-version: ${{ matrix.python-version }}
3333

3434
- name: Install uv
35-
uses: install-pinned/uv@1fd41179ee60eee2496694a1226cece304efa071 # 0.4.12
35+
uses: install-pinned/uv@75877ff4b6e7f7b75e572e664476f9a202dcc9f9 # 0.4.12
3636

3737
- name: Install dependencies
3838
env:
@@ -66,7 +66,7 @@ jobs:
6666
python-version: "3.13"
6767

6868
- name: Install uv
69-
uses: install-pinned/uv@1fd41179ee60eee2496694a1226cece304efa071 # 0.4.12
69+
uses: install-pinned/uv@75877ff4b6e7f7b75e572e664476f9a202dcc9f9 # 0.4.12
7070

7171
- name: Install dependencies
7272
run: |
@@ -88,7 +88,7 @@ jobs:
8888
python-version: "3.13"
8989

9090
- name: Install uv
91-
uses: install-pinned/uv@1fd41179ee60eee2496694a1226cece304efa071 # 0.4.12
91+
uses: install-pinned/uv@75877ff4b6e7f7b75e572e664476f9a202dcc9f9 # 0.4.12
9292

9393
- name: Install dependencies
9494
run: |
@@ -110,7 +110,7 @@ jobs:
110110
python-version: "3.13"
111111

112112
- name: Install uv
113-
uses: install-pinned/uv@1fd41179ee60eee2496694a1226cece304efa071 # 0.4.12
113+
uses: install-pinned/uv@75877ff4b6e7f7b75e572e664476f9a202dcc9f9 # 0.4.12
114114

115115
- name: Install bandit
116116
run: |
@@ -145,7 +145,7 @@ jobs:
145145
cache: pip
146146

147147
- name: Install uv
148-
uses: install-pinned/uv@1fd41179ee60eee2496694a1226cece304efa071 # 0.4.12
148+
uses: install-pinned/uv@75877ff4b6e7f7b75e572e664476f9a202dcc9f9 # 0.4.12
149149

150150
- name: Install module and dependencies
151151
run: |

.github/workflows/security_scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ jobs:
7474
# Upload the results to GitHub's code scanning dashboard (optional).
7575
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7676
- name: "Upload to code-scanning"
77-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
77+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
7878
with:
7979
sarif_file: results.sarif

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"sphinx.ext.viewcode",
4848
"myst_parser",
4949
"sphinx_multiversion",
50+
"sphinxcontrib.googleanalytics",
5051
]
5152

5253
# Sorting of attributes
@@ -191,3 +192,6 @@
191192

192193
# Get tags to whitelist from DOCUMENTED_VERSIONS const
193194
smv_tag_whitelist = "|".join(["^" + version + "$" for version in DOCUMENTED_VERSIONS])
195+
196+
# Adds Google Analytics tracking code to the HTML output
197+
googleanalytics_id = "G-L2YB7WHTRG"

parsons/ngpvan/contact_notes.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ def get_contact_notes(self, van_id):
2727
logger.info(f"Found {tbl.num_rows} custom fields.")
2828
return tbl
2929

30-
def create_contact_note(self, van_id, text, is_view_restricted, note_category_id=None):
30+
def create_contact_note(
31+
self,
32+
van_id,
33+
text,
34+
is_view_restricted,
35+
note_category_id=None,
36+
contact_type_id=None,
37+
input_type_id=None,
38+
date_canvassed=None,
39+
result_code_id=None,
40+
):
3141
"""
3242
Create a contact note
3343
@@ -42,6 +52,15 @@ def create_contact_note(self, van_id, text, is_view_restricted, note_category_id
4252
in the current context.
4353
note_category_id: int
4454
Optional; if set, the note category for this note.
55+
contact_type_id: str
56+
Defaults to 82 if no value is set. This value results in a null contact type in EA.
57+
input_type_id: str
58+
Defaults to 11 if no value is set. If the value is 11,
59+
the input type in EA will be listed as "API"
60+
date_canvassed: date
61+
Defaults to current date if no value is set. Dates should be formatted in ISO8601 standard.
62+
result_code_id: str
63+
Defaults to 205 if no value is set. This value results in a "Contacted" result in EA.
4564
`Returns:`
4665
int
4766
The note ID.
@@ -50,6 +69,20 @@ def create_contact_note(self, van_id, text, is_view_restricted, note_category_id
5069
if note_category_id is not None:
5170
note["category"] = {"noteCategoryId": note_category_id}
5271

72+
contact_history = {}
73+
74+
if contact_type_id is not None:
75+
contact_history["contact_type_id"] = str(contact_type_id)
76+
if input_type_id is not None:
77+
contact_history["input_type_id"] = str(input_type_id)
78+
if date_canvassed is not None:
79+
contact_history["dateCanvassed"] = date_canvassed
80+
if result_code_id is not None:
81+
contact_history["result_code_id"] = str(result_code_id)
82+
83+
if contact_history:
84+
note["contactHistory"] = contact_history
85+
5386
r = self.connection.post_request(f"people/{van_id}/notes", json=note)
5487
logger.info(f"Contact note {r} created.")
5588
return r

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ sphinx-rtd-theme==3.0.2
1818
myst-parser==4.0.1;python_version>='3.10'
1919
myst-parser==3.0.1;python_version<'3.10'
2020
sphinx-multiversion
21+
sphinxcontrib-googleanalytics

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PyGitHub==2.6.0
3333
python-dateutil==2.9.0.post0
3434
requests==2.32.3
3535
requests_oauthlib==2.0.0
36-
setuptools==78.1.0
36+
setuptools==80.9.0
3737
simple-salesforce==1.12.6
3838
simplejson==3.20.1
3939
slackclient==1.3.1

0 commit comments

Comments
 (0)