Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

check return value is not null (#18) #19

Merged
merged 1 commit into from
Dec 31, 2022

Conversation

mnbf9rca
Copy link
Owner

No description provided.

@mnbf9rca mnbf9rca merged commit 927119e into feat/create_timeseries_to_timescale Dec 31, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 31, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.03%.

Quality metrics Before After Change
Complexity 0.38 ⭐ 0.43 ⭐ 0.05 👎
Method Length 57.20 ⭐ 57.20 ⭐ 0.00
Working memory 6.41 🙂 6.38 🙂 -0.03 👍
Quality 82.51% 82.54% 0.03% 👍
Other metrics Before After Change
Lines 441 440 -1
Changed files Quality Before Quality After Quality Change
json_to_timeseries/__init__.py 79.88% ⭐ 79.37% ⭐ -0.51% 👎
test/test_json_to_timeseries.py 82.91% ⭐ 83.01% ⭐ 0.10% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
test/test_json_to_timeseries.py Test_send_to_converter.test_send_to_converter_unknown_publisher 0 ⭐ 77 🙂 10 😞 72.30% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@github-actions
Copy link

github-actions bot commented Dec 31, 2022

Coverage report

The coverage rate went from 100% to 94.36% ⬇️
The branch rate is 93%.

None of the new lines are part of the tested code. Therefore, there is no coverage data about them.

@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 08:45 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 08:45 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 08:45 — with GitHub Actions Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev December 31, 2022 08:45 Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev December 31, 2022 08:46 Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 10:59 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 11:00 — with GitHub Actions Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev December 31, 2022 11:00 Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev December 31, 2022 11:00 Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 11:02 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 11:02 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 23:58 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev December 31, 2022 23:58 — with GitHub Actions Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev December 31, 2022 23:58 Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev December 31, 2022 23:58 Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev January 1, 2023 02:06 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev January 1, 2023 02:06 — with GitHub Actions Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev January 1, 2023 02:06 Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev January 1, 2023 02:06 Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev January 1, 2023 02:08 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev January 1, 2023 02:08 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev January 1, 2023 02:08 — with GitHub Actions Inactive
@mnbf9rca mnbf9rca temporarily deployed to dev January 1, 2023 02:08 — with GitHub Actions Inactive
@sourcery-ai sourcery-ai bot temporarily deployed to dev January 1, 2023 02:08 Inactive
mnbf9rca added a commit that referenced this pull request Jan 1, 2023
* create template function app

* create skeleton of timescale.py

* create tests identify_data_column (& test 100 🎉)

* give test_timescale its own DB connection

* github actions only allows CAPITAL envvars

* Update run_tests.yml

* test actual DB connection; add teardown_method

* check return value is not null (#18) (#19)

* test create_single_timescale_record against db

* remove psycopg2 and rely on psycopg3(psycopg)

* remove correct psycopg version

* 'Refactored by Sourcery' (#16)

Co-authored-by: Sourcery AI <>

* replace recursive_json_parser with (working) recursively_deserialize

* start writing to database

* rename measurement_name to measurement_of

* get rid of TimescaleConnection because psycopg3 does it

* test for timescale_records_from_batch_of_events with mock psycopg and create_single_timescale_record

* create_timescale_records_from_batch_of_events checks schema

* created Test_create_single_timescale_record_with_mock

* enable timeseries_to_timescale

* 'Refactored by Sourcery' (#20)

Co-authored-by: Sourcery AI <>

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
mnbf9rca added a commit that referenced this pull request Oct 27, 2023
* create template function app

* create skeleton of timescale.py

* create tests identify_data_column (& test 100 🎉)

* give test_timescale its own DB connection

* github actions only allows CAPITAL envvars

* Update run_tests.yml

* test actual DB connection; add teardown_method

* check return value is not null (#18) (#19)

* test create_single_timescale_record against db

* remove psycopg2 and rely on psycopg3(psycopg)

* remove correct psycopg version

* 'Refactored by Sourcery' (#16)

Co-authored-by: Sourcery AI <>

* replace recursive_json_parser with (working) recursively_deserialize

* start writing to database

* rename measurement_name to measurement_of

* get rid of TimescaleConnection because psycopg3 does it

* test for timescale_records_from_batch_of_events with mock psycopg and create_single_timescale_record

* create_timescale_records_from_batch_of_events checks schema

* created Test_create_single_timescale_record_with_mock

* enable timeseries_to_timescale

* 'Refactored by Sourcery' (#20)

Co-authored-by: Sourcery AI <>

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
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.

1 participant