Skip to content

Commit

Permalink
Move all config-related files to a "config" directory
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Jul 3, 2024
1 parent a3d6505 commit 031b078
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exclude docs/configuration_file.rst
include bin/*.py
include versioneer.py
include sourcespec2/_version.py
include sourcespec2/config_files/configspec.conf
include sourcespec2/config_files/ssp_event.yaml
include sourcespec2/config/configspec.conf
include sourcespec2/config/ssp_event.yaml
include sourcespec2/html_report_template/style.css
include sourcespec2/html_report_template/*.html
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@

setup(
name='sourcespec2',
packages=['sourcespec2', 'sourcespec2.configobj', 'sourcespec2.adjustText'],
packages=[
'sourcespec2', 'sourcespec2.config.configobj', 'sourcespec2.adjustText'
],
include_package_data=True,
entry_points={
'console_scripts': [
Expand Down
12 changes: 12 additions & 0 deletions sourcespec2/config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -*- coding: utf8 -*-
# SPDX-License-Identifier: CECILL-2.1
"""
Configuration classes and functions for SourceSpec
:copyright:
2013-2024 Claudio Satriano <[email protected]>
:license:
CeCILL Free Software License Agreement v2.1
(http://www.cecill.info/licences.en.html)
"""
from .config import Config # noqa
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions sourcespec2/ssp_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
from datetime import datetime
from collections import defaultdict
from . import __version__, __banner__
from .configobj import ConfigObj
from .configobj.validate import Validator
from .config.configobj import ConfigObj
from .config.configobj.validate import Validator
from .config import Config
from .ssp_update_db import update_db_file

Expand Down Expand Up @@ -266,7 +266,7 @@ def _read_config(config_file, configspec=None):

def _parse_configspec():
configspec_file = os.path.join(
os.path.dirname(__file__), 'config_files', 'configspec.conf')
os.path.dirname(__file__), 'config', 'configspec.conf')
return _read_config(configspec_file)


Expand Down Expand Up @@ -578,7 +578,7 @@ def _init_traceid_map(traceid_map_file):
def _write_sample_ssp_event_file():
ssp_event_file = 'ssp_event.yaml'
src_path = os.path.join(
os.path.dirname(__file__), 'config_files', 'ssp_event.yaml')
os.path.dirname(__file__), 'config', 'ssp_event.yaml')
dest_path = os.path.join('.', ssp_event_file)
write_file = True
if os.path.exists(dest_path):
Expand Down

0 comments on commit 031b078

Please sign in to comment.