Skip to content

Commit

Permalink
Fix deprecated lazy_fixture imports (#1674)
Browse files Browse the repository at this point in the history
* Fix deprecated lazy_fixture imports
* Set fail-fast to false to detect errors in python versions only
* Update deprecated np.NaN
* Removing no longer needed test dependency
  • Loading branch information
pdelboca authored Aug 28, 2024
1 parent e039301 commit 4d334f0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
if: github.event_name != 'schedule' || github.repository_owner == 'frictionlessdata'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
Expand Down
2 changes: 1 addition & 1 deletion frictionless/formats/pandas/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def write_row_stream(self, source: TableResource):
# http://pandas.pydata.org/pandas-docs/stable/gotchas.html#support-for-integer-na
if value is None and field.type in ("number", "integer"):
fixed_types[field.name] = "number"
value = np.NaN
value = np.nan
if field.name in source.schema.primary_key:
index_values.append(value)
else:
Expand Down
9 changes: 5 additions & 4 deletions frictionless/indexer/__spec__/test_resource.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import pytest
from pytest_lazy_fixtures import lf

from frictionless import formats, platform
from frictionless.resources import TableResource

control = formats.sql.SqlControl(table="table")
fast_database_urls = [
pytest.lazy_fixtures("sqlite_url"),
pytest.lazy_fixtures("postgresql_url"),
lf("sqlite_url"),
lf("postgresql_url"),
]
database_urls = fast_database_urls + [
pytest.lazy_fixtures("mysql_url"),
lf("mysql_url"),
]
if platform.type != "windows":
database_urls += [
pytest.lazy_fixtures("duckdb_url"),
lf("duckdb_url"),
]
pytestmark = pytest.mark.skipif(
platform.type == "darwin" or platform.type == "windows",
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dev = [
"pytest-cov",
"pytest-vcr",
"pytest-mock",
"pytest-only",
"oauth2client",
"requests-mock",
"pytest-dotenv",
Expand Down

0 comments on commit 4d334f0

Please sign in to comment.