instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
bridgecrewio__checkov-2214 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py:AppServiceDotnetFrameworkVersion.get_expected_value"
],
"edited_modules": [
"checkov/terraform/checks/reso... | bridgecrewio/checkov | 9f448d714432d3118a00a453c76dd8762aa284ab | CKV_AZURE_80 - dotnet_framework_version with v6.0 fails
**Describe the issue**
Currently .NET 6.0 is the latest LTS version. However, CKV_AZURE_80 expects that latest version is v5.0.
**Examples**
```
resource "azurerm_app_service" "searchApi" {
...
site_config {
dotnet_framework_version = "v6.0"
}
... | diff --git a/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py b/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
index e4fd2f461..8aa662203 100644
--- a/checkov/terraform/checks/resource/azure/AppServiceDotnetFrameworkVersion.py
+++ b/checkov/terraform/checks/resour... |
bridgecrewio__checkov-2232 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/cloudformation/graph_builder/graph_components/blocks.py:CloudformationBlock.update_attribute"
],
"edited_modules": [
"checkov/cloudformation/graph_builder/graph_components/bl... | bridgecrewio/checkov | b3df796a52f01e1c17009a4105c3eafee912f8e1 | Checkov crash when processing AWS::Serverless:Function with Condition used in Globals
**Describe the issue**
Checkov crash when processing AWS::Serverless:Function with Condition used in Globals.
However, when Environment section is moved to Lambda it works as expected.
**Examples**
```yaml
AWSTemplateFormatVers... | diff --git a/checkov/cloudformation/graph_builder/graph_components/blocks.py b/checkov/cloudformation/graph_builder/graph_components/blocks.py
index fd9e3b355..aa8725d69 100644
--- a/checkov/cloudformation/graph_builder/graph_components/blocks.py
+++ b/checkov/cloudformation/graph_builder/graph_components/blocks.py
@@ ... |
bridgecrewio__checkov-277 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/kubernetes/parser/parser.py:parse"
],
"edited_modules": [
"checkov/kubernetes/parser/parser.py:parse"
]
},
"file": "checkov/kubernetes/parser/parser.py"
},
... | bridgecrewio/checkov | eb1aacbad59bad4e60036cba2a6115f05ab33750 | GCP: GoogleCloudSqlDatabasePublicallyAccessible raises AttributeError
# Description
A SQL database instance declared like this crashes the check for publically-accessible instances:
```hcl
resource "google_sql_database_instance" "sql_instance" {
name = "${var.gcp-project}-db-dev"
region = "${var.region}"... | diff --git a/checkov/kubernetes/parser/parser.py b/checkov/kubernetes/parser/parser.py
index 4aabc8b78..54d8fa396 100644
--- a/checkov/kubernetes/parser/parser.py
+++ b/checkov/kubernetes/parser/parser.py
@@ -20,10 +20,10 @@ def parse(filename):
if filename.endswith(".json"):
(template, template_l... |
bridgecrewio__checkov-281 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/cloudformation/checks/resource/aws/S3Encryption.py:S3Encryption.scan_resource_conf"
],
"edited_modules": [
"checkov/cloudformation/checks/resource/aws/S3Encryption.py:S3Encry... | bridgecrewio/checkov | 439d03c1a8e6186077d9d363a945fc5fde2b6057 | CloudFormation: S3 default encryption check should look for ServerSideEncryptionByDefault
The CloudFormation check for CKV_AWS_19 only looks for `ServerSideEncryptionRule`, not `ServerSideEncryptionByDefault`:
https://github.com/bridgecrewio/checkov/blob/864d12ad0dfc6ca898dbacf7dc16fdc20f702733/checkov/cloudformatio... | diff --git a/checkov/cloudformation/checks/resource/aws/S3Encryption.py b/checkov/cloudformation/checks/resource/aws/S3Encryption.py
index 511a8f760..f9562a8f0 100644
--- a/checkov/cloudformation/checks/resource/aws/S3Encryption.py
+++ b/checkov/cloudformation/checks/resource/aws/S3Encryption.py
@@ -11,8 +11,11 @@ clas... |
bridgecrewio__checkov-289 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/cloudformation/runner.py:Runner.run"
],
"edited_modules": [
"checkov/cloudformation/runner.py:Runner"
]
},
"file": "checkov/cloudformation/runner.py"
}
] | bridgecrewio/checkov | 63a441563ff271fd675bb05c77e1620dbfd865a9 | Supression skip comments for CloudFormation templates
Suppression does not appear to work for CloudFormation templates. For example with the following group, adding skip commitfor `CKV_AWS_24` to not get a warning from SSH port open.
```
#checkov:skip=CKV_AWS_24:
SecurityGroup:
Type: AWS::EC2::SecurityG... | diff --git a/checkov/cloudformation/runner.py b/checkov/cloudformation/runner.py
index db33c11eb..83e2f2432 100644
--- a/checkov/cloudformation/runner.py
+++ b/checkov/cloudformation/runner.py
@@ -1,6 +1,7 @@
import logging
import operator
import os
+import re
from functools import reduce
from checkov.cloudforma... |
bridgecrewio__checkov-3007 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/common/output/report.py:Report.get_exit_code"
],
"edited_modules": [
"checkov/common/output/report.py:Report"
]
},
"file": "checkov/common/output/report.py"
}... | bridgecrewio/checkov | 85344715cac779b67cc0e9782591ba22e0220520 | CKV_AZURE_116 fails with Terraform Azure provider >= v.2.97.0
**Describe the issue**
This issue is regarding CKV_AZURE_116.
Since v2.97.0 of the Azure Terraform provider, the Azure policies add-on is enabled by setting
```terraform
azure_policy_enabled = true
```
as a top-level property in a `azurerm_kubernet... | diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index b7685ea66..67104b727 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,1 +1,27 @@
-By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 lic... |
bridgecrewio__checkov-464 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/kubernetes/base_registry.py:Registry.scan"
],
"edited_modules": [
"checkov/kubernetes/base_registry.py:Registry"
]
},
"file": "checkov/kubernetes/base_registry.... | bridgecrewio/checkov | 652f6c2c11f374d25b3e493ceaaed7b097c2dd41 | Scanning IAM policy only takes First SID in json rather than looping through
**Describe the bug**
It seems when specifying more than one SID in a json, the policies do not loop through each one rather it just looks at the first one and ends.
**To Reproduce**
Steps to reproduce the behavior:
1. Create policy with... | diff --git a/HomebrewFormula/checkov.rb b/HomebrewFormula/checkov.rb
index 72582b9d4..6e42909e4 100644
--- a/HomebrewFormula/checkov.rb
+++ b/HomebrewFormula/checkov.rb
@@ -3,8 +3,8 @@ class Checkov < Formula
desc "Shiny new formula"
homepage "https://github.com/bridgecrewio/checkov"
- url "https://files.pytho... |
bridgecrewio__checkov-474 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py:IAMRoleAllowsPublicAssume.scan_resource_conf"
],
"edited_modules": [
"checkov/terraform/checks/resource/aws/IAMRole... | bridgecrewio/checkov | 7019fcfa760456261d6148846e0ce941fa6ccfc9 | Scanning IAM Role Public Access
Describe the bug
It seems when specifying more than one json, the policy does not scan all principals, rather it looks at the first one.
To Reproduce
Steps to reproduce the behavior:
Create policy with more than one SID
`resource "aws_iam_role" "lambdaRole" {
name ... | diff --git a/checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py b/checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py
index 6d98eac4d..efc004b07 100644
--- a/checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicAssume.py
+++ b/checkov/terraform/checks/resource/aws/IAMRoleAllowsPublicA... |
bridgecrewio__checkov-536 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/common/runners/runner_registry.py:RunnerRegistry.print_reports"
],
"edited_modules": [
"checkov/common/runners/runner_registry.py:RunnerRegistry"
]
},
"file": "... | bridgecrewio/checkov | 22f2eb96f01a92f46ec79365dac14b3fa64f6f05 | LaunchConfigurationEBSEncryption gives false-positives, due to not checking snapshot_id
In the relevant `aws_launch_configuration` Terraform docs https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration
```
encrypted - (Optional) Whether the volume should be encrypted or not.... | diff --git a/checkov/common/runners/runner_registry.py b/checkov/common/runners/runner_registry.py
index 9805499f7..e8b1f64b2 100644
--- a/checkov/common/runners/runner_registry.py
+++ b/checkov/common/runners/runner_registry.py
@@ -29,7 +29,11 @@ class RunnerRegistry(object):
return self.scan_reports
d... |
bridgecrewio__checkov-592 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py:GoogleStorageBucketUniformAccess.get_inspected_key"
],
"edited_modules": [
"checkov/terraform/checks/resourc... | bridgecrewio/checkov | f9171b5fb1d0556d13b1b50aa4f40b2aa451f832 | CKV_GCP_29 - Checks failed after GCP resource renamed
**Describe the bug**
Google has renamed the value
`bucket_policy_only ` to `uniform_bucket_level_access`.
When adding the new value in the configuration the check CKV_GCP_29 ( Ensure that Cloud Storage buckets have uniform bucket-level access enabled ) still fa... | diff --git a/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py b/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py
index 9c11a8645..7fed77bcd 100644
--- a/checkov/terraform/checks/resource/gcp/GoogleStorageBucketUniformAccess.py
+++ b/checkov/terraform/checks/resource/gcp... |
bridgecrewio__checkov-616 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/terraform/checks/resource/gcp/GKEBasicAuth.py:GKEBasicAuth.scan_resource_conf"
],
"edited_modules": [
"checkov/terraform/checks/resource/gcp/GKEBasicAuth.py:GKEBasicAuth"
... | bridgecrewio/checkov | 171e6a200bc9317b574e6e5aeef52049370a1cf8 | Check: CKV_GCP_19 False positive
**Describe the bug**
Checkov Will flag your code even if the `basic-auth` is already disabled on your cluster.
**To Reproduce**
Steps to reproduce the behavior:
1. Have a file as follows:
```
resource "google_container_cluster" "cluster-test" {
name = "cluster-test"
loc... | diff --git a/checkov/terraform/checks/resource/gcp/GKEBasicAuth.py b/checkov/terraform/checks/resource/gcp/GKEBasicAuth.py
index b84c8740a..0aa7c847b 100644
--- a/checkov/terraform/checks/resource/gcp/GKEBasicAuth.py
+++ b/checkov/terraform/checks/resource/gcp/GKEBasicAuth.py
@@ -1,5 +1,5 @@
-from checkov.terraform.che... |
bridgecrewio__checkov-619 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/cloudformation/runner.py:Runner.run"
],
"edited_modules": [
"checkov/cloudformation/runner.py:Runner"
]
},
"file": "checkov/cloudformation/runner.py"
},
{
... | bridgecrewio/checkov | 09a99a88e39b815bd2104f21976427a9007e2c70 | Azure NSG Security rule loop error
I got the following error when I execute to scan Azure NSG terraform file.
_ERROR:checkov.terraform.checks.resource.azure.NSGRuleSSHAccessRestricted:Failed to run check: Ensure that SSH access is restricted from the internet for configuration: {'name': ['${var.nsg_name}'], 'resourc... | diff --git a/HomebrewFormula/checkov.rb b/HomebrewFormula/checkov.rb
index 60e093c8f..0ba6d7d35 100644
--- a/HomebrewFormula/checkov.rb
+++ b/HomebrewFormula/checkov.rb
@@ -3,8 +3,8 @@ class Checkov < Formula
desc "Shiny new formula"
homepage "https://github.com/bridgecrewio/checkov"
- url "https://files.pytho... |
bridgecrewio__checkov-648 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py:ALBListenerHTTPS.scan_resource_conf"
],
"edited_modules": [
"checkov/cloudformation/checks/resource/aws/ALBListenerHTTP... | bridgecrewio/checkov | 51fb076c5dee8f96201961a6f6780b34a5a983cc | Cloudformation NLB Listener Rules are incorrectly detected as ALB rules and fail the HTTPS expectation
**Describe the bug**
NLB listeners are evaluated as ALB listeners, and fail because they don't use HTTPS
**To Reproduce**
1. Create a Cloudformation template with NLB listeners (e.g. TCP)
2. Run default tests
3... | diff --git a/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py b/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py
index a26144506..1034c9cfe 100644
--- a/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py
+++ b/checkov/cloudformation/checks/resource/aws/ALBListenerHTTPS.py
@@ -20,... |
bridgecrewio__checkov-711 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/kubernetes/checks/Seccomp.py:Seccomp.scan_spec_conf"
],
"edited_modules": [
"checkov/kubernetes/checks/Seccomp.py:Seccomp"
]
},
"file": "checkov/kubernetes/chec... | bridgecrewio/checkov | e6ba23cbd7b570111bd8ca485371dceeba90d318 | CKV_K8S_31 failure with RuntimeDefault configured
**Describe the bug**
CKV_K8S_31 failure when the `seccompProfile` type is configured as `RuntimeDefault` which is the new syntax.
**To Reproduce**
1. Define security context as below.
```yaml
...
securityContext:
allowPrivilegeEscalation: false
seccompProf... | diff --git a/checkov/kubernetes/checks/Seccomp.py b/checkov/kubernetes/checks/Seccomp.py
index f1991102c..fdd9392b4 100644
--- a/checkov/kubernetes/checks/Seccomp.py
+++ b/checkov/kubernetes/checks/Seccomp.py
@@ -1,3 +1,4 @@
+import dpath
from checkov.common.models.enums import CheckCategories, CheckResult
from che... |
bridgecrewio__checkov-748 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/terraform/checks/resource/aws/MSKClusterEncryption.py:MSKClusterEncryption.scan_resource_conf"
],
"edited_modules": [
"checkov/terraform/checks/resource/aws/MSKClusterEncrypt... | bridgecrewio/checkov | 18b6fab1a1a2b96a9829f6772f228705b31a6310 | False positive for check 'MSKClusterEncryption' (CKV_AWS_81)
**Describe the bug**
CKV_AWS_81 is reporting MSK clusters as unencrypted at rest while they are encrypted at rest.
**To Reproduce**
Example Terraform code producing a cluster with encryption (it will use the default KMS key as documented in https://regis... | diff --git a/checkov/terraform/checks/resource/aws/MSKClusterEncryption.py b/checkov/terraform/checks/resource/aws/MSKClusterEncryption.py
index 8e7bfee51..d0aa56f3e 100644
--- a/checkov/terraform/checks/resource/aws/MSKClusterEncryption.py
+++ b/checkov/terraform/checks/resource/aws/MSKClusterEncryption.py
@@ -11,16 +... |
bridgecrewio__checkov-755 | [
{
"changes": {
"added_entities": [
"checkov/common/util/secrets.py:is_hash"
],
"added_modules": [
"checkov/common/util/secrets.py:is_hash"
],
"edited_entities": [
"checkov/common/util/secrets.py:string_has_secrets"
],
"edited_modules": [
... | bridgecrewio/checkov | 0e179067eecd5557d0bfda2881a983ab630b577d | False positive for CKV_AWS_46: "Ensure no hard coded AWS access key and secret key exists in EC2 user data" 1
The [`string_has_secrets`](https://github.com/bridgecrewio/checkov/blob/master/checkov/common/util/secrets.py) function returns `True` when passed any SHA1 hash. This is problematic because with Terraform resou... | diff --git a/checkov/common/util/secrets.py b/checkov/common/util/secrets.py
index 61f703467..af177902e 100644
--- a/checkov/common/util/secrets.py
+++ b/checkov/common/util/secrets.py
@@ -54,6 +54,16 @@ _patterns = {k: [re.compile(p, re.DOTALL) for p in v] for k, v in _secrets_regex
# now combine all the compiled pat... |
bridgecrewio__checkov-831 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"checkov/kubernetes/checks/Seccomp.py:Seccomp.scan_spec_conf"
],
"edited_modules": [
"checkov/kubernetes/checks/Seccomp.py:Seccomp"
]
},
"file": "checkov/kubernetes/chec... | bridgecrewio/checkov | f7b3ff73442d24632ac9bfbba6c976f2c7b357fd | CKV_K8S_31 failure with RuntimeDefault configured for workloads
**Describe the bug**
Please see #710
**To Reproduce**
Please see #710
**Expected behavior**
Please see #710
**Additional context**
The bug reported in #710 needs to be fixed for workloads in https://github.com/bridgecrewio/checkov/blob/master/... | diff --git a/checkov/kubernetes/checks/Seccomp.py b/checkov/kubernetes/checks/Seccomp.py
index fdd9392b4..5946eab5a 100644
--- a/checkov/kubernetes/checks/Seccomp.py
+++ b/checkov/kubernetes/checks/Seccomp.py
@@ -34,6 +34,20 @@ class Seccomp(BaseK8Check):
return CheckResult.PASSED if security_profile =... |
briggySmalls__pyflipdot-2 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyflipdot/data.py:ImagePacket.image_to_bytes"
],
"edited_modules": [
"pyflipdot/data.py:ImagePacket"
]
},
"file": "pyflipdot/data.py"
}
] | briggySmalls/pyflipdot | 9f3b8dafe3961396f548f1172ef5eb73350638ec | On larger signs 0,0 is displayed as 0,9
I have a 96x16 Hanover sign. This code works perfectly except that it starts on the 9 dot from the top.
To replicate I push a numpy array that is only the first pixel as true. Such as:
[[ True False False ... False False False]
[False False False ... False Fa... | diff --git a/pyflipdot/data.py b/pyflipdot/data.py
index df3ccf7..b26b05f 100644
--- a/pyflipdot/data.py
+++ b/pyflipdot/data.py
@@ -148,10 +148,16 @@ class ImagePacket(Packet):
message_image = np.zeros((data_rows, columns), dtype=bool)
message_image[:rows, :columns] = image
- # Flip image (w... |
briggySmalls__pyflipdot-5 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyflipdot/data.py:_to_ascii_hex",
"pyflipdot/data.py:ImagePacket.__init__"
],
"edited_modules": [
"pyflipdot/data.py:_to_ascii_hex",
"pyflipdot/data.py:ImagePacket"
... | briggySmalls/pyflipdot | 1de9944550a1d5f49a29b5499ce4a44dba81d2cc | The script cannot support board like 128 * 32
the image will be too large, see below error
File "/usr/local/lib/python3.6/dist-packages/pyflipdot/data.py", line 23, in _to_ascii_hex
return _bytes_to_ascii_hex(value)
File "/usr/local/lib/python3.6/dist-packages/pyflipdot/data.py", line 20, in _bytes_to_asci... | diff --git a/pyflipdot/data.py b/pyflipdot/data.py
index b26b05f..2326941 100644
--- a/pyflipdot/data.py
+++ b/pyflipdot/data.py
@@ -16,13 +16,7 @@ _COMMAND_CODES = {
def _to_ascii_hex(value: bytes) -> bytes:
- def _bytes_to_ascii_hex(val: bytes) -> bytes:
- return val.hex().upper().encode('ASCII')
-
- ... |
brightway-lca__brightway2-analyzer-19 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bw2analyzer/contribution.py:ContributionAnalysis.sort_array"
],
"edited_modules": [
"bw2analyzer/contribution.py:ContributionAnalysis"
]
},
"file": "bw2analyzer/contrib... | brightway-lca/brightway2-analyzer | 6829144e8a85b9ca7bbcf79360784562a86ca96c | Invalid sorting for Contribution results when top contributors are negative (Absolute values)
When getting the contribution results, if the top contributions have a negative value BW analyzer ignore these. The issue is in the limit calculation, as it doesnt take negatives into account.
I have tried the following fi... | diff --git a/bw2analyzer/contribution.py b/bw2analyzer/contribution.py
index 91b2ced..37a1503 100644
--- a/bw2analyzer/contribution.py
+++ b/bw2analyzer/contribution.py
@@ -41,7 +41,7 @@ class ContributionAnalysis:
if limit_type == "percent":
if not 0 < limit <= 1:
raise ValueErro... |
brightway-lca__brightway2-data-177 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "bw2data/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bw2data/backends... | brightway-lca/brightway2-data | d73b7733e74bb4eeb0f192ff7cc6ca1714bce3e2 | D2 Use the SQLite text search instead of a separate Whoosh search index
* [FTS5](https://www.sqlite.org/fts5.html)
* [Tutorial](https://www.sqlitetutorial.net/sqlite-full-text-search/) | diff --git a/CHANGES.md b/CHANGES.md
index 4531f85..ec0f86c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,10 +1,5 @@
# `bw2data` Changelog
-## 4.0.DEV46 (2024-07-23)
-
-* [PR #176: Fix un-hashable error](https://github.com/brightway-lca/brightway2-data/pull/176).
-* Import multifunctional if available
-
## 4.0.DEV... |
brightway-lca__brightway2-data-235 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bw2data/search/indices.py:IndexManager.__init__"
],
"edited_modules": [
"bw2data/search/indices.py:IndexManager"
]
},
"file": "bw2data/search/indices.py"
}
] | brightway-lca/brightway2-data | f9f36639f2637e4cb9f033d44e2acd7cf59fe026 | `IndexManager` does not properly delete search database
**Issue in short:** When you delete a searchable database and create one with the same name, you cannot properly create activities within it anymore.
When you delete a database, the `IndexManager` deletes the accompanied search database by dropping the tables a... | diff --git a/bw2data/search/indices.py b/bw2data/search/indices.py
index c59ad89..d8ccef8 100644
--- a/bw2data/search/indices.py
+++ b/bw2data/search/indices.py
@@ -13,7 +13,7 @@ class IndexManager:
def __init__(self, database_path):
self.path = os.path.join(projects.request_directory("search"), database_... |
brightway-lca__brightway2-io-294 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bw2io/strategies/ecospold2.py:add_cpc_classification_from_single_reference_product"
],
"edited_modules": [
"bw2io/strategies/ecospold2.py:add_cpc_classification_from_single_reference... | brightway-lca/brightway2-io | 774b44635cbfcc833dd0a40e803ef66e0b204630 | Extraction of CPC & HS2017 classifications fail
The fix for #282 does not seem to work. See the example below:
### setup
- OS: Ubuntu 24.04.1 LTS
- Python: 3.12.8
- bw2data version: (4, 3)
- bw2io version: 0.9.3
### description of the issue
- CPC classification is truncated and only the first digit seems ex... | diff --git a/bw2io/strategies/ecospold2.py b/bw2io/strategies/ecospold2.py
index 4a4375d..f506849 100644
--- a/bw2io/strategies/ecospold2.py
+++ b/bw2io/strategies/ecospold2.py
@@ -1177,6 +1177,8 @@ def add_cpc_classification_from_single_reference_product(db):
"classifications": [],
}
+ T... |
brightway-lca__brightway2-io-297 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bw2io/strategies/ecospold1_allocation.py:allocate_exchanges",
"bw2io/strategies/ecospold1_allocation.py:rescale_exchange"
],
"edited_modules": [
"bw2io/strategies/ecospold1_a... | brightway-lca/brightway2-io | 839c10b85851eefe8bfe077ce38f1c1ec4d3c937 | `rescale_exchange` multiplies `minimum` and `maximum` by `scale` twice
See [line 154](https://github.com/brightway-lca/brightway2-io/blob/642f2500588aeafada3a92e2a934f27287c0af07/bw2io/utils.py#L154) and [line 161](https://github.com/brightway-lca/brightway2-io/blob/642f2500588aeafada3a92e2a934f27287c0af07/bw2io/utils.... | diff --git a/bw2io/strategies/ecospold1_allocation.py b/bw2io/strategies/ecospold1_allocation.py
index f4c217a..6a147bf 100644
--- a/bw2io/strategies/ecospold1_allocation.py
+++ b/bw2io/strategies/ecospold1_allocation.py
@@ -1,5 +1,7 @@
import copy
+from ..utils import rescale_exchange
+
def delete_integer_codes(... |
brocksam__pyproprop-49 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyproprop/processed_property.py:processed_property",
"pyproprop/processed_property.py:apply_method"
],
"edited_modules": [
"pyproprop/processed_property.py:processed_property... | brocksam/pyproprop | 693950be09186100bc029535ddaef0e9f61eb4f9 | Error in post method
When calling a processed property with a post method, for example:
```
squares = processed_property(
"squares",
type=int,
iterable_allowed=True,
method=square()
)
```
The following is raised: `NameError: name 'optional' is not defined`.
This is compin... | diff --git a/.restyled.yaml b/.restyled.yaml
index 877a3c5..3c5a7dc 100644
--- a/.restyled.yaml
+++ b/.restyled.yaml
@@ -1,3 +1,2 @@
restylers:
- - isort
- - reorder-python-imports
\ No newline at end of file
+ - isort
\ No newline at end of file
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 14e1e13..48d6418 100... |
bsatrom__py-conway-21 | [
{
"changes": {
"added_entities": [
"conway/game.py:Game.run_generation"
],
"added_modules": null,
"edited_entities": [
"conway/game.py:Game.__init__",
"conway/game.py:Game._num_neighbors",
"conway/game.py:Game._run",
"conway/game.py:Game.step"
... | bsatrom/py-conway | 9554a7c5d034feadd7a7efa66daa933c704afecd | rename public properties to match terms of the game (seed, generation, etc.) | diff --git a/README.md b/README.md
index 82ad6e5..83fa945 100644
--- a/README.md
+++ b/README.md
@@ -21,11 +21,11 @@ To create a game, you'll need to provide dimensions and a starting two-dimensona
```python
from conway.game import Game
-beacon = [[0, 1, 0],
+seed = [[0, 1, 0],
[1, 1, 1],
[0, ... |
bsatrom__py-conway-24 | [
{
"changes": {
"added_entities": [
"conway/game.py:Game._scan_seed"
],
"added_modules": null,
"edited_entities": [
"conway/game.py:Game.__init__"
],
"edited_modules": [
"conway/game.py:Game"
]
},
"file": "conway/game.py"
}
] | bsatrom/py-conway | 4271eb5fe31e47ff91b78472c9c88a55fe4291a6 | make sure that the provided beacon only contains ones and zeroes | diff --git a/conway/game.py b/conway/game.py
index d147be5..6d2b56e 100644
--- a/conway/game.py
+++ b/conway/game.py
@@ -42,6 +42,8 @@ class Game:
raise InitError("Please make sure that the seed matches \
the provided width and height values.")
+ self._sca... |
bsatrom__py-conway-25 | [
{
"changes": {
"added_entities": [
"conway/game.py:Game._create_random_seed"
],
"added_modules": null,
"edited_entities": [
"conway/game.py:Game.__init__",
"conway/game.py:Game._create_zeros"
],
"edited_modules": [
"conway/game.py:Game"
]... | bsatrom/py-conway | 08584f08b7f6e97dfc6695efbf5eddc1a7187584 | Add the ability to generate a random beacon | diff --git a/README.md b/README.md
index 83fa945..add6cf1 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,12 @@ seed = [[0, 1, 0],
new_game = Game(3, 3, seed)
```
+If no seed is provided, the game can either generate a seed of zeroes, or a random starter seed. use the `random=True` positional argument to genera... |
bsatrom__py-conway-34 | [
{
"changes": {
"added_entities": [
"py_conway/game.py:Game.start_thread",
"py_conway/game.py:Game.stop_thread"
],
"added_modules": null,
"edited_entities": [
"py_conway/game.py:Game.__init__",
"py_conway/game.py:Game.start",
"py_conway/game.py:Game... | bsatrom/py-conway | bfadc3ba29d71097c2161c7a714dfec37a670307 | refactor start to start_thread and have start just change state. | diff --git a/README.md b/README.md
index 7fa69a3..ddf9d87 100644
--- a/README.md
+++ b/README.md
@@ -34,14 +34,22 @@ If no seed is provided, the game can either generate a seed of zeroes, or a rand
new_game = Game(12, 12, random=True)
```
-Once the game board is populated, call the `start()` method. The game will s... |
bsatrom__py-conway-39 | [
{
"changes": {
"added_entities": [
"py_conway/game.py:Game.reseed"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"py_conway/game.py:Game"
]
},
"file": "py_conway/game.py"
}
] | bsatrom/py-conway | 1f4904b79e5e164a41ecc1f442ecfa3a7b2f811e | Add method to re-seed the board | diff --git a/py_conway/game.py b/py_conway/game.py
index dc7da7c..3666139 100644
--- a/py_conway/game.py
+++ b/py_conway/game.py
@@ -212,6 +212,18 @@ class Game:
self.generations = 0
self.live_cells = self._count_live_cells(self.current_board)
+ def reseed(self):
+ """Reseed the game board... |
bsatrom__py-conway-40 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"py_conway/game.py:Game.__init__"
],
"edited_modules": [
"py_conway/game.py:Game"
]
},
"file": "py_conway/game.py"
}
] | bsatrom/py-conway | e068ae33443e1734697f16c2388957a67e667cb9 | Infer width and height when a seed is provided | diff --git a/py_conway/game.py b/py_conway/game.py
index 3666139..1204487 100644
--- a/py_conway/game.py
+++ b/py_conway/game.py
@@ -41,7 +41,7 @@ class Game:
generations = 0
live_cells = 0
- def __init__(self, width: int = 6, height: int = 6,
+ def __init__(self, width: int = 0, height: int = 0,
... |
bsatrom__py-conway-52 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"py_conway/game.py:Game.__init__",
"py_conway/game.py:Game.run_generation"
],
"edited_modules": [
"py_conway/game.py:Game"
]
},
"file": "py_conway/game.py"
}
] | bsatrom/py-conway | e92a78c71c951c0a2a0e9762a80aa27517d8c44d | Detect a still-life or oscillator state and update the Game state accordingly | diff --git a/py_conway/game.py b/py_conway/game.py
index 339c693..1b007a3 100644
--- a/py_conway/game.py
+++ b/py_conway/game.py
@@ -7,8 +7,22 @@ InitError exception object.
from random import randint
from .helpers import PseudoEnum
-
-GameState = PseudoEnum(["READY", "RUNNING", "FINISHED"])
+"""Enum for managing t... |
bskinn__sphobjinv-160 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/sphobjinv/cli/core.py:main"
],
"edited_modules": [
"src/sphobjinv/cli/core.py:main"
]
},
"file": "src/sphobjinv/cli/core.py"
},
{
"changes": {
"added_... | bskinn/sphobjinv | c3b3b42779015826bcb5f4f1d44c025d2d9da30d | Revise CLI to make read-from-stdin incompatible with '-u'
Ambiguous/inconsistent set of inputs, otherwise.
- [x] Implementation
- [x] Tests
- [x] Docs | diff --git a/doc/source/cli/convert.rst b/doc/source/cli/convert.rst
index 5d501ad..ac49179 100644
--- a/doc/source/cli/convert.rst
+++ b/doc/source/cli/convert.rst
@@ -158,7 +158,7 @@ If processing of JSON files by API URL is desirable, please
Path (or URL, if :option:`--url` is specified) to file to be converted... |
bskinn__sphobjinv-226 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/sphobjinv/_vendored/fuzzywuzzy/utils.py:asciionly",
"src/sphobjinv/_vendored/fuzzywuzzy/utils.py:full_process"
],
"edited_modules": [
"src/sphobjinv/_vendored/fuzzywuzzy/... | bskinn/sphobjinv | 2123ff8826228e411f87ea704e0cb2643048b2f0 | UnicodeDecodeError
**Brief description**
<!-- Clear and concise description of the bug. -->
Not clear if this is a bug/limitation in sphobjinv or if the objects.inv in question is messed up, but I get a UnicodeDecodeError for
```
sphobjinv suggest -u https://fonttools.readthedocs.io/en/latest/objects.inv TTFont
`... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c092f6e..f4349e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project strives to adhere to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+ * UnicodeDec... |
bskinn__sphobjinv-240 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/sphobjinv/cli/core.py:main"
],
"edited_modules": [
"src/sphobjinv/cli/core.py:main"
]
},
"file": "src/sphobjinv/cli/core.py"
}
] | bskinn/sphobjinv | 02fa433c0abdb05256bfee56603167d750a1062b | Add trap for null subparser to avoid exception in CLI corner case where options are provided but subparser is not
~More idiomatic that way, and should provide a sensible `argparse` failed exit for things like `sphobjinv --foo`, instead of a mysterious exception deeper in the CLI code.~
~Annoying I had to [monkeypatc... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ff92ced..ccc2af3 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,7 +9,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
- rev: '22.1.0'
+ rev: '22.3.0'
... |
bsquizz__ocdeployer-38 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ocdeployer/env.py:LegacyEnvConfigHandler.__init__",
"ocdeployer/env.py:LegacyEnvConfigHandler._load_vars_per_env"
],
"edited_modules": [
"ocdeployer/env.py:LegacyEnvConfigHan... | bsquizz/ocdeployer | c121a6ac9286389fb33a67190e7ecfbb9544e5ce | AttributeError: 'LegacyEnvConfigHandler' object has no attribute 'env_dir_name'
ocdeployer deploy -f --sets vmaas --template-dir buildfactory -e builder-env.yml vmaas-qe --secrets-local-dir secrets/sanitized
```
INFO:ocdeployer.deploy:Handling config for service set 'vmaas'
Traceback (most recent call last):
... | diff --git a/ocdeployer/env.py b/ocdeployer/env.py
index 7ef3e7a..c644e9a 100644
--- a/ocdeployer/env.py
+++ b/ocdeployer/env.py
@@ -277,15 +277,12 @@ class LegacyEnvConfigHandler(EnvConfigHandler):
def _get_env_name(file_path):
return os.path.splitext(os.path.basename(file_path))[0]
- def __init__(s... |
bst-mug__acres-102 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"acres/evaluation/evaluation.py:analyze"
],
"edited_modules": [
"acres/evaluation/evaluation.py:analyze"
]
},
"file": "acres/evaluation/evaluation.py"
},
{
"chan... | bst-mug/acres | 2c8464b11a3d221913a1572808dee9c71afaf66b | Make `find_embeddings` faster
Ideas:
- Break down index.p into different files, one for each initial letter.
- Use tries.
- Reimplement from scratch. | diff --git a/acres/evaluation/evaluation.py b/acres/evaluation/evaluation.py
index 09c345a..75c3425 100644
--- a/acres/evaluation/evaluation.py
+++ b/acres/evaluation/evaluation.py
@@ -62,20 +62,22 @@ def analyze(contextualized_acronym: topic_list.Acronym, true_expansions: Set[str
"""
ret = {'found': False, '... |
bst-mug__acres-109 | [
{
"changes": {
"added_entities": [
"acres/rater/full.py:_contain_acronym"
],
"added_modules": [
"acres/rater/full.py:_contain_acronym"
],
"edited_entities": [
"acres/rater/full.py:_compute_full_valid"
],
"edited_modules": [
"acres/rater/f... | bst-mug/acres | 1e9170794b5263d9add5d0ab6891754b5dac1bca | [Filtering] Expansion should not contain another acronym
E.g. ACC => "ACI und ACE" has been provided by the n-gram model, but not filtered out. | diff --git a/acres/rater/full.py b/acres/rater/full.py
index 0d03352..f9421dd 100644
--- a/acres/rater/full.py
+++ b/acres/rater/full.py
@@ -1,6 +1,7 @@
"""
Rating submodule for full form checks.
"""
+from acres.util import acronym as acro_util
from acres.util import functions
@@ -55,6 +56,19 @@ def _has_capita... |
bst-mug__acres-93 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"acres/evaluation/evaluation.py:analyze"
],
"edited_modules": [
"acres/evaluation/evaluation.py:analyze"
]
},
"file": "acres/evaluation/evaluation.py"
},
{
"chan... | bst-mug/acres | 868bb4a60cbd893515687f137962d15f6467f30b | Calculate out-of-dictionary acronyms
If we're not dealing with disambiguation (#10), then, if existent, a domain-dictionary would suffice.
Check if any exists for clinical german and, if yes, estimate the amount of out-of-dictionary acronyms. If the amount is large (or if the dictionary introduces extra ambiguity), ... | diff --git a/acres/evaluation/evaluation.py b/acres/evaluation/evaluation.py
index d6a596f..09c345a 100644
--- a/acres/evaluation/evaluation.py
+++ b/acres/evaluation/evaluation.py
@@ -71,8 +71,8 @@ def analyze(contextualized_acronym: topic_list.Acronym, true_expansions: Set[str
# Normalize true expansions so that... |
btel__svg_utils-62 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/svgutils/transform.py:SVGFigure.__init__"
],
"edited_modules": [
"src/svgutils/transform.py:SVGFigure"
]
},
"file": "src/svgutils/transform.py"
}
] | btel/svg_utils | 4b7720391336de6a868fcb1d28eddf9a4759616d | [0.3.3] Started producing SVG without width, height and viewBox
Hi @btel ,
due to my [rendering regression tests in xiangqi-setup](https://github.com/hartwork/xiangqi-setup/blob/master/test-for-rendering-regressions.sh) I noticed that things broke when [trying to upgrade to svgutils 0.3.3](https://github.com/hartwor... | diff --git a/src/svgutils/transform.py b/src/svgutils/transform.py
index 384379e..ef15f9e 100644
--- a/src/svgutils/transform.py
+++ b/src/svgutils/transform.py
@@ -240,14 +240,14 @@ class SVGFigure(object):
if width:
try:
- # width is an instance of Unit
- self._wi... |
btubbs__sseclient-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sseclient.py:SSEClient._connect",
"sseclient.py:SSEClient.__next__"
],
"edited_modules": [
"sseclient.py:SSEClient"
]
},
"file": "sseclient.py"
}
] | btubbs/sseclient | 7b81911f3a70a1b4cd65d2694f805aa4f5cc3b34 | Spurious replacement characters (U+FFFD) in events
The unicode decoder state is not saved across SSEClient.__next__() calls. Thus if the buffer ends in the middle of a multi-byte encoding the decoder fails to decode the char on the next call. | diff --git a/sseclient.py b/sseclient.py
index ee7e16d..26e1b83 100644
--- a/sseclient.py
+++ b/sseclient.py
@@ -55,6 +55,8 @@ class SSEClient(object):
requester = self.session or requests
self.resp = requester.get(self.url, stream=True, **self.requests_kwargs)
self.resp_iterator = self.iter_... |
btubbs__sseclient-50 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sseclient.py:SSEClient._con... | btubbs/sseclient | 1f9a3a2d4221fb6f886d09c23e26f8589fc9d1a4 | The first event retrieved by sseclient is always empty
`
.>>> from sseclient import SSEClient
.>>> client = SSEClient(url='https://stream.wikimedia.org/v2/stream/recentchange')
.>>> data = next(client)
.>>> data.__dict__
{'data': '', 'event': 'message', 'id': None, 'retry': None}
.>>> data = next(client)
.>>> da... | diff --git a/README.rst b/README.rst
index 04e66ab..d424ec5 100644
--- a/README.rst
+++ b/README.rst
@@ -7,6 +7,11 @@ streams (also known as EventSource, after the name of the Javascript interface
inside browsers). The SSEClient class accepts a url on init, and is then an
iterator over messages coming from the serve... |
bugov__aiohttp-basicauth-middleware-7 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"aiohttp_basicauth_middleware/__init__.py:basic_auth_middleware"
],
"edited_modules": [
"aiohttp_basicauth_middleware/__init__.py:basic_auth_middleware"
]
},
"file": "ai... | bugov/aiohttp-basicauth-middleware | 8f545a7cbf96ebb411fb2db0c1c93d5bf7f4da08 | example doesn't work.
TypeError: basic_auth_middleware() missing 1 required positional argument: 'strategy'
```
from aiohttp import web
from aiohttp_basicauth_middleware import basic_auth_middleware
async def public_view(request):
return web.Response(text='Public view')
async def secret_view(request):
r... | diff --git a/aiohttp_basicauth_middleware/__init__.py b/aiohttp_basicauth_middleware/__init__.py
index 23c5682..21c3a5b 100644
--- a/aiohttp_basicauth_middleware/__init__.py
+++ b/aiohttp_basicauth_middleware/__init__.py
@@ -27,7 +27,7 @@ from aiohttp import web
from http_basic_auth import parse_header, BasicAuthExcep... |
bugsnag__bugsnag-python-188 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bugsnag/wsgi/middleware.py:add_wsgi_request_data_to_notification"
],
"edited_modules": [
"bugsnag/wsgi/middleware.py:add_wsgi_request_data_to_notification"
]
},
"file":... | bugsnag/bugsnag-python | 22bd9e187c7347b80169f8507ba4da44663adfc8 | WSGI middleware breaks when handling badly encoded URLs
### Description
In public-facing applications, we cannot control what kinds of URLs will be requested by clients -- which means we may have to deal with wrong or broken encoding.
### Issue
`bugsnag.wsgi.middleware.add_wsgi_request_data_to_notification` us... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a658f72..64f8a09 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,13 @@
Changelog
=========
+## TBD
+
+### Fixes
+
+* WSGI middleware will no longer raise when given a badly encoded URL
+ [#188](https://github.com/bugsnag/bugsnag-python/pull/188)
+
## 3.6.0 (2... |
bugsnag__bugsnag-python-333 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bugsnag/event.py:Event.__init__",
"bugsnag/event.py:Event.meta_data"
],
"edited_modules": [
"bugsnag/event.py:Event"
]
},
"file": "bugsnag/event.py"
}
] | bugsnag/bugsnag-python | cc6aa2027b3c152b35b984638f9c749f25e7d39f | DeprecationWarning: The Event "metadata" argument has been replaced with "metadata" - Typo
<!-- Before raising, please check if somebody else has already reported your issue. -->
### Describe the bug
typo in Depercation warning
it should be `DeprecationWarning: The Event "meta_data" argument has been replaced wi... | diff --git a/bugsnag/event.py b/bugsnag/event.py
index a06cae3..1b18a9d 100644
--- a/bugsnag/event.py
+++ b/bugsnag/event.py
@@ -113,7 +113,7 @@ class Event:
self.metadata = {} # type: Dict[str, Dict[str, Any]]
if 'meta_data' in options:
- warnings.warn('The Event "metadata" argument has... |
bugsnag__bugsnag-python-334 | [
{
"changes": {
"added_entities": [
"bugsnag/handlers.py:BugsnagHandler.extract_grouping_hash"
],
"added_modules": null,
"edited_entities": [
"bugsnag/handlers.py:BugsnagHandler.__init__"
],
"edited_modules": [
"bugsnag/handlers.py:BugsnagHandler"
... | bugsnag/bugsnag-python | 21ddc08b3c6602324fd18f2915f1a4f439c75138 | Unable to set grouping_hash using `logger.<level>()` methods
<!-- Before creating, please check if somebody else has already reported your feature request. -->
### Description
There is no way to change the grouping hash value when using logger methods and the BugsnagHandler to send event.
In a general manner, ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2fc7866..517c2f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,11 @@ Changelog
## TBD
+### Enhancements
+
+* Allows changing the grouping hash when using `BugsnagHandler` via the logger methods' `extra` keyword argument
+ [#334](https://github.com/bugsnag/b... |
buildout__buildout-452 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/zc/buildout/easy_install.py:_get_matching_dist_in_location"
],
"edited_modules": [
"src/zc/buildout/easy_install.py:_get_matching_dist_in_location"
]
},
"file": "sr... | buildout/buildout | 9161c43da9aa3c4d8394230b85e4a34762b933e1 | assert newdist is not None # newloc above is missing our dist?!
I am getting the error below while installing nltk. The egg is actually retrieved so the second time the recipe is run, it completes successfully.
FWIW doing easy_install-2.7 -U nltk works fine.
Carlos
I am running the latest setuptools
Get... | diff --git a/CHANGES.rst b/CHANGES.rst
index 835e061..af2d6ca 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,7 +4,8 @@ Change History
2.11.4 (unreleased)
===================
-- Nothing changed yet.
+- Fix `issue 451 <https://github.com/buildout/buildout/issues/451>`:
+ distributions with a two-digit version can ... |
bukzor__RefactorLib-24 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"refactorlib/cheetah/node.py:CheetahNodeBase.find_calls",
"refactorlib/cheetah/node.py:CheetahNodeBase.is_in_context",
"refactorlib/cheetah/node.py:CheetahVariable.remove_call",
"... | bukzor/RefactorLib | 181ff5525a5904eb7cf31653e80723450b7fc45e | Support python3 | diff --git a/.travis.yml b/.travis.yml
index bb006db..c471dc8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,10 +2,15 @@ language: python
env: # These should match the tox env list
- TOXENV=py26
- TOXENV=py27
+ - TOXENV=py34
install:
- - pip install coveralls tox --use-mirrors
+ - pip install cov... |
burnash__gspread-1012 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet._hide_dimension",
"gspread/worksheet.py:Worksheet.hide_columns",
"gspread/worksheet.py:Worksheet.hide_rows",
"gspread/worksheet.py:Worksheet._unhide_dimension",
"gspread/worksheet.py:Worksheet.unhide... | burnash/gspread | ec997c0b77e2715c6cfd61e75d8cf860f7172c3b | Add ability to hide columns and/or rows
**Is your feature request related to a problem? Please describe.**
Add ability to hide columns and/or rows. This is achievable via batch_update using the request body below.
``` request = {
"updateDimensionProperties": {
"range": {
... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index da3df64..3058e47 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -1959,3 +1959,111 @@ class Worksheet:
:rtype: list
"""
return self._get_sheet_property("rowGroups", [])
+
+ def _hide_dimension(self, start, end, ... |
burnash__gspread-1021 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.get_all_records"
],
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
"file": "gspread/worksheet.py"
}
] | burnash/gspread | 5181e11fea3d71785bd5c7f9b9c8fed50df0bc11 | Duplicate header check in 5.2.0 is not backward compatible
**Describe the bug**
A spreadsheet with multiple columns that had a blank header used to load using `get_all_records` before 5.2.0, but it now fails with "headers must be uniques" exception. I presume, but did not confirm, that it is due to this simplificati... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index 3058e47..46cebb6 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -376,6 +376,7 @@ class Worksheet:
allow_underscores_in_numeric_literals=False,
numericise_ignore=None,
value_render_option=None,
+ expected_he... |
burnash__gspread-1030 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet._set_hidden_flag",
"gspread/worksheet.py:Worksheet.hide",
"gspread/worksheet.py:Worksheet.show"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gspread/workshe... | burnash/gspread | 0a7de5d4089c922c936711287bf14a00880fd987 | add method to hide worksheet
## Overview
Add method to hide a worksheet.
## Details
The api provide a way to hide a worksheet: [sheet API v4](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties)
expose necessary methods to hide/unhide a worksheet. | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index 46cebb6..79a9135 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -2095,3 +2095,30 @@ class Worksheet:
:param int end: The (exclusive) end row to hide
"""
return self._unhide_dimension(start, end, Dimension.rows)
+
... |
burnash__gspread-1040 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet.unmerge_cells"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
"file": "gspread/worksheet.py"
}
] | burnash/gspread | fe155210568d1346a0b5ff67ac9ef2c8fecae52e | add method to unmerge cells
## Overview
Add method to unmerge cells.
## Details
The api provide a way to unmerge cells: [sheet API v4](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#unmergecellsrequest)
expose necessary methods to unmerge cells. | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index dd36582..0710ded 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -1744,6 +1744,40 @@ class Worksheet:
return self.spreadsheet.batch_update(body)
+ @cast_to_a1_notation
+ def unmerge_cells(self, name):
+ """Unmerge c... |
burnash__gspread-1077 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"gspread/exceptions.py:InvalidInputValue"
],
"edited_entities": null,
"edited_modules": null
},
"file": "gspread/exceptions.py"
},
{
"changes": {
"added_entities": [
"gspread/utils.py:co... | burnash/gspread | 4591fe1d864bf900be1c93bf45eb6b1555066ad5 | call col_values via letters identifying the column
When I need to append values in columns where there may be blank values, for example:
```
row 1
row 2
row 3
row 6
```
It is necessary to collect the column values to calculate which first row will be empty to append the new values:
```
sheet = client.open_... | diff --git a/docs/api/exceptions.rst b/docs/api/exceptions.rst
index f2c3746..daedc46 100644
--- a/docs/api/exceptions.rst
+++ b/docs/api/exceptions.rst
@@ -6,6 +6,7 @@ Exceptions
.. autoexception:: gspread.exceptions.CellNotFound
.. autoexception:: gspread.exceptions.GSpreadException
.. autoexception:: gspread.exce... |
burnash__gspread-1082 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:numericise_all"
],
"edited_modules": [
"gspread/utils.py:numericise_all"
]
},
"file": "gspread/utils.py"
},
{
"changes": {
"added_entitie... | burnash/gspread | f4572e4e1d79e8aeaa7b92c2e1db0ed3008f05d6 | Error with numericise ignore specific column
**Describe the bug**
When reading from a table with a column that contains a mixture of integers and comma separated integers (which should be read as strings), gspread defaults to numericising the entire column and ignoring all the commas. The get_all_record method has a p... | diff --git a/gspread/utils.py b/gspread/utils.py
index c53ac3f..b824079 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -182,16 +182,16 @@ def numericise(
def numericise_all(
- input,
+ values,
empty2zero=False,
default_blank="",
allow_underscores_in_numeric_literals=False,
- ignore... |
burnash__gspread-1092 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.insert_row",
"gspread/worksheet.py:Worksheet.insert_rows",
"gspread/worksheet.py:Worksheet.insert_cols"
],
"edited_modules": [
"gspread... | burnash/gspread | 6d52365a4a717d4872a192dbc5c0fd7387e569c9 | `insert_row`/`insert_rows` methods cannot add data to end of sheet (inheritFromBefore option)
**Describe the bug**
The [inheritFromBefore field](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#insertdimensionrequest) in the Sheets API is unavailable in `gspread`. This parameter allows... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index a7fd82e..16c877d 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -1337,7 +1337,13 @@ class Worksheet:
return self.spreadsheet.values_append(range_label, params, body)
- def insert_row(self, values, index=1, value_input_option... |
burnash__gspread-1095 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet.tab_color",
"gspread/worksheet.py:Worksheet.update_tab_color"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
"file"... | burnash/gspread | 912a1b407cf1ae07483086125bdaed6ce1e45252 | add method to change tab color
## Overview
add method to change the color of a tab
## Details
The api provide a way to change the color of a worksheet tab: [sheet API v4](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#SheetProperties)
expose necessary methods to change that t... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index 16c877d..128cf96 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -180,6 +180,13 @@ class Worksheet:
"""Number of frozen columns."""
return self._properties["gridProperties"].get("frozenColumnCount", 0)
+ @property
+ ... |
burnash__gspread-1119 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:numericise_all"
],
"edited_modules": [
"gspread/utils.py:numericise_all"
]
},
"file": "gspread/utils.py"
}
] | burnash/gspread | b5109bbe8d3589c3b2b7ca02e8d97f5c237ce799 | API breakage in get_all_records / numericise_all fix
**Describe the bug**
The fix in #1082 accidentally broke API compatibility. When the default kwarg for get_all_records numericise_all was changed from None to an empty list this broke anyone who was passing in None explicitly as the function now assumes the argument... | diff --git a/gspread/utils.py b/gspread/utils.py
index b824079..361659e 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -201,6 +201,9 @@ def numericise_all(
:param list ignore: List of ints of indices of the row (index 1) to ignore
numericising.
"""
+ # in case someone explicitly passes `N... |
burnash__gspread-1186 | [
{
"changes": {
"added_entities": [
"gspread/client.py:Client._get_file_drive_metadata"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gspread/client.py:Client"
]
},
"file": "gspread/client.py"
},
{
"changes": {
"a... | burnash/gspread | 50b910f2911c6203e139934bafbbce9fe300e8e1 | spreadsheet.lastUpdateTime throws KeyError exception
**Describe the bug**
I tried using the `spreadsheet.lastUpdateTime` property and it throws a `KeyError` exception because it cannot find the `modifiedTime` attribute. I enabled the **Google Sheet API** and the **Google Drive API** and my credentials are correct.
... | diff --git a/gspread/client.py b/gspread/client.py
index 3f2e8e6..8d899cf 100644
--- a/gspread/client.py
+++ b/gspread/client.py
@@ -91,6 +91,24 @@ class Client:
else:
raise APIError(response)
+ def _get_file_drive_metadata(self, id):
+ """Get the metadata from the Drive API for a spec... |
burnash__gspread-1189 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet.update_notes",
"gspread/worksheet.py:Worksheet.insert_notes",
"gspread/worksheet.py:Worksheet.clear_notes"
],
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.upd... | burnash/gspread | 8c40d2aec3310ceee283ea087013497e33ff76b3 | Add ability to batch add/remove comments and notes for cells
**Is your feature request related to a problem? Please describe.**
We have an `insert_note` function, however, this happens at an individual cell level. I need to batch add comments and I always exceed the API limit.
**Describe the solution you'd like**... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index 99caacb..1ba6c9a 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -2294,6 +2294,57 @@ class Worksheet:
return note
+ def update_notes(self, notes):
+ """update multiple notes. The notes are attached to a certain cell.
+... |
burnash__gspread-1199 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet.clear_tab_color"
],
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.update_tab_color"
],
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
... | burnash/gspread | b9c5e7d8bfaec897f7c9a7847d049d95c75cc818 | Add ability to remove tab color
It would be nice to update `Worksheet.update_tab_color()` to accept `None` as a value, which would then unset the color in Google.
In #1095, a method to retrieve and set the color of a tab was added. However, the `update_tab_color()` method does not support removing the color. It's no... | diff --git a/docs/user-guide.rst b/docs/user-guide.rst
index 7d1d13d..f69f3f6 100644
--- a/docs/user-guide.rst
+++ b/docs/user-guide.rst
@@ -105,6 +105,15 @@ Deleting a Worksheet
sh.del_worksheet(worksheet)
+Updating a Worksheet's name and color
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code:: python
+
+ w... |
burnash__gspread-1202 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet.is_gridlines_hidden",
"gspread/worksheet.py:Worksheet._set_gridlines_hidden_flag",
"gspread/worksheet.py:Worksheet.hide_gridlines",
"gspread/worksheet.py:Worksheet.show_gridlines"
],
"added_modul... | burnash/gspread | 28e733fff2cf7f642c53a029389ad5b4516c8ec3 | Add ability to show and hide grid lines in a spreadsheet
**Is your feature request related to a problem? Please describe.**
Add ability to show and hide grid lines in a spreadsheet. This can be done via batch_update using the following request body:
```
[{
'updateSheetProperties': {
"... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index e329710..18c94df 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -188,6 +188,13 @@ class Worksheet:
"""Number of frozen columns."""
return self._properties["gridProperties"].get("frozenColumnCount", 0)
+ @property
+ ... |
burnash__gspread-1211 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.resize",
"gspread/worksheet.py:Worksheet.update_index",
"gspread/worksheet.py:Worksheet.freeze",
"gspread/worksheet.py:Worksheet._set_hidden_flag"
... | burnash/gspread | b9c5e7d8bfaec897f7c9a7847d049d95c75cc818 | BUG: `Worksheet.isSheetHidden` is not updated when `Worksheet.hide()` or `Worksheet.show()` used
**Describe the bug**
[`Worksheet.isSheetHidden`] is not updated when [`Worksheet.hide`] or [`Worksheet.show`] (i.e., [`Worksheet._set_hidden_flag`]) is used.
**To Reproduce**
Create a spreadsheet with **minimum 2** w... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index 4c3f393..c0a5028 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -1318,7 +1318,12 @@ class Worksheet:
]
}
- return self.spreadsheet.batch_update(body)
+ res = self.spreadsheet.batch_update(body)
+ ... |
burnash__gspread-1215 | [
{
"changes": {
"added_entities": [
"gspread/utils.py:combined_merge_values"
],
"added_modules": [
"gspread/utils.py:combined_merge_values"
],
"edited_entities": null,
"edited_modules": null
},
"file": "gspread/utils.py"
},
{
"changes": {
... | burnash/gspread | fde332b9d59c4825207b5d4c56dfe41d299780e6 | Same value for all merged cells
Currently, when you read from a spreadsheet that has merged (combined) cells, the value is only kept for the first of the individual cells that compose the merged cell.
It would be great to have a flag, when reading a spreadsheet wih `get_all_records()`, to duplicate that initial valu... | diff --git a/gspread/utils.py b/gspread/utils.py
index 2f16b74..cad032f 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -709,6 +709,41 @@ def accepted_kwargs(**default_kwargs):
return decorate
+def combined_merge_values(worksheet_metadata, values):
+ """For each merged region, replace all values wit... |
burnash__gspread-1229 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:filter_dict_values",
"gspread/utils.py:accepted_kwargs"
],
"edited_modules": [
"gspread/utils.py:filter_dict_values",
"gspread/utils.py:accepted_kwar... | burnash/gspread | 33bf5bdea0f0677721102d6c5443ab44d5d986e4 | Remove decorator accepted_kwargs
## Overview
Remove the decorator `accepted_kwargs`. We don't need it and it prevent us from correctly typing the library and using `Enums`.
## Details
The decorator `accepted_kwargs` will filter given `kwargs`.
It will raise an esception is any unknown kwargs is given.
It will ... | diff --git a/gspread/utils.py b/gspread/utils.py
index cfc2e3b..33e84db 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -19,7 +19,6 @@ from typing import (
Dict,
Iterable,
List,
- NewType,
Optional,
Tuple,
TypeVar,
@@ -664,84 +663,6 @@ def is_scalar(x: Any) -> bool:
return ... |
burnash__gspread-1233 | [
{
"changes": {
"added_entities": [
"gspread/spreadsheet.py:Spreadsheet.refresh_lastUpdateTime"
],
"added_modules": null,
"edited_entities": [
"gspread/spreadsheet.py:Spreadsheet.lastUpdateTime"
],
"edited_modules": [
"gspread/spreadsheet.py:Spreadsheet... | burnash/gspread | 012dbff5ff28b0776000cdf5ae9774473b5cddd0 | add `gspread.Worksheet.refreshLastUpdatedTime`
(or another function name).
It should update the property `gspread.Spreadsheet.lastUpdatedTime` with an API call
See https://github.com/burnash/gspread/pull/1225#issuecomment-1594748258 for discussion | diff --git a/gspread/spreadsheet.py b/gspread/spreadsheet.py
index fe456de..74852aa 100644
--- a/gspread/spreadsheet.py
+++ b/gspread/spreadsheet.py
@@ -65,8 +65,7 @@ class Spreadsheet:
try:
return self._properties["modifiedTime"]
except KeyError:
- metadata = self.client._get_... |
burnash__gspread-1269 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/spreadsheet.py:Spreadsheet.get_worksheet_by_id",
"gspread/spreadsheet.py:Spreadsheet.del_worksheet_by_id"
],
"edited_modules": [
"gspread/spreadsheet.py:Spreadsheet"
... | burnash/gspread | 9746f8dbb7f5ccd895fcf3a3397af54796342fa0 | Worksheet ID Type Inconsistencies
**Describe the bug**
On a `Spreadsheet` instance when operating on the underlying worksheet objects sometimes a the worksheet id can be a string (`del_worksheet_by_id`), other times it must be an int (`get_worksheet_by_id`).
**Expected behavior**
Ability to get a worksheet off a s... | diff --git a/gspread/spreadsheet.py b/gspread/spreadsheet.py
index 4d95967..ad3ceb7 100644
--- a/gspread/spreadsheet.py
+++ b/gspread/spreadsheet.py
@@ -7,6 +7,7 @@ This module contains common spreadsheets' models.
"""
import warnings
+from typing import Union
from .exceptions import WorksheetNotFound
from .url... |
burnash__gspread-1271 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:accepted_kwargs"
],
"edited_modules": [
"gspread/utils.py:accepted_kwargs"
]
},
"file": "gspread/utils.py"
},
{
"changes": {
"added_entit... | burnash/gspread | 900e360e5d47d72232c22bb8fbac7b6f1467f1f7 | Feature request: Support named parameters to permit easier transition to 6.x API
**Is your feature request related to a problem? Please describe.**
Since around v5.10, we have started seeing `DeprecationWarning` notices. For example, a call such as `worksheet.update('A1', [['foo']])` results in the warning:
> `meth... | diff --git a/gspread/utils.py b/gspread/utils.py
index 6886a31..1ff79b9 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -89,6 +89,8 @@ DEPRECATION_WARNING_TEMPLATE = (
"[Deprecated][in version {v_deprecated}]: {msg_deprecated}"
)
+REQUIRED_KWARGS = "required"
+
def convert_credentials(credentials):
... |
burnash__gspread-1278 | [
{
"changes": {
"added_entities": [
"gspread/utils.py:convert_hex_to_colors_dict",
"gspread/utils.py:convert_colors_to_hex_value"
],
"added_modules": [
"gspread/utils.py:convert_hex_to_colors_dict",
"gspread/utils.py:convert_colors_to_hex_value"
],
"e... | burnash/gspread | 996bebdb5384e6b04febd4db49bfb2d47d429acb | Add deprecation warning for colors changing from dict -> hex
See #1270
Can this be done in a way where users can change their code to remove the deprecation warnings? Like in #1264
I'm not sure | diff --git a/gspread/utils.py b/gspread/utils.py
index 6886a31..a1aebba 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -12,6 +12,7 @@ from collections.abc import Sequence
from functools import wraps
from itertools import chain
from math import inf
+from typing import Mapping
from urllib.parse import quote ... |
burnash__gspread-1296 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "gspread/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": [
"gspread/utils.py:GridRangeType"
],
... | burnash/gspread | 25499bfd9e5b5745bb8f47bd24e9da4301f8cf1a | Why does `get_values` exist?
`gspread.Worksheet` offers two ways of getting a range of cells: [`Worksheet.get`] and [`Worksheet.get_values`].
Why?
...
They return almost the same thing? [`Worksheet.get`] returns a [`ValueRange`], which inherits from `list`. [`Worksheet.get_values`] returns a list. `get_values`... | diff --git a/README.md b/README.md
index 7a53936..a4bd34e 100644
--- a/README.md
+++ b/README.md
@@ -171,22 +171,30 @@ values_list = worksheet.col_values(1)
### Getting All Values From a Worksheet as a List of Lists
```python
-list_of_lists = worksheet.get_values()
+from gspread.utils import GridRangeType
+list_of_... |
burnash__gspread-1299 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:combined_merge_values"
],
"edited_modules": [
"gspread/utils.py:combined_merge_values"
]
},
"file": "gspread/utils.py"
}
] | burnash/gspread | 3e5976e2e8a587d877869d900bfb41acce61658b | Index error occur in `worksheet.get_values(combine_merged_cells = True)`
**Describe the bug**
If the last row or column in the worksheet is merged_cell,
IndexError occurs when performing `worksheet.get_values(combine_merged_cells = True)`.
:
]
if the top-left four cells are merged.
- :param worksheet_metadata: The metadata returned by the Goog... |
burnash__gspread-1301 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:rightpad",
"gspread/utils.py:fill_gaps"
],
"edited_modules": [
"gspread/utils.py:rightpad",
"gspread/utils.py:fill_gaps"
]
},
"file": "... | burnash/gspread | db0636691b66a063533d0f77e2b49154d9b6a7a0 | alternative to `worksheet.get_all_records()` for specific ranges or max num of rows
**Is your feature request related to a problem? Please describe.**
The `worksheet.get_all_records()` is a convenient method to download the sheet data into structured dictionary format, but it stops being convenient when the worksheet ... | diff --git a/gspread/utils.py b/gspread/utils.py
index aa6c3c0..eb049ee 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -533,12 +533,12 @@ def wid_to_gid(wid):
return str(int(widval, 36) ^ xorval)
-def rightpad(row, max_len):
+def rightpad(row, max_len, padding_value=""):
pad_len = max_len - len(r... |
burnash__gspread-1305 | [
{
"changes": {
"added_entities": [
"gspread/utils.py:is_full_a1_notation",
"gspread/utils.py:get_a1_from_absolute_range"
],
"added_modules": [
"gspread/utils.py:is_full_a1_notation",
"gspread/utils.py:get_a1_from_absolute_range"
],
"edited_entities":... | burnash/gspread | 0a2f084a192ba8038900891c2d1c441cfa10d611 | size of range returned by get and get_values can be smaller than the input size
`Worksheet.get` and `Worksheet.get_values` return a smaller area than asked for if some of it is empty. For example, see this call of `worksheet.get("E7:I11")

list_of_lists = worksheet.get_values()
```
+### Getting a range of values
+
+Receive only the cells with a value in them
+```python
+>>> worksheet.get_values("A... |
burnash__gspread-1308 | [
{
"changes": {
"added_entities": [
"gspread/client.py:Client._list_spreadsheet_files"
],
"added_modules": null,
"edited_entities": [
"gspread/client.py:Client.list_spreadsheet_files",
"gspread/client.py:Client.open",
"gspread/client.py:Client.openall"
... | burnash/gspread | 7fe63bf9e2b8252db914cc47b9a39f4fabc57019 | Return value of list_spreadsheet_files changed without documentation/changelog
When @alifeee improved SpreadsheetNotFound and other exceptions a few weeks ago with #1277, commit c3736d95b516e58199a8158f10b735ca934cbbb2, the signature of `list_spreadsheet_files` changed:
Before, it returned `list[dict]`, now it retu... | diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 0211932..dcebf9f 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -22,9 +22,7 @@
To run tests, add your credentials to `tests/creds.json` and run
```bash
-GS_CREDS_FILENAME="tests/creds.json"
-GS_RECORD_MODE="all"
-tox -e py -... |
burnash__gspread-1335 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:combined_merge_values"
],
"edited_modules": [
"gspread/utils.py:combined_merge_values"
]
},
"file": "gspread/utils.py"
},
{
"changes": {
... | burnash/gspread | f6d1b1b79752503012230f595a4f55ebd231a702 | Combining merged cells producing incorrect result when used on a non-default cell range
**Describe the bug**
Calling `Worksheet.get_values()` with `combine_merged_cells=True` and a range name not starting at column A or row 1 ("B:C" for example) produces incorrect results when expanding the merged cells content.
**... | diff --git a/gspread/utils.py b/gspread/utils.py
index cf0ce90..597e3e9 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -743,7 +743,7 @@ def accepted_kwargs(**default_kwargs):
return decorate
-def combined_merge_values(worksheet_metadata, values):
+def combined_merge_values(worksheet_metadata, values, ... |
burnash__gspread-1336 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.update"
],
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
"file": "gspread/worksheet.py"
}
] | burnash/gspread | 25499bfd9e5b5745bb8f47bd24e9da4301f8cf1a | Find a way to catch wrong argument order in `Worksheet.update()`
## Overview
the method `Worksheet.update()` has change the order of its arguments.
Users may break their code when upgrading to v6.0.0
find a way if possible to identify the argument list has not been updated.
created from #1320 | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index c882f1e..bac9316 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -7,6 +7,7 @@ This module contains common worksheets' models.
"""
import re
+import warnings
from typing import (
Any,
Callable,
@@ -1282,6 +1283,15 @@ class Work... |
burnash__gspread-1377 | [
{
"changes": {
"added_entities": [
"gspread/utils.py:to_records"
],
"added_modules": [
"gspread/utils.py:to_records"
],
"edited_entities": null,
"edited_modules": null
},
"file": "gspread/utils.py"
},
{
"changes": {
"added_entities": null... | burnash/gspread | 63c4c5e7f21185d426c180a04d7534abb240a46a | PROPOSAL: changes to `get_records`/`get_all_records`
`get_all_records` is a method which has provided much pain to maintain recently (issues #1363, #1355, #1354, #1352, #1294) (PRs #1364, #1357, #1345, #1343, #1301, #1028)
We propose that we simplify the method, and reduce its scope.
## New scope
Given a sprea... | diff --git a/gspread/utils.py b/gspread/utils.py
index 880991c..3e3a055 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -878,6 +878,16 @@ def get_a1_from_absolute_range(range_name: str) -> str:
return range_name
+def to_records(
+ headers: Iterable[Any] = [], values: Iterable[Iterable[Any]] = [[]]
+... |
burnash__gspread-1378 | [
{
"changes": {
"added_entities": [
"gspread/utils.py:to_records"
],
"added_modules": [
"gspread/utils.py:to_records"
],
"edited_entities": null,
"edited_modules": null
},
"file": "gspread/utils.py"
},
{
"changes": {
"added_entities": null... | burnash/gspread | 51f9f25cd198f1ca69f530fa0a4cf6750f808097 | add `get_records` changes to README migration guide
The result of issue #1367 should be summarised and added to the [README v6 migration guide](https://github.com/burnash/gspread#v512-to-v60-migration-guide)
After that, we can make the v6.0.0 release | diff --git a/README.md b/README.md
index c84e660..caf3b7a 100644
--- a/README.md
+++ b/README.md
@@ -88,6 +88,20 @@ file.sheet1.update_tab_color(tab_color)
+ age = spreadsheet.get_lastUpdateTime()
```
+### Replace method `Worksheet.get_records`
+
+In v6 you can now only get *all* sheet records, using `Worksheet.get... |
burnash__gspread-1392 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/client.py:Client.export",
"gspread/client.py:Client.list_permissions",
"gspread/client.py:Client.insert_permission",
"gspread/client.py:Client.remove_permission"
],... | burnash/gspread | a14470ebd0ac829275fab983c54762468882d0cd | Client functions in v6.0.0 do not work - `HTTP Client Object has no attribute insert_permission`
**Important**: Please do not post usage questions here.
To get a quick response, please ask a question on Stack Overflow using `gspread` tag.
See existing questions: https://stackoverflow.com/questions/tagged/gspread
... | diff --git a/gspread/client.py b/gspread/client.py
index 34666b0..0cb3150 100644
--- a/gspread/client.py
+++ b/gspread/client.py
@@ -12,7 +12,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from google.auth.credentials import Credentials
from requests import Response, Session
-from .exceptions impor... |
burnash__gspread-1402 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/spreadsheet.py:Spreadsheet.get_worksheet",
"gspread/spreadsheet.py:Spreadsheet.get_worksheet_by_id",
"gspread/spreadsheet.py:Spreadsheet.worksheets",
"gspread/spreadsheet... | burnash/gspread | 0c8d18f793e06a41e9c53b2154016d6c0fedc9ff | gspread 6.0.0 no longer compatible with gspread-formatting
**Important**: Please do not post usage questions here.
To get a quick response, please ask a question on Stack Overflow using `gspread` tag.
See existing questions: https://stackoverflow.com/questions/tagged/gspread
---
**Describe the bug**
gspread 6... | diff --git a/gspread/spreadsheet.py b/gspread/spreadsheet.py
index 09715ff..8c57033 100644
--- a/gspread/spreadsheet.py
+++ b/gspread/spreadsheet.py
@@ -228,7 +228,7 @@ class Spreadsheet:
try:
properties = sheet_data["sheets"][index]["properties"]
- return Worksheet(self.id, self.clie... |
burnash__gspread-1404 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/cell.py:Cell.__init__"
],
"edited_modules": [
"gspread/cell.py:Cell"
]
},
"file": "gspread/cell.py"
},
{
"changes": {
"added_entities": null,
... | burnash/gspread | 0c8d18f793e06a41e9c53b2154016d6c0fedc9ff | return empty cell to old default (None not "None")
see https://github.com/burnash/gspread/pull/1344#issuecomment-1921469828
@lavigne958 this is a small change and should be able to squeeze into 6.0.1 :) | diff --git a/gspread/cell.py b/gspread/cell.py
index 2ab1d4a..61bb260 100644
--- a/gspread/cell.py
+++ b/gspread/cell.py
@@ -16,12 +16,12 @@ class Cell:
in a :class:`~gspread.worksheet.Worksheet`.
"""
- def __init__(self, row: int, col: int, value: str = "") -> None:
+ def __init__(self, row: int, col... |
burnash__gspread-1415 | [
{
"changes": {
"added_entities": [
"gspread/exceptions.py:APIError._extract_error",
"gspread/exceptions.py:APIError.__str__",
"gspread/exceptions.py:APIError.__repr__"
],
"added_modules": null,
"edited_entities": [
"gspread/exceptions.py:APIError.__init__"... | burnash/gspread | 4a48fbdc4bc56724d3a1d8fcdb7f5793fb58f160 | Fix BackOffHTTPClient not returning error 403
Currently, we cannot reliably test raising of `PermissionError` (see #1244 #1245).
This is because for the tests, a [`BackOffHTTPClient`] is used, which has problems returning 403 errors.
https://github.com/burnash/gspread/blob/6259c2be9fae8e7567ea1796dd98e3c0d2570672... | diff --git a/gspread/exceptions.py b/gspread/exceptions.py
index 1a63227..4701ebd 100644
--- a/gspread/exceptions.py
+++ b/gspread/exceptions.py
@@ -6,7 +6,7 @@ Exceptions used in gspread.
"""
-from typing import Dict, Optional, Union
+from typing import Any, Dict, Mapping, Optional, Union
from requests import ... |
burnash__gspread-1417 | [
{
"changes": {
"added_entities": [
"gspread/client.py:Client.set_timeout"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gspread/client.py:Client"
]
},
"file": "gspread/client.py"
},
{
"changes": {
"added_entities... | burnash/gspread | 42974990febf95d3fddc8473348511fbb56592a6 | Client has no attribute set_timeout
**Describe the bug**
Using gspread 6.0.0 I have a `'Client' object has no attribute 'set_timeout'` error.
**To Reproduce**
```
import gspread
gspread_service = gspread.service_account(GSHEET_SERVICE_ACCOUNT_PATH)
gspread_service.set_timeout(120)
```
... | diff --git a/gspread/client.py b/gspread/client.py
index d7c89eb..35d622d 100644
--- a/gspread/client.py
+++ b/gspread/client.py
@@ -43,6 +43,17 @@ class Client:
) -> None:
self.http_client = http_client(auth, session)
+ def set_timeout(self, timeout: Optional[Union[float, Tuple[float, float]]] = Non... |
burnash__gspread-1427 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/utils.py:cast_to_a1_notation"
],
"edited_modules": [
"gspread/utils.py:cast_to_a1_notation"
]
},
"file": "gspread/utils.py"
}
] | burnash/gspread | 42974990febf95d3fddc8473348511fbb56592a6 | cast_to_a1_notation(method) bugs?
cast_to_a1_notation(method) I believe there are bugs here
rowcol_to_a1() does not want to take a list as in *args[:2] but individual values
| diff --git a/gspread/utils.py b/gspread/utils.py
index 0dcb553..f3a5d26 100644
--- a/gspread/utils.py
+++ b/gspread/utils.py
@@ -527,17 +527,23 @@ def cast_to_a1_notation(method: Callable[..., Any]) -> Callable[..., Any]:
method calls.
"""
+ def contains_row_cols(args: Tuple[Any, ...]) -> bool:
+ ... |
burnash__gspread-1444 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"gspread/utils.py:ValidationConditionType"
],
"edited_entities": null,
"edited_modules": null
},
"file": "gspread/utils.py"
},
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Wo... | burnash/gspread | 29f1066afa2e32d456b2922dd68bb1872bd2e3f8 | A way to add DataValidation
**Is your feature request related to a problem? Please describe.**
The API allows to setup data validation on a range via the `batchUpdate` end point: https://developers.google.com/sheets/api/samples/data#data-validation
**Describe the solution you'd like**
Since it is part of the `batc... | diff --git a/README.md b/README.md
index 319eaa9..30f2c5e 100644
--- a/README.md
+++ b/README.md
@@ -292,6 +292,30 @@ from gspread.utils import ValueRenderOption
# Get formula from a cell
>>> worksheet.get("C2:D2", value_render_option=ValueRenderOption.formula)
[['=1/1024']]
+### Add data validation to a range
+
+``... |
burnash__gspread-1475 | [
{
"changes": {
"added_entities": [
"gspread/utils.py:_expand_right",
"gspread/utils.py:_expand_bottom",
"gspread/utils.py:find_table"
],
"added_modules": [
"gspread/utils.py:TableDirection",
"gspread/utils.py:_expand_right",
"gspread/utils.py:_ex... | burnash/gspread | 014f25b136972a863eb6c50fe6a5bcaf6b01acca | cell.expand('table') feature requests
In the past, I used to use [xlwings](https://docs.xlwings.org/en/latest/index.html) library for Excel. In their API they have a very handy way of selecting "tables" starting for a specific cell.
you could use it, for example, to get data from a series of sheets that have table... | diff --git a/docs/user-guide.rst b/docs/user-guide.rst
index cc45996..50b9097 100644
--- a/docs/user-guide.rst
+++ b/docs/user-guide.rst
@@ -350,7 +350,73 @@ Check out the api docs for `DataValidationRule`_ and `CondtionType`_ for more de
.. _CondtionType: https://developers.google.com/sheets/api/reference/rest/v4/s... |
burnash__gspread-1487 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.get_notes"
],
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
"file": "gspread/worksheet.py"
}
] | burnash/gspread | d606420d36e70927e3b9e5162774c4e01cf25998 | get_notes from a range
I think get_notes would be more useful if if could be applied to a range in addition to a worksheet.
| diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index c169c94..aae4ae4 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -2639,8 +2639,12 @@ class Worksheet:
return self.client.batch_update(self.spreadsheet_id, {"requests": requests})
- def get_notes(self, default_empty_value: Opt... |
burnash__gspread-427 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/client.py:Client.open_by_key",
"gspread/client.py:Client.open_by_url"
],
"edited_modules": [
"gspread/client.py:Client"
]
},
"file": "gspread/client.py"... | burnash/gspread | 51ce7ab1ee87f738ccae40385149cc859e1379f6 | Incorrect parsing of URLs in "gc.open_by_url" (new Drive URL format?)
I tried using "gc.open_by_url" for the first time, and got a "gspread.exceptions.NoValidUrlKeyFound." My URL looked like this (key modified):
```
baselinedata = gc.open_by_url("https://docs.google.com/spreadsheets/d/1qTqNDk5xYnapVa2Uuc2jIFL9qUuZ7iD... | diff --git a/README.md b/README.md
index 86b0e81..a8dbe3d 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,5 @@
# Google Spreadsheets Python API
-<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=TK7NPLQ6XEPKS&lc=US&item_name=gspread¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3... |
burnash__gspread-502 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gspread/models.py:Worksheet.get_all_records"
],
"edited_modules": [
"gspread/models.py:Worksheet"
]
},
"file": "gspread/models.py"
},
{
"changes": {
"adde... | burnash/gspread | c65b3893d02d8e3896cfb7dd2d20eb2f0bdcdeb4 | Ambiguity in the `numericise` function depending on Python version.
https://github.com/burnash/gspread/blob/217b43073e1abe9ceb1d65d2d0719d56f0a14642/gspread/utils.py#L58
I have run into some issues when fetching data from spreadsheets using the `get_all_records()` method when using Python 3.6+.
If a worksheet has... | diff --git a/gspread/models.py b/gspread/models.py
index db592c7..30b36ea 100644
--- a/gspread/models.py
+++ b/gspread/models.py
@@ -545,11 +545,11 @@ class Worksheet(object):
except KeyError:
return []
- def get_all_records(self, empty2zero=False, head=1, default_blank=""):
- """Retur... |
burnash__gspread-763 | [
{
"changes": {
"added_entities": [
"gspread/models.py:Cell.address"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"gspread/models.py:Cell"
]
},
"file": "gspread/models.py"
}
] | burnash/gspread | 0b97a8535adb591e24c095b974de7fd9070f1b8c | Cell class should support conversion to A1 notation
Currently, there is no straightforward way to fetch data in `A1` notation from `Cell` object (of course one can use `utils` package explicitly). It will be a great to have this feature.
Let's say you have the following steps to be performed:
1. Find some specific C... | diff --git a/gspread/models.py b/gspread/models.py
index e56aeeb..d48c079 100644
--- a/gspread/models.py
+++ b/gspread/models.py
@@ -1917,6 +1917,11 @@ class Cell(object):
except ValueError:
return None
+ @property
+ def address(self):
+ """Cell address in A1 notation."""
+ r... |
burnash__gspread-968 | [
{
"changes": {
"added_entities": [
"gspread/worksheet.py:Worksheet.get_all_cells"
],
"added_modules": null,
"edited_entities": [
"gspread/worksheet.py:Worksheet.range"
],
"edited_modules": [
"gspread/worksheet.py:Worksheet"
]
},
"file": "... | burnash/gspread | 5a69f7050ecf7d5b2e44283f3325e4c200e0e0b4 | Update method range documentation to include get all cells.
# Overview
Update documentation of method `worksheet.range()` to include an example
that returns all the cells of the worksheet: `example: get all cells worksheet.range("")`
extra: add a new method `get_all_cells`. that would simply do the call to the m... | diff --git a/gspread/worksheet.py b/gspread/worksheet.py
index bd05461..34f0754 100644
--- a/gspread/worksheet.py
+++ b/gspread/worksheet.py
@@ -188,7 +188,7 @@ class Worksheet:
return Cell(row, col, value)
@cast_to_a1_notation
- def range(self, name):
+ def range(self, name=""):
"""Retur... |
burnash__gspread-989 | [
{
"changes": {
"added_entities": [
"gspread/spreadsheet.py:Spreadsheet.timezone",
"gspread/spreadsheet.py:Spreadsheet.locale",
"gspread/spreadsheet.py:Spreadsheet.update_timezone",
"gspread/spreadsheet.py:Spreadsheet.update_locale"
],
"added_modules": null,
... | burnash/gspread | 2e737c29575c49aec7d5d06f6ea7f04ce9b082e0 | Feature request: set file Properties as "timeZone"
I would like to change the timeZone of spreadsheet file, presents in file Properties as listed in
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets#SpreadsheetProperties
Setting it during create or after with set operation
Because I discovere... | diff --git a/gspread/spreadsheet.py b/gspread/spreadsheet.py
index b291607..e2f07d4 100644
--- a/gspread/spreadsheet.py
+++ b/gspread/spreadsheet.py
@@ -93,6 +93,16 @@ class Spreadsheet:
stacklevel=2,
)
+ @property
+ def timezone(self):
+ """Spreadsheet timeZone"""
+ return s... |
buyalsky__ordered-hash-set-5 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/ordered_hash_set.py:OrderedSet.add",
"src/ordered_hash_set.py:OrderedSet.remove"
],
"edited_modules": [
"src/ordered_hash_set.py:OrderedSet"
]
},
"file": "s... | buyalsky/ordered-hash-set | e6c09d81849cbb832099792b2411861dd01c687f | Returning indexes
OrderedSet's `add` method should return index of the added item. If the item is already in the OrderedSet instance, the method should return the index it already had.
Similarly, `remove` method should return index of the removed item.
Example:
```python3
s = OrderedSet()
s.add('Foo') # Should ... | diff --git a/src/ordered_hash_set.py b/src/ordered_hash_set.py
index 27ae04b..95a4647 100644
--- a/src/ordered_hash_set.py
+++ b/src/ordered_hash_set.py
@@ -9,6 +9,7 @@ class OrderedSet:
def add(self, item):
"""
Adds the item to set if it is not exist.
+ Returns the index of added item (or... |
bvanelli__actualpy-108 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"actual/__init__.py:Actual._run_bank_sync_account",
"actual/__init__.py:Actual.run_bank_sync"
],
"edited_modules": [
"actual/__init__.py:Actual"
]
},
"file": "ac... | bvanelli/actualpy | d2f2878016e5ac7b8aaac65bba42eb44af1a5808 | Handle starting balances for bank sync
Following #25 , if syncing with a bank from scratch, the final amount might not match the balances, so updating the starting balances might be required. | diff --git a/actual/__init__.py b/actual/__init__.py
index 89544e1..8bc9879 100644
--- a/actual/__init__.py
+++ b/actual/__init__.py
@@ -37,9 +37,11 @@ from actual.exceptions import (
from actual.migrations import js_migration_statements
from actual.protobuf_models import HULC_Client, Message, SyncRequest
from actua... |
bvanelli__actualpy-117 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"actual/__init__.py:Actual._run_bank_sync_account"
],
"edited_modules": [
"actual/__init__.py:Actual"
]
},
"file": "actual/__init__.py"
},
{
"changes": {
"... | bvanelli/actualpy | 6f124f780a0c517e5cd84dac5af4208073b8056b | Missing fields from run_bank_sync response with GoCardless
### Checks
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of actualpy.
### Reproducible example
```python
def sync_accounts_sync(self):
try:
actual = Actual(
... | diff --git a/actual/__init__.py b/actual/__init__.py
index 8bc9879..27b4068 100644
--- a/actual/__init__.py
+++ b/actual/__init__.py
@@ -489,6 +489,8 @@ class Actual(ActualServer):
new_transactions = new_transactions_data.data.transactions.all
imported_transactions = []
for transaction in new... |
bvanelli__actualpy-120 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"actual/__init__.py:Actual.run_rules",
"actual/__init__.py:Actual.run_bank_sync"
],
"edited_modules": [
"actual/__init__.py:Actual"
]
},
"file": "actual/__init__... | bvanelli/actualpy | 9cd0db99557db4786bc03e5d383fad55b3283d8b | Handle rules for bank sync
Following https://github.com/bvanelli/actualpy/issues/25, if syncing the bank data, we need to evaluate rules before matching the entities. | diff --git a/actual/__init__.py b/actual/__init__.py
index 3376435..9ee9b19 100644
--- a/actual/__init__.py
+++ b/actual/__init__.py
@@ -491,10 +491,11 @@ class Actual(ActualServer):
if self._file.group_id: # only files with a group id can be synced
self.sync_sync(req)
- def run_rules(self):... |
bvanelli__actualpy-23 | [
{
"changes": {
"added_entities": [
"actual/__init__.py:Actual.rename_budget"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"actual/__init__.py:Actual"
]
},
"file": "actual/__init__.py"
},
{
"changes": {
"added_ent... | bvanelli/actualpy | 2bcc2cb1248cc59e736e833f5d70b6a0d3d5d393 | get_accounts does not return a balance
The get_accounts function does not appear to be populating the balances. I have balances in Actual.
Code snippet:
```python
accounts = get_accounts(actual.session, 'Bank...6877')
for account in accounts:
print(account.name)
print(account)
```
... | diff --git a/actual/__init__.py b/actual/__init__.py
index 438f8d9..b154bd4 100644
--- a/actual/__init__.py
+++ b/actual/__init__.py
@@ -159,6 +159,11 @@ class Actual(ActualServer):
# create a clock
self.load_clock()
+ def rename_budget(self, budget_name: str):
+ if not self._file:
+ ... |
bvanelli__actualpy-35 | [
{
"changes": {
"added_entities": [
"actual/__init__.py:Actual.delete_budget",
"actual/__init__.py:Actual.get_metadata"
],
"added_modules": null,
"edited_entities": [
"actual/__init__.py:Actual.export_data",
"actual/__init__.py:Actual.upload_budget",
... | bvanelli/actualpy | 7eecd67b47f7a344820f4bd23f8603dd61d8a971 | Generate first alpha version and release to pip
- Add instructions on how to install the package
- Decide on how to do the versioning | diff --git a/README.md b/README.md
index ef120bc..3096b70 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,13 @@ Python API implementation for Actual server.
# Installation
-Install it via Pip using the repository url:
+Install it via Pip:
+
+```bash
+pip install actualpy
+```
+
+If you want to have the latest ... |
bvanelli__actualpy-47 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"actual/__init__.py:Actual.set_file"
],
"edited_modules": [
"actual/__init__.py:Actual"
]
},
"file": "actual/__init__.py"
},
{
"changes": {
"added_entities... | bvanelli/actualpy | c59a360127c47b906e1a5d7a98974b3b3bcdda08 | Error when trying to run rules or evaluate rules
### Checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of actualpy.
### Reproducible example
```python
from actual import Actual
with Actual(base_url="http://localhost:5006", pass... | diff --git a/README.md b/README.md
index 3096b70..5c93e5b 100644
--- a/README.md
+++ b/README.md
@@ -48,6 +48,22 @@ with Actual(
print(t.date, account_name, t.notes, t.amount, category)
```
+The `file` will be matched to either one of the following:
+
+- The name of the budget, found top the top left cornet... |
bvanelli__actualpy-55 | [
{
"changes": {
"added_entities": [
"actual/rules.py:get_normalized_string"
],
"added_modules": [
"actual/rules.py:get_normalized_string"
],
"edited_entities": [
"actual/rules.py:ValueType.is_valid",
"actual/rules.py:get_value",
"actual/rules.... | bvanelli/actualpy | f7210990432f8748a7707463be7ba477fc717bdd | Rules 'contains' condition is case sensitive
### Checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of actualpy.
### Reproducible example
```python
from actual import Actual
with Actual(base_url="http://localhost:5006", password... | diff --git a/actual/rules.py b/actual/rules.py
index 6147b85..de1fd65 100644
--- a/actual/rules.py
+++ b/actual/rules.py
@@ -2,7 +2,9 @@ from __future__ import annotations
import datetime
import enum
+import re
import typing
+import unicodedata
import pydantic
@@ -12,6 +14,14 @@ from actual.database import Ba... |
bvanelli__actualpy-64 | [
{
"changes": {
"added_entities": [
"actual/database.py:Accounts.notes"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"actual/database.py:Accounts",
"actual/database.py:Notes"
]
},
"file": "actual/database.py"
}
] | bvanelli/actualpy | 07628637f9974072545450a2ba4425beb632524e | Read Accounts Notes
### Description
I could not find how to query an account's note via actualpy, but I have seen someone who said he did it with the official api on discord.
Is it possible to implement?
Below, the code example he have posted, I don't know if it is helpful:
```
getAccountNote: async func... | diff --git a/actual/database.py b/actual/database.py
index 72a34f1..a33d46e 100644
--- a/actual/database.py
+++ b/actual/database.py
@@ -214,6 +214,11 @@ class Accounts(BaseModel, table=True):
)
return decimal.Decimal(value) / 100
+ @property
+ def notes(self) -> Optional[str]:
+ """Ret... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.