Skip to content

Commit 5ef8200

Browse files
committed
Added Python 3.13 support, added mypy to precommit
1 parent ae43dfb commit 5ef8200

File tree

11 files changed

+296
-407
lines changed

11 files changed

+296
-407
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ source =
88

99
[report]
1010
omit =
11-
.tox/*
1211
tests/*
1312

1413
# Regexes for lines to exclude from consideration

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
os: [ubuntu-latest]
29-
python-version: ["3.9", "3.12"]
29+
python-version: ["3.9", "3.13"]
3030
runs-on: ${{ matrix.os }}
3131
steps:
3232
- uses: actions/checkout@v4
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install and configure Poetry
3838
uses: abatilo/actions-poetry@v3
3939
with:
40-
poetry-version: 1.8.3
40+
poetry-version: 1.8.4
4141
- name: Install dependencies with Poetry
4242
run: |
4343
poetry --version
@@ -48,5 +48,3 @@ jobs:
4848
- name: Run PyTest
4949
run: |
5050
poetry run pytest
51-
# mypy --install-types --non-interactive --show-error-codes .
52-
# mypy:

.pre-commit-config.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
3+
rev: v5.0.0
44
hooks:
5-
- id: trailing-whitespace
65
- id: check-added-large-files
76
args: ["--maxkb=50000"]
87
- id: check-ast
8+
- id: check-builtin-literals
9+
- id: check-case-conflict
10+
- id: check-illegal-windows-names
911
- id: check-json
1012
- id: check-merge-conflict
11-
- id: check-xml
13+
- id: check-toml
1214
- id: check-yaml
1315
- id: debug-statements
1416
- id: end-of-file-fixer
15-
- id: requirements-txt-fixer
17+
- id: fix-byte-order-marker
1618
- id: mixed-line-ending
1719
args: ["--fix=auto"]
20+
- id: pretty-format-json
21+
args: ["--autofix", "--no-sort-keys", "--no-ensure-ascii"]
22+
- id: trailing-whitespace
1823
- repo: https://github.com/pre-commit/mirrors-prettier
1924
rev: v4.0.0-alpha.8
2025
hooks:
2126
- id: prettier
22-
types_or: [css, yaml, markdown, html, scss, javascript]
27+
types_or: [json, markdown, yaml]
28+
- repo: https://github.com/pre-commit/mirrors-mypy
29+
rev: v1.12.1
30+
hooks:
31+
- id: mypy
32+
additional_dependencies: [types-requests]
2333
- repo: https://github.com/astral-sh/ruff-pre-commit
24-
rev: v0.6.7
34+
rev: v0.7.0
2535
hooks:
2636
# Run the linter
2737
- id: ruff

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## Version 0.1.2
4+
5+
Updated Python compatibility for v3.9-v3.13, and enabled MyPy
6+
37
## Version 0.1.1
48

59
Updated Python compatibility for v3.9-v3.12, and reformatted with Ruff

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2022, 2023, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
1+
Copyright (c) 2022, 2024 Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The SEED Salesforce connection enables data exchange between a SEED instance and
66

77
Clone this repository, then install the poetry-based dependencies.
88

9-
```
9+
```shell
1010
pip install poetry
1111
poetry install
1212
```
@@ -17,16 +17,15 @@ The Salesforce configuration file is needed for this library to function correct
1717

1818
#### Salesforce
1919

20-
Copy `salesforce-config-example.json` to `salesforce-config-dev.json` and fill
21-
in with the correct credentials. The format of the Salesforce should contain the following:
20+
Copy `salesforce-config-example.json` to `salesforce-config-dev.json` and fill in with the correct credentials. The format of the Salesforce should contain the following:
2221

23-
```
22+
```json
2423
{
25-
"instance": "https://<url>.lightning.force.com",
26-
"username": "[email protected]",
27-
"password": "secure-password",
28-
"security_token": "secure-token"
29-
"domain": ""
24+
"instance": "https://<url>.lightning.force.com",
25+
"username": "[email protected]",
26+
"password": "secure-password",
27+
"security_token": "secure-token",
28+
"domain": ""
3029
}
3130
```
3231

@@ -38,7 +37,7 @@ Make sure to add and configure the Salesforce configuration file. Note that it m
3837

3938
Run the tests using:
4039

41-
```
40+
```shell
4241
poetry run pytest
4342
```
4443

@@ -48,12 +47,12 @@ The credentials are stored in a GitHub Action Secret. Add the following with cor
4847

4948
Note that double quotes must be escaped.
5049

51-
```
50+
```text
5251
{
53-
\"instance\": \"https://<environment>.lightning.force.com\",
54-
\"username\": \"[email protected]\",
55-
\"password\": \"alongpassword!asdf\",
56-
\"security_token\": \"access1key2with3numbers\",
57-
\"domain\": \"test\"
52+
\"instance\": \"https://<environment>.lightning.force.com\",
53+
\"username\": \"[email protected]\",
54+
\"password\": \"alongpassword!asdf\",
55+
\"security_token\": \"access1key2with3numbers\",
56+
\"domain\": \"test\"
5857
}
5958
```

0 commit comments

Comments
 (0)