Skip to content

Add Python 3.13 support #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ source =

[report]
omit =
.tox/*
tests/*

# Regexes for lines to exclude from consideration
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Run pre-commit
uses: pre-commit/[email protected]
with:
Expand All @@ -26,7 +29,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.12"]
python-version: ["3.9", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -37,16 +40,14 @@ jobs:
- name: Install and configure Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.3
poetry-version: 1.8.4
- name: Install dependencies with Poetry
run: |
poetry --version
pip install --upgrade pip
poetry install
- name: Save Salesforce config from secrets
run: |
echo "${{ secrets.SALESFORCE_CONFIG }}" > salesforce-config-dev.json
- name: Run PyTest
- name: Run pytest
run: |
poetry run pytest
# mypy --install-types --non-interactive --show-error-codes .
# mypy:
22 changes: 16 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
args: ["--maxkb=50000"]
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
args: ["--fix=auto"]
- id: pretty-format-json
args: ["--autofix", "--no-sort-keys", "--no-ensure-ascii"]
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [css, yaml, markdown, html, scss, javascript]
types_or: [json, markdown, yaml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.1
hooks:
- id: mypy
additional_dependencies: [types-requests]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
rev: v0.7.0
hooks:
# Run the linter
- id: ruff
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## Version 0.1.2

Updated Python compatibility for v3.9-v3.13, and enabled MyPy

## Version 0.1.1

Updated Python compatibility for v3.9-v3.12, and reformatted with Ruff
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022, 2023, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
Copyright (c) 2022, 2024 Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.

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

Expand Down
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The SEED Salesforce connection enables data exchange between a SEED instance and

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

```
```shell
pip install poetry
poetry install
```
Expand All @@ -17,16 +17,15 @@ The Salesforce configuration file is needed for this library to function correct

#### Salesforce

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:
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:

```
```json
{
"instance": "https://<url>.lightning.force.com",
"username": "[email protected]",
"password": "secure-password",
"security_token": "secure-token"
"domain": ""
"instance": "https://<url>.lightning.force.com",
"username": "[email protected]",
"password": "secure-password",
"security_token": "secure-token",
"domain": ""
}
```

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

Run the tests using:

```
```shell
poetry run pytest
```

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

Note that double quotes must be escaped.

```
```text
{
\"instance\": \"https://<environment>.lightning.force.com\",
\"username\": \"[email protected]\",
\"password\": \"alongpassword!asdf\",
\"security_token\": \"access1key2with3numbers\",
\"domain\": \"test\"
\"instance\": \"https://<environment>.lightning.force.com\",
\"username\": \"[email protected]\",
\"password\": \"alongpassword!asdf\",
\"security_token\": \"access1key2with3numbers\",
\"domain\": \"test\"
}
```
Loading