Skip to content

Commit

Permalink
Merge branch 'release/v1.8.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
MicBoucinha committed Feb 10, 2020
2 parents 1642838 + d34a040 commit 79ee1f6
Show file tree
Hide file tree
Showing 11 changed files with 134 additions and 102 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

Changelog
=========
v1.8.2 (2020/02/10)
-------------------
- pybpod-gui-plugin (v1.8.2)
- Changed 'Skip all trials' button to 'Stop'
- Changed 'Stop trial' button to 'Skip trial'
- pybpod-gui-plugin-emulator (v0.1.5)
- Update button names

v1.8.1 (2019/12/09)
-------------------
- pybpod-api (v1.8.1)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PyBpod #

**version:** 1.8.1
**version:** 1.8.2

PyBpod is a GUI application that enables interaction with the Bpod device from [Sanworks](https://sanworks.io/).

Expand Down
2 changes: 1 addition & 1 deletion base/pybpod-api
Submodule pybpod-api updated 56 files
+17 −0 .bumpversion.cfg
+59 −57 docs/source/conf.py
+28 −10 pybpodapi/__init__.py
+3 −6 pybpodapi/bpod/bpod_base.py
+1 −2 pybpodapi/bpod/bpod_com_protocol.py
+43 −23 pybpodapi/bpod/bpod_com_protocol_modules.py
+70 −63 pybpodapi/bpod/hardware/channels.py
+5 −5 pybpodapi/bpod/hardware/events/__init__.py
+19 −8 pybpodapi/bpod/hardware/events/base_eventname.py
+89 −89 pybpodapi/bpod/hardware/events/bpod0_7_5_fw9.py
+289 −289 pybpodapi/bpod/hardware/events/bpod0_7_9_fw13.py
+296 −297 pybpodapi/bpod/hardware/events/bpod0_7_9_fw20.py
+55 −32 pybpodapi/bpod/hardware/hardware.py
+4 −4 pybpodapi/bpod/hardware/input_channels/__init__.py
+16 −16 pybpodapi/bpod/hardware/input_channels/bpod0_7_5_fw9.py
+16 −16 pybpodapi/bpod/hardware/input_channels/bpod0_7_9_fw13.py
+5 −5 pybpodapi/bpod/hardware/output_channels/__init__.py
+24 −24 pybpodapi/bpod/hardware/output_channels/bpod0_7_5_fw9.py
+24 −24 pybpodapi/bpod/hardware/output_channels/bpod0_7_9_fw13.py
+20 −20 pybpodapi/bpod/hardware/output_channels/bpod0_7_9_fw20.py
+2 −4 pybpodapi/bpod/non_blockingsocketreceive.py
+2 −4 pybpodapi/bpod/non_blockingstreamreader.py
+19 −6 pybpodapi/bpod_modules/bpod_module.py
+28 −5 pybpodapi/bpod_modules/bpod_modules.py
+25 −22 pybpodapi/com/arcom.py
+6 −5 pybpodapi/com/messaging/base_message.py
+2 −1 pybpodapi/com/messaging/debug.py
+2 −1 pybpodapi/com/messaging/end_trial.py
+2 −1 pybpodapi/com/messaging/error.py
+9 −9 pybpodapi/com/messaging/event_occurrence.py
+10 −10 pybpodapi/com/messaging/event_resume.py
+6 −4 pybpodapi/com/messaging/parser.py
+5 −3 pybpodapi/com/messaging/session_info.py
+2 −1 pybpodapi/com/messaging/softcode_occurrence.py
+3 −5 pybpodapi/com/messaging/state_occurrence.py
+5 −7 pybpodapi/com/messaging/state_transition.py
+8 −5 pybpodapi/com/messaging/stderr.py
+2 −1 pybpodapi/com/messaging/stdout.py
+14 −9 pybpodapi/com/messaging/trial.py
+2 −1 pybpodapi/com/messaging/untagged_message.py
+6 −8 pybpodapi/com/messaging/value.py
+1 −1 pybpodapi/com/messaging/warning.py
+3 −3 pybpodapi/com/protocol/recv_msg_headers.py
+22 −22 pybpodapi/com/protocol/send_msg_headers.py
+0 −1 pybpodapi/com/stderr_buffer.py
+0 −1 pybpodapi/com/stdout_buffer.py
+0 −2 pybpodapi/exceptions/bpod_error.py
+60 −44 pybpodapi/session.py
+29 −32 pybpodapi/settings.py
+1 −2 pybpodapi/state_machine/conditions.py
+1 −2 pybpodapi/state_machine/global_counters.py
+1 −2 pybpodapi/state_machine/global_timers.py
+90 −41 pybpodapi/state_machine/state_machine_base.py
+99 −40 pybpodapi/state_machine/state_machine_builder.py
+5 −4 pybpodapi/utils/date_parser.py
+18 −17 setup.py
17 changes: 17 additions & 0 deletions base/pybpod/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[bumpversion]
current_version = 1.8.2
commit = False
tag = False

[bumpversion:file:setup.py]
search = current_version = "{current_version}"
replace = current_version = "{new_version}"

[bumpversion:file:../../docs/source/conf.py]
search = version = release = "{current_version}"
replace = version = release = "{new_version}"

[bumpversion:file:../../README.md]
search = **version:** {current_version}
replace = **version:** {new_version}

16 changes: 8 additions & 8 deletions base/pybpod/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import os
from setuptools import setup

current_version = "1.8.2"

with open(os.path.join("README.md"), "r") as fd:
long_description = fd.read()

setup(
name="pybpod",
version="1.8.1",
version=f"{current_version}",
description="Pybpod is a behavioral experiments control system written in Python for Bpod",
author=["Ricardo Ribeiro", "Luís Teixeira"],
author_email="ricardo.ribeiro@research.fchampalimaud.org, ricardojvr@gmail.com, micboucinha@gmail.com",
Expand All @@ -21,9 +23,9 @@
install_requires=[
"pyforms-gui==4.901.2",
"pyforms_generic_editor==1.5.1",
"pybpod-api==1.8.1",
"pybpod-gui-api==1.8.1",
"pybpod-gui-plugin==1.8.1",
f"pybpod-api=={current_version}",
f"pybpod-gui-api=={current_version}",
f"pybpod-gui-plugin=={current_version}",
"pge-plugin-terminal==0.1",
"pybpod-gui-plugin-session-history==1.4.2",
"pybpod-gui-plugin-stmdiagram==1.0.0",
Expand All @@ -32,9 +34,7 @@
"pybpod-gui-plugin-waveplayer==1.0",
"pybpod-gui-plugin-rotaryencoder==0.1.4",
"pybpod-gui-plugin-soundcard==0.1.6",
"pybpod-gui-plugin-emulator==0.1.4",
"pybpod-gui-plugin-emulator==0.1.5",
],
entry_points={
"console_scripts": ["start-pybpod=pybpodgui_plugin.__main__:start"],
},
entry_points={"console_scripts": ["start-pybpod=pybpodgui_plugin.__main__:start"]},
)
94 changes: 47 additions & 47 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

# -- Project information -----------------------------------------------------

project = 'PyBpod'
copyright = '2018, Ricardo Ribeiro'
author = 'Ricardo Ribeiro'
project = "PyBpod"
copyright = "2018-2020, Scientific Software Platform, Champalimaud Foundation"
author = "Scientific Software Platform, Champalimaud Foundation"

version = release = '1.8.1'
version = release = "1.8.2"


# -- General configuration ---------------------------------------------------
Expand All @@ -41,36 +41,36 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
#'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'sphinx.ext.graphviz',
'sphinx.ext.inheritance_diagram',
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
# 'sphinx.ext.intersphinx',
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinx.ext.viewcode",
"sphinx.ext.graphviz",
"sphinx.ext.inheritance_diagram",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
".md": "recommonmark.parser.CommonMarkParser",
}


# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -85,15 +85,15 @@
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'default'
pygments_style = "default"


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -104,7 +104,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static','_images']
html_static_path = ["_static", "_images"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -120,7 +120,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'PyBpoddoc'
htmlhelp_basename = "PyBpoddoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -129,15 +129,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -147,19 +144,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PyBpod.tex', 'PyBpod Documentation',
[author], 'manual'),
(master_doc, "PyBpod.tex", "PyBpod Documentation", [author], "manual"),
]


# -- Options for manual page output ------------------------------------------

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


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -168,9 +161,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PyBpod', 'PyBpod Documentation',
author, 'PyBpod', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"PyBpod",
"PyBpod Documentation",
author,
"PyBpod",
"One line description of project.",
"Miscellaneous",
),
]


Expand All @@ -192,28 +191,29 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None,
'python': ('https://docs.python.org/3.5', None),
'pybpodapi': ('https://pybpod-api.readthedocs.io', None),
'pybpodgui_api': ('https://pybpod-gui-api.readthedocs.io', None),
'pybpodgui_plugin': ('http://pybpod-gui-plugin.readthedocs.io', None),
'pyforms_gui' : ('https://pyforms-gui.readthedocs.io', None)
}
intersphinx_mapping = {
"https://docs.python.org/": None,
"python": ("https://docs.python.org/3.5", None),
"pybpodapi": ("https://pybpod-api.readthedocs.io", None),
"pybpodgui_api": ("https://pybpod-gui-api.readthedocs.io", None),
"pybpodgui_plugin": ("http://pybpod-gui-plugin.readthedocs.io", None),
"pyforms_gui": ("https://pyforms-gui.readthedocs.io", None),
}

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

graphviz_output_format = 'svg'
graphviz_output_format = "svg"

inheritance_graph_attrs = dict(rankdir="LR", size='"10.0, 12.0"', ratio='compressed')
inheritance_node_attrs = dict(fontsize=18, height=1.25, style='filled')
inheritance_graph_attrs = dict(rankdir="LR", size='"10.0, 12.0"', ratio="compressed")
inheritance_node_attrs = dict(fontsize=18, height=1.25, style="filled")
39 changes: 24 additions & 15 deletions utils/deploy-pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,57 @@ def version_compare(loc_version, rmt_version):
return v.parse(loc_version) > v.parse(rmt_version)


pypi = xmlrpc.client.ServerProxy('https://pypi.org')
pypi = xmlrpc.client.ServerProxy("https://pypi.org")

DIRECTORIES_TO_SEARCH_FORM = [
os.path.join('libraries'),
os.path.join('base'),
os.path.join('plugins'),
os.path.join("libraries"),
os.path.join("base"),
os.path.join("plugins"),
]

CURRENT_DIRECTORY = os.getcwd()

Popen(['pip', 'install', '--upgrade', 'setuptools', 'wheel', 'twine'])
Popen(["pip", "install", "--upgrade", "setuptools", "wheel", "twine"])

for search_dir in DIRECTORIES_TO_SEARCH_FORM:
for dir_name in os.listdir(search_dir):
dir_path = os.path.abspath(os.path.join(search_dir, dir_name))
if not os.path.isdir(dir_path):
continue

setup_filepath = os.path.join(dir_path, 'setup.py')
setup_filepath = os.path.join(dir_path, "setup.py")
if not os.path.isfile(setup_filepath):
continue

os.chdir(dir_path)

version = Popen(["python", setup_filepath, '--version'], stdout=PIPE).stdout.read()
version = Popen(
["python", setup_filepath, "--version"], stdout=PIPE
).stdout.read()
version = version.strip().decode()

package_name = Popen(["python", setup_filepath, '--name'], stdout=PIPE).stdout.read()
package_name = package_name.strip().decode().replace(' ', '-')
package_name = Popen(
["python", setup_filepath, "--name"], stdout=PIPE
).stdout.read()
package_name = package_name.strip().decode().replace(" ", "-")

remote_version = pypi.package_releases(package_name)

print(dir_name, version, remote_version)

if len(remote_version) == 0 or version_compare(version, remote_version[0]) is True:
print('----- UPLOADING TO PYPI -----', package_name)
if (
len(remote_version) == 0
or version_compare(version, remote_version[0]) is True
):
print("----- UPLOADING TO PYPI -----", package_name)

if os.path.isdir('./dist'):
shutil.rmtree('./dist')
if os.path.isdir("./dist"):
shutil.rmtree("./dist")

Popen(['python', 'setup.py', 'sdist', 'bdist_wheel'], stdout=PIPE).communicate()
Popen(['twine', 'upload', os.path.join('dist', '*')]).communicate()
Popen(
["python", "setup.py", "sdist", "bdist_wheel"], stdout=PIPE
).communicate()
Popen(["twine", "upload", os.path.join("dist", "*")]).communicate()

os.chdir(CURRENT_DIRECTORY)

Expand Down

0 comments on commit 79ee1f6

Please sign in to comment.