Moved hardcode to constants
This commit is contained in:
parent
b00a95cee5
commit
b966559ff0
2 changed files with 8 additions and 3 deletions
|
|
@ -1,5 +1,9 @@
|
|||
from types import SimpleNamespace
|
||||
|
||||
### Config
|
||||
|
||||
DEFAULT_DOTENV_FILEPATH = ".camisatoshi-wordpress-reports/.env"
|
||||
|
||||
### Order keys
|
||||
|
||||
order_keys = SimpleNamespace()
|
||||
|
|
@ -20,4 +24,5 @@ custom_meta_data_keys.sats_received = "sats_received"
|
|||
### Other
|
||||
|
||||
um_first_agreement_percentage = 0.5
|
||||
bbo_royalty_fee = 0.2
|
||||
bbo_royalty_fee = 0.2
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ from woocommerce import API
|
|||
|
||||
from camisatoshi_wordpress_reports.order import Order, Orders
|
||||
from camisatoshi_wordpress_reports.constants import (
|
||||
um_first_agreement_percentage,
|
||||
um_first_agreement_percentage, DEFAULT_DOTENV_FILEPATH,
|
||||
)
|
||||
|
||||
API_CONFIG = dotenv_values(
|
||||
dotenv_path=Path.home() / Path(".camisatoshi-wordpress-reports/.env")
|
||||
dotenv_path=Path.home() / Path(DEFAULT_DOTENV_FILEPATH)
|
||||
)
|
||||
WC_API = API(
|
||||
url=API_CONFIG["URL"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue