Skip to content

Commit

Permalink
s/pycmdstan/cmdstanpy/g
Browse files Browse the repository at this point in the history
  • Loading branch information
maedoc committed Jan 10, 2019
1 parent 3f87dfb commit 41a8630
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Expand Up @@ -5,7 +5,7 @@ test:
image: $registry/$tag
script:
- ls
- pytest --cov=pycmdstan --cov-report=term --cov-report=html -n 2 pycmdstan/tests.py
- pytest --cov=cmdstanpy --cov-report=term --cov-report=html -n 2 cmdstanpy/tests.py
artifacts:
paths:
- htmlcov/
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -6,4 +6,4 @@ install:
- docker build -t cmdstanpy .

script:
- docker run --rm cmdstanpy pytest --cov=pycmdstan --cov-report=term --cov-report=html -n 10 pycmdstan/tests.py
- docker run --rm cmdstanpy pytest --cov=cmdstanpy --cov-report=term --cov-report=html -n 10 cmdstanpy/tests.py
8 changes: 3 additions & 5 deletions Dockerfile
Expand Up @@ -3,7 +3,6 @@ FROM python:3.6-stretch
ENV CSVER=2.17.1
ENV CMDSTAN=/opt/cmdstan-$CSVER
ENV CXX=clang++-3.9
ENV MPLBACKEND=agg
ENV PYTHONDONTWRITEBYTECODE=1

RUN apt-get update && apt-get install -y clang-3.9
Expand All @@ -17,7 +16,6 @@ RUN curl -OL https://github.com/stan-dev/cmdstan/releases/download/v$CSVER/cmdst
&& cd cmdstan-$CSVER \
&& make -j2 build examples/bernoulli/bernoulli

RUN mkdir -p /opt/pycmdstan
WORKDIR /opt/pycmdstan
RUN pip install scipy
ADD ./ /opt/pycmdstan/
RUN mkdir -p /opt/cmdstanpy
WORKDIR /opt/cmdstanpy
ADD ./ /opt/cmdstanpy/
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright 2019
Copyright 2019 Stan Dev Team

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions pycmdstan/io.py → cmdstanpy/io.py
Expand Up @@ -4,8 +4,11 @@
"""

import re
import logging
import numpy as np

logger = logging.getLogger('cmdstanpy.io')


def _rdump_array(key, val):
c = 'c(' + ', '.join(map(str, val.T.flat)) + ')'
Expand Down
4 changes: 2 additions & 2 deletions pycmdstan/model.py → cmdstanpy/model.py
Expand Up @@ -9,7 +9,7 @@
import numpy as np
from . import io

logger = logging.getLogger('pycmdstan.model')
logger = logging.getLogger('cmdstanpy.model')


class CmdStanNotFound(RuntimeError):
Expand Down Expand Up @@ -87,7 +87,7 @@ def model_path() -> str:
key = 'PYCMDSTAN_MODEL_PATH'
if key not in os.environ:
os.environ[key] = os.path.join(
os.path.expanduser('~'), '.cache', 'pycmdstan')
os.path.expanduser('~'), '.cache', 'cmdstanpy')
if not os.path.exists(os.environ[key]):
logger.debug(f'creating cache dir {os.environ[key]}')
try:
Expand Down
2 changes: 1 addition & 1 deletion pycmdstan/tests.py → cmdstanpy/tests.py
Expand Up @@ -97,7 +97,7 @@ def test_code_from_file(self):


class TestMetrics(BaseTestCase):
# cache model on test machine and cover code path for ~/.cache/pycmdstan/...
# cache model on test machine and cover code path for ~/.cache/cmdstanpy/...
use_tmp = False

model_code = '''
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -138,7 +138,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, 'pycmdstan', 'PyCmdStan Documentation', [author], 1)]
man_pages = [(master_doc, 'cmdstanpy', 'PyCmdStan Documentation', [author], 1)]

# -- Options for Texinfo output ----------------------------------------------

Expand Down
18 changes: 0 additions & 18 deletions pycmdstan/__main__.py

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -22,14 +22,14 @@ def readme_contents() -> str:
"""

setuptools.setup(
name='pycmdstan',
name='cmdstanpy',
version='0.9',
description='Python interface to CmdStan',
long_description=readme_contents(),
long_description_content_type="text/markdown",
author='Stan Dev Team',
url='https://github.com/stan-dev/cmdstanpy',
packages=['pycmdstan'],
packages=['cmdstanpy'],
install_requires='numpy filelock'.split(),
classifiers=_classifiers.strip().split('\n'),
)

0 comments on commit 41a8630

Please sign in to comment.