Skip to content

Commit

Permalink
Added default.ini to distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
d-stoll committed Sep 18, 2021
1 parent 9a7d191 commit 0c8848e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ to make a pull request.
## Configuration

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

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

Now change all configurations to git your own setup:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='stonkmaster',
version='1.0.1.dev',
version='1.0.1',
author='Daniel Stoll',
author_email='danielsimon.stoll2@gmail.com',
description='Simple bot to monitor stocks, options and cryptos.',
Expand Down
2 changes: 1 addition & 1 deletion stonkmaster/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def get_config(args: list[str]) -> configparser.ConfigParser:
parser = argparse.ArgumentParser()
parser.add_argument("--config", help="Path of configuration file.",
default=pkg_resources.resource_filename(__name__, "config/default.ini"))
default=pkg_resources.resource_filename(__name__.split(".")[0], "config/default.ini"))
args = parser.parse_args(args)

config = configparser.ConfigParser()
Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import discord.ext.test as dpytest
import pytest

from discord import Intents

from stonkmaster.core.bot import create_bot
Expand All @@ -13,7 +12,7 @@

@pytest.fixture
def config():
conf = get_config(["--config", "default.ini"])
conf = get_config([])
tmp_dir = tempfile.mkdtemp()
conf['stonkmaster']['TmpFolder'] = tmp_dir
return conf
Expand Down

0 comments on commit 0c8848e

Please sign in to comment.