Skip to content

Commit 0c8848e

Browse files
committed
Added default.ini to distribution
1 parent 9a7d191 commit 0c8848e

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ to make a pull request.
102102
## Configuration
103103

104104
You can create your own configuration file to customize emotes and texts. First copy the default configuration
105-
from `default.ini`
105+
from `config/default.ini` into a custom configuration file:
106106

107107
```{bash}
108-
cp default.ini custom.ini
108+
wget -O custom.ini https://raw.githubusercontent.com/d-stoll/stonkmaster/master/stonkmaster/config/default.ini
109109
```
110110

111111
Now change all configurations to git your own setup:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name='stonkmaster',
10-
version='1.0.1.dev',
10+
version='1.0.1',
1111
author='Daniel Stoll',
1212
author_email='danielsimon.stoll2@gmail.com',
1313
description='Simple bot to monitor stocks, options and cryptos.',

stonkmaster/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
def get_config(args: list[str]) -> configparser.ConfigParser:
88
parser = argparse.ArgumentParser()
99
parser.add_argument("--config", help="Path of configuration file.",
10-
default=pkg_resources.resource_filename(__name__, "config/default.ini"))
10+
default=pkg_resources.resource_filename(__name__.split(".")[0], "config/default.ini"))
1111
args = parser.parse_args(args)
1212

1313
config = configparser.ConfigParser()

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import discord.ext.test as dpytest
55
import pytest
6-
76
from discord import Intents
87

98
from stonkmaster.core.bot import create_bot
@@ -13,7 +12,7 @@
1312

1413
@pytest.fixture
1514
def config():
16-
conf = get_config(["--config", "default.ini"])
15+
conf = get_config([])
1716
tmp_dir = tempfile.mkdtemp()
1817
conf['stonkmaster']['TmpFolder'] = tmp_dir
1918
return conf

0 commit comments

Comments
 (0)