From 0101e817e1fbfb60a4755b1ecd0f18c195c4d691 Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:56:40 +0300 Subject: [PATCH 1/6] Add main.py back --- pdr_backend/dfbuyer/main.py | 5 +++++ pdr_backend/predictoor/main.py | 4 ++++ pdr_backend/publisher/main.py | 6 ++++++ pdr_backend/trader/main.py | 4 ++++ pdr_backend/trueval/main.py | 4 ++++ 5 files changed, 23 insertions(+) create mode 100644 pdr_backend/dfbuyer/main.py create mode 100644 pdr_backend/predictoor/main.py create mode 100644 pdr_backend/trader/main.py create mode 100644 pdr_backend/trueval/main.py diff --git a/pdr_backend/dfbuyer/main.py b/pdr_backend/dfbuyer/main.py new file mode 100644 index 000000000..8e87a721f --- /dev/null +++ b/pdr_backend/dfbuyer/main.py @@ -0,0 +1,5 @@ +if __name__ == "__main__": + print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") + print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") + print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") + diff --git a/pdr_backend/predictoor/main.py b/pdr_backend/predictoor/main.py new file mode 100644 index 000000000..9bc63e2ff --- /dev/null +++ b/pdr_backend/predictoor/main.py @@ -0,0 +1,4 @@ +if __name__ == "__main__": + print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") + print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") + print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index 31c33e9e1..d64860ac8 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -142,3 +142,9 @@ def publish_assets(web3_pp: Web3PP, publisher_ss: PublisherSS): web3_pp=web3_pp, ) print("Publish done") + + +if __name__ == "__main__": + print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") + print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") + print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") diff --git a/pdr_backend/trader/main.py b/pdr_backend/trader/main.py new file mode 100644 index 000000000..9bc63e2ff --- /dev/null +++ b/pdr_backend/trader/main.py @@ -0,0 +1,4 @@ +if __name__ == "__main__": + print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") + print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") + print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") diff --git a/pdr_backend/trueval/main.py b/pdr_backend/trueval/main.py new file mode 100644 index 000000000..9bc63e2ff --- /dev/null +++ b/pdr_backend/trueval/main.py @@ -0,0 +1,4 @@ +if __name__ == "__main__": + print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") + print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") + print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") From 55340c8146fc1c645be89e48a348ffb5706c1b81 Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:08:17 +0000 Subject: [PATCH 2/6] Black --- pdr_backend/dfbuyer/main.py | 13 +++++++++---- pdr_backend/predictoor/main.py | 12 +++++++++--- pdr_backend/publisher/main.py | 12 +++++++++--- pdr_backend/trader/main.py | 12 +++++++++--- pdr_backend/trueval/main.py | 12 +++++++++--- 5 files changed, 45 insertions(+), 16 deletions(-) diff --git a/pdr_backend/dfbuyer/main.py b/pdr_backend/dfbuyer/main.py index 8e87a721f..9c16f0471 100644 --- a/pdr_backend/dfbuyer/main.py +++ b/pdr_backend/dfbuyer/main.py @@ -1,5 +1,10 @@ if __name__ == "__main__": - print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") - print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") - print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") - + print( + "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." + ) + print( + "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + ) + print( + "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" + ) diff --git a/pdr_backend/predictoor/main.py b/pdr_backend/predictoor/main.py index 9bc63e2ff..9c16f0471 100644 --- a/pdr_backend/predictoor/main.py +++ b/pdr_backend/predictoor/main.py @@ -1,4 +1,10 @@ if __name__ == "__main__": - print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") - print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") - print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") + print( + "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." + ) + print( + "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + ) + print( + "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" + ) diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index d64860ac8..cfd182c1c 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -145,6 +145,12 @@ def publish_assets(web3_pp: Web3PP, publisher_ss: PublisherSS): if __name__ == "__main__": - print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") - print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") - print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") + print( + "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." + ) + print( + "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + ) + print( + "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" + ) diff --git a/pdr_backend/trader/main.py b/pdr_backend/trader/main.py index 9bc63e2ff..9c16f0471 100644 --- a/pdr_backend/trader/main.py +++ b/pdr_backend/trader/main.py @@ -1,4 +1,10 @@ if __name__ == "__main__": - print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") - print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") - print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") + print( + "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." + ) + print( + "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + ) + print( + "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" + ) diff --git a/pdr_backend/trueval/main.py b/pdr_backend/trueval/main.py index 9bc63e2ff..9c16f0471 100644 --- a/pdr_backend/trueval/main.py +++ b/pdr_backend/trueval/main.py @@ -1,4 +1,10 @@ if __name__ == "__main__": - print("Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead.") - print("View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases") - print("Swich back to version v0.1.1 if you'd like to keep using main.py and env vars") + print( + "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." + ) + print( + "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + ) + print( + "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" + ) From 8d97753e78490e4c6a5c1428c3a238b1096a24b0 Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:10:58 +0300 Subject: [PATCH 3/6] Linter --- pdr_backend/dfbuyer/main.py | 2 +- pdr_backend/predictoor/main.py | 2 +- pdr_backend/publisher/main.py | 2 +- pdr_backend/trader/main.py | 2 +- pdr_backend/trueval/main.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pdr_backend/dfbuyer/main.py b/pdr_backend/dfbuyer/main.py index 9c16f0471..feae428e8 100644 --- a/pdr_backend/dfbuyer/main.py +++ b/pdr_backend/dfbuyer/main.py @@ -3,7 +3,7 @@ "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) print( - "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) print( "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" diff --git a/pdr_backend/predictoor/main.py b/pdr_backend/predictoor/main.py index 9c16f0471..feae428e8 100644 --- a/pdr_backend/predictoor/main.py +++ b/pdr_backend/predictoor/main.py @@ -3,7 +3,7 @@ "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) print( - "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) print( "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index cfd182c1c..8cf5f2f23 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -149,7 +149,7 @@ def publish_assets(web3_pp: Web3PP, publisher_ss: PublisherSS): "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) print( - "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) print( "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" diff --git a/pdr_backend/trader/main.py b/pdr_backend/trader/main.py index 9c16f0471..feae428e8 100644 --- a/pdr_backend/trader/main.py +++ b/pdr_backend/trader/main.py @@ -3,7 +3,7 @@ "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) print( - "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) print( "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" diff --git a/pdr_backend/trueval/main.py b/pdr_backend/trueval/main.py index 9c16f0471..feae428e8 100644 --- a/pdr_backend/trueval/main.py +++ b/pdr_backend/trueval/main.py @@ -3,7 +3,7 @@ "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) print( - "View the releases page to learn how to migrate: https://github.com/oceanprotocol/pdr-backend/releases" + "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) print( "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" From 0e6c585c8b7763a8866d7752c834a15f3f05d4f8 Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:13:25 +0300 Subject: [PATCH 4/6] Linter --- pdr_backend/dfbuyer/main.py | 1 + pdr_backend/predictoor/main.py | 1 + pdr_backend/publisher/main.py | 1 + pdr_backend/trader/main.py | 1 + pdr_backend/trueval/main.py | 1 + 5 files changed, 5 insertions(+) diff --git a/pdr_backend/dfbuyer/main.py b/pdr_backend/dfbuyer/main.py index feae428e8..30ae7e97f 100644 --- a/pdr_backend/dfbuyer/main.py +++ b/pdr_backend/dfbuyer/main.py @@ -2,6 +2,7 @@ print( "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) + # pylint: disable=line-too-long print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) diff --git a/pdr_backend/predictoor/main.py b/pdr_backend/predictoor/main.py index feae428e8..30ae7e97f 100644 --- a/pdr_backend/predictoor/main.py +++ b/pdr_backend/predictoor/main.py @@ -2,6 +2,7 @@ print( "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) + # pylint: disable=line-too-long print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index 8cf5f2f23..53527153e 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -148,6 +148,7 @@ def publish_assets(web3_pp: Web3PP, publisher_ss: PublisherSS): print( "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) + # pylint: disable=line-too-long print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) diff --git a/pdr_backend/trader/main.py b/pdr_backend/trader/main.py index feae428e8..30ae7e97f 100644 --- a/pdr_backend/trader/main.py +++ b/pdr_backend/trader/main.py @@ -2,6 +2,7 @@ print( "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) + # pylint: disable=line-too-long print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) diff --git a/pdr_backend/trueval/main.py b/pdr_backend/trueval/main.py index feae428e8..30ae7e97f 100644 --- a/pdr_backend/trueval/main.py +++ b/pdr_backend/trueval/main.py @@ -2,6 +2,7 @@ print( "Error: 'main.py' has been removed as of version v0.2.0. Please use pdr cli instead." ) + # pylint: disable=line-too-long print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) From 465dd1b428bfa993d1e5407819e3c87fbf15444a Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Mon, 27 Nov 2023 13:43:12 +0300 Subject: [PATCH 5/6] Remove "switch back to version v0.1.1" --- pdr_backend/dfbuyer/main.py | 4 +--- pdr_backend/predictoor/main.py | 4 +--- pdr_backend/publisher/main.py | 4 +--- pdr_backend/trader/main.py | 4 +--- pdr_backend/trueval/main.py | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/pdr_backend/dfbuyer/main.py b/pdr_backend/dfbuyer/main.py index 30ae7e97f..9b01f2e8b 100644 --- a/pdr_backend/dfbuyer/main.py +++ b/pdr_backend/dfbuyer/main.py @@ -6,6 +6,4 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - print( - "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" - ) + diff --git a/pdr_backend/predictoor/main.py b/pdr_backend/predictoor/main.py index 30ae7e97f..9b01f2e8b 100644 --- a/pdr_backend/predictoor/main.py +++ b/pdr_backend/predictoor/main.py @@ -6,6 +6,4 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - print( - "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" - ) + diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index 53527153e..efc07a9ea 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -152,6 +152,4 @@ def publish_assets(web3_pp: Web3PP, publisher_ss: PublisherSS): print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - print( - "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" - ) + diff --git a/pdr_backend/trader/main.py b/pdr_backend/trader/main.py index 30ae7e97f..9b01f2e8b 100644 --- a/pdr_backend/trader/main.py +++ b/pdr_backend/trader/main.py @@ -6,6 +6,4 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - print( - "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" - ) + diff --git a/pdr_backend/trueval/main.py b/pdr_backend/trueval/main.py index 30ae7e97f..9b01f2e8b 100644 --- a/pdr_backend/trueval/main.py +++ b/pdr_backend/trueval/main.py @@ -6,6 +6,4 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - print( - "Swich back to version v0.1.1 if you'd like to keep using main.py and env vars" - ) + From 04edd60f8364a432f4b2d6d1179afdb8fdfb4b4a Mon Sep 17 00:00:00 2001 From: trizin <25263018+trizin@users.noreply.github.com> Date: Mon, 27 Nov 2023 10:45:23 +0000 Subject: [PATCH 6/6] Black --- pdr_backend/dfbuyer/main.py | 1 - pdr_backend/predictoor/main.py | 1 - pdr_backend/publisher/main.py | 1 - pdr_backend/trader/main.py | 1 - pdr_backend/trueval/main.py | 1 - 5 files changed, 5 deletions(-) diff --git a/pdr_backend/dfbuyer/main.py b/pdr_backend/dfbuyer/main.py index 9b01f2e8b..14055bfae 100644 --- a/pdr_backend/dfbuyer/main.py +++ b/pdr_backend/dfbuyer/main.py @@ -6,4 +6,3 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - diff --git a/pdr_backend/predictoor/main.py b/pdr_backend/predictoor/main.py index 9b01f2e8b..14055bfae 100644 --- a/pdr_backend/predictoor/main.py +++ b/pdr_backend/predictoor/main.py @@ -6,4 +6,3 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - diff --git a/pdr_backend/publisher/main.py b/pdr_backend/publisher/main.py index efc07a9ea..b9cca7052 100644 --- a/pdr_backend/publisher/main.py +++ b/pdr_backend/publisher/main.py @@ -152,4 +152,3 @@ def publish_assets(web3_pp: Web3PP, publisher_ss: PublisherSS): print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - diff --git a/pdr_backend/trader/main.py b/pdr_backend/trader/main.py index 9b01f2e8b..14055bfae 100644 --- a/pdr_backend/trader/main.py +++ b/pdr_backend/trader/main.py @@ -6,4 +6,3 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) - diff --git a/pdr_backend/trueval/main.py b/pdr_backend/trueval/main.py index 9b01f2e8b..14055bfae 100644 --- a/pdr_backend/trueval/main.py +++ b/pdr_backend/trueval/main.py @@ -6,4 +6,3 @@ print( "View the releases page to learn how to migrate: github.com/oceanprotocol/pdr-backend/releases" ) -