Skip to content

Commit

Permalink
Test commit for checking [1]
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavoiu committed May 6, 2019
1 parent b29b41d commit c9806be
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: PostProcessing/doc/src/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: PostProcessing/doc/src/requirements.txt
- method: pip
path: PostProcessing
8 changes: 8 additions & 0 deletions PostProcessing/doc/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ class LumberjackOutputStructureLexer(RegexLexer):

lexers['lumberjack_output_structure'] = LumberjackOutputStructureLexer(startinline=True)

print("Sys paths:")
for p in sys.path:
print(" - {}".format(p))

print("Installed modules:")
for m in sys.modules:
print(" - {}".format(m))

from Karma.PostProcessing import Lumberjack, Palisade
# inject as top-level modules to avoid writing out full paths
sys.modules['Palisade'] = Palisade
Expand Down
1 change: 1 addition & 0 deletions PostProcessing/doc/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx_bootstrap_theme
15 changes: 11 additions & 4 deletions PostProcessing/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ def get_version():
'''try to determine version via git'''
try:
# is git available?
subprocess.call('git', stdout=subprocess.PIPE)
subprocess.call('git status', stdout=subprocess.PIPE)
except IOError:
# 'git' not available
version = "dev" # the short X.Y version.
version = "dev"
except subprocess.CalledProcessError:
# not a 'git' repo
version = "dev"
else:
# 'git' found -> get release from git

Expand All @@ -39,6 +42,7 @@ def get_requirements():
'mock',
'tqdm',
'pandas',
'PyYaml',
]

if six.PY2:
Expand Down Expand Up @@ -68,7 +72,7 @@ def ensure_standalone_package_path(final_symlink_path):
os.symlink(os.path.join(*(['..']*(len(_final_symlink_path_split)-1)+['python'])), final_symlink_path)

# create 'dummy' path with '__init__' files and symlink to '/python'
ensure_standalone_package_path('Karma/PostProcessing')
#ensure_standalone_package_path('Karma/PostProcessing')

__version__ = get_version()

Expand All @@ -79,7 +83,10 @@ def ensure_standalone_package_path(final_symlink_path):
author='Daniel Savoiu',
author_email='daniel.savoiu@cern.ch',
url='http://github.com/dsavoiu/Karma',
packages=find_packages(),
packages=['Karma.PostProcessing.{}'.format(_pkg) for _pkg in find_packages('python')],
package_dir = {
'Karma.PostProcessing': './python',
},
scripts=['scripts/lumberjack.py', 'scripts/palisade.py'],
keywords = "data analysis cms cern",
license='MIT',
Expand Down

0 comments on commit c9806be

Please sign in to comment.