Skip to content

Commit af79f60

Browse files
authored
Merge pull request #118 from dlt-hub/fix/remove_print_statements_update_readme
remove print statements and update readme
2 parents b0f6f59 + de7525a commit af79f60

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You will need Python 3.9 or higher installed, as well as pip. You can run `pip i
2626

2727
We will create a simple example pipeline from a [PokeAPI spec](https://pokeapi.co/) in our repo. You can point to any other OpenAPI Spec instead if you prefer.
2828

29-
```console
29+
```sh
3030
# 1.a. Run the generator with a URL:
3131
$ dlt-init-openapi pokemon --url https://raw.githubusercontent.com/dlt-hub/dlt-init-openapi/devel/tests/cases/e2e_specs/pokeapi.yml --global-limit 2
3232

@@ -35,9 +35,12 @@ $ dlt-init-openapi pokemon --path ./my_specs/pokeapi.yml
3535

3636
# 2. You can now pick both of the endpoints from the popup.
3737

38-
# 3. After selecting your Pokemon endpoints and hitting Enter, your pipeline will be rendered.
38+
# 3. After selecting your Pokemon endpoints and hitting Enter,
39+
# your pipeline will be rendered.
3940

40-
# 4. If you have any kind of authentication on your pipeline (this example does not), open the `.dlt/secrets.toml` and provide the credentials. You can find further settings in the `.dlt/config.toml`.
41+
# 4. If you have any kind of authentication on your pipeline (this example does not),
42+
# open the `.dlt/secrets.toml` and provide the credentials. You can find further
43+
# settings in the `.dlt/config.toml`.
4144

4245
# 5. Go to the created pipeline folder and run your pipeline.
4346
$ cd pokemon-pipeline
@@ -46,22 +49,25 @@ $ PROGRESS=enlighten python pipeline.py # we use enlighten for a nice progress b
4649
# 6. Print the pipeline info to the console to see what got loaded.
4750
$ dlt pipeline pokemon_pipeline info
4851

49-
# 7. You can now also install Streamlit to see a preview of the data; you should have loaded 40 Pokemons and their details.
52+
# 7. You can now also install Streamlit to see a preview of the data; you should
53+
# have loaded 40 Pokemons and their details.
5054
$ pip install pandas streamlit
5155
$ dlt pipeline pokemon_pipeline show
5256

53-
# 8. You can go to our docs at https://dlthub.com/docs to learn how to modify the generated pipeline to load to many destinations, place schema contracts on your pipeline, and many other things.
57+
# 8. You can go to our docs at https://dlthub.com/docs to learn how to modify
58+
# the generated pipeline to load to many destinations, place schema contracts
59+
# on your pipeline, and many other things.
5460

55-
# NOTE: We used the `--global-limit 2` CLI flag to limit the requests to the PokeAPI for this example. This way, the Pokemon collection endpoint only gets queried twice, resulting in 2 x 20 Pokemon
56-
57-
details being rendered.
61+
# NOTE: We used the `--global-limit 2` CLI flag to limit the requests to the PokeAPI
62+
# for this example. This way, the Pokemon collection endpoint only gets queried
63+
# twice, resulting in 2 x 20 Pokemon details being rendered.
5864
```
5965

6066
## What will be created?
6167

6268
When you run the `init` command above, the following files will be generated:
6369

64-
```
70+
```text
6571
pokemon_pipeline/
6672
├── .dlt/
6773
│ ├── config.toml # dlt config, learn more at dlthub.com/docs
@@ -84,7 +90,7 @@ This file contains the configuration dictionary for the [dlt rest_api](https://d
8490

8591
The generated dictionary will look something like this:
8692

87-
```python
93+
```py
8894
{
8995
"client": {
9096
"base_url": base_url,
@@ -134,7 +140,7 @@ The generated dictionary will look something like this:
134140

135141
## CLI command
136142

137-
```console
143+
```sh
138144
$ dlt-init-openapi <source_name> [OPTIONS]
139145
# example:
140146
$ dlt-init-openapi pokemon --path ./path/to/my_spec.yml --no-interactive --output-path ./my_pipeline
@@ -170,7 +176,7 @@ package_name: "other_package_name"
170176
171177
And use it with the config argument:
172178
173-
```console
179+
```sh
174180
$ dlt-init-openapi pokemon --url ... --config config.yml
175181
```
176182

dlt_init_openapi/parser/endpoints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def unresolvable_path_param_names(self) -> List[str]:
125125
@property
126126
def unresolvable_query_params(self) -> List[Parameter]:
127127
"""returns a list of required query param names with params that are used by the paginator excluded"""
128-
print("HERE")
129128
paginator_params = self.detected_pagination.param_names if self.detected_pagination else []
130129
query_params: List[Parameter] = []
131130
for param in self.list_all_parameters:

0 commit comments

Comments
 (0)