Skip to content

Conversation

@dat-a-man
Copy link
Collaborator

No description provided.

@dat-a-man dat-a-man force-pushed the update-dependencies/aman branch 4 times, most recently from 92f696e to fcd89e6 Compare May 17, 2025 12:07
- Upgraded dlt from ^0.4.12 to ^1.11.0
- Updated rest_api.py, utils.py, and other files
- Cleanup and minor fixes# This is a combination of 13 commits.

Update dlt dependency from ^0.4.12 to ^1.11.0

Updated 'update_rest_api.py'

Updated

Updated utils.py

updated

Updted

Updated

Updated

Updated

Updated

Updated

Updated

updated pokemon

Updated
@dat-a-man dat-a-man force-pushed the update-dependencies/aman branch from fcd89e6 to 57152c8 Compare May 17, 2025 12:11
@dat-a-man dat-a-man requested a review from sh-rp May 17, 2025 12:15
@dat-a-man dat-a-man self-assigned this May 18, 2025
REST_API_SOURCE_LOCATION = str(pathlib.Path(__file__).parent / "rest_api")

# Placeholder for SecretsTomlConfig to resolve ImportError in tests
SecretsTomlConfig = Dict[str, Any]
Copy link
Collaborator

@sh-rp sh-rp Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be used anywhere, does it? Why is it imported in the tests at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

FILES = ["README.md", "__init__.py", "config_setup.py", "exceptions.py", "requirements.txt", "typing.py", "utils.py"]


def update_rest_api(force: bool = False) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this and the commands that depend on it entirely

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

# there should be 20 entries with pokemon details loaded
# (the id is only loaded on the full request)
assert db.sql("SELECT count (*) from pokemon_data.pokemon as p WHERE p.id IS NOT NULL").fetchone()[0] == 40
assert db.sql("SELECT count (*) from pokemon_data.pokemon as p WHERE p.id IS NOT NULL").fetchone()[0] == 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know why this has changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fetching 40 Pokémon's names, but only 2 of them have an ID, so I decreased the number to 2 to match the assertion.

from dlt_init_openapi.config import REST_API_SOURCE_LOCATION, Config
from rest_api.typing import EndpointResource, RESTAPIConfig
from dlt_init_openapi.config import REST_API_SOURCE_LOCATION, Config, SecretsTomlConfig
from dlt_init_openapi.parser.context import OpenapiContext
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this line here? OpenapiContext does not seem to be used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

REST_API_SOURCE_LOCATION = str(pathlib.Path(__file__).parent.resolve() / "../rest_api")
# In dlt>=1.11.0, the rest_api is part of the main package
# For backwards compatibility, we keep a stub directory
REST_API_SOURCE_LOCATION = str(pathlib.Path(__file__).parent / "rest_api")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed anymore.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sh-rp see also the PR I opened related to the rest_api source.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it.

@dat-a-man dat-a-man changed the title Update dlt dependency from ^0.4.12 to ^1.11.0 Update dlt dependency from ^0.4.12 to latest Aug 26, 2025
@AstrakhantsevaAA AstrakhantsevaAA merged commit 5139baf into devel Aug 29, 2025
8 checks passed
@AstrakhantsevaAA AstrakhantsevaAA deleted the update-dependencies/aman branch August 29, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants