Skip to content

Commit

Permalink
Merge branch '1.0.x' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Jul 31, 2018
2 parents bef56c3 + 31f18e1 commit 3942480
Show file tree
Hide file tree
Showing 22 changed files with 171 additions and 132 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ Features:
* Configuration file contains the walltime taken by each run
* It is now possible to upload or download any file via its full path

1.0.14 (2018-07-30)
-------------------

(reprozip, reprounzip-qt and reprozip-jupyter only)

Bugfixes:
* Fixed reprounzip-qt refusing to close when an experiment is still unpacked, even after the user provided confirmation
* Fixed reprozip-jupyter on Python 3
* Fixed running gnome-terminal from reprounzip-qt, made it preferred over xterm
* Don't duplicate the latest run in the config file when the trace didn't add a run (for example because the command does not exist)

Enhancements:
* Uniformized logos and icons
* Native terminal opened by reprounzip-qt waits for a key after success before closing
* Officially support reprounzip-qt and reprozip-jupyter on Python 3

1.0.13 (2018-05-15)
-------------------

Expand Down
20 changes: 20 additions & 0 deletions CITATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
To reference ReproZip in publications, please cite the following:

ReproZip: Computational Reproducibility With Ease, F. Chirigati, R. Rampin, D. Shasha, and J. Freire. In Proceedings of the 2016 ACM SIGMOD International Conference on Management of Data (SIGMOD), pp. 2085-2088, 2016

BibTeX:

@inproceedings{ChirigatiRSF16,
title = {ReproZip: Computational Reproducibility With Ease},
author = {Chirigati, Fernando and Rampin, R{\'e}mi and Shasha, Dennis and Freire, Juliana},
year = {2016},
isbn = {978-1-4503-3531-7},
location = {San Francisco, California, USA},
doi = {10.1145/2882903.2899401},
booktitle = {Proceedings of the 2016 International Conference on Management of Data},
series = {SIGMOD '16},
pages = {2085--2088},
numpages = {4},
publisher = {ACM},
keywords = {computational reproducibility, provenance, reprozip},
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Remember that you can open the help message and learn more about other available
Citing ReproZip
---------------

Please use the following when citing ReproZip:
Please use the following when citing ReproZip ([BibTeX](CITATION.txt)):

ReproZip: Computational Reproducibility With Ease
F. Chirigati, R. Rampin, D. Shasha, and J. Freire.
Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Please feel free to contact us at users@reprozip.org if you encounter issues whi
:Diagnosis: ``ptrace`` is the mechanism that ReproZip uses to attach to another process and follow its system calls. Because it is so powerful, some security policies, environments or isolation mechanism may disable it.
:Solution:

* If you are using Docker, you can use the Docker option ``--security-opt seccomp:unconfined`` (or write your own seccomp profile that allows ptrace, by adding ``"ptrace"`` to the `default profile <https://github.com/moby/moby/blob/master/profiles/seccomp/default.json>`__); see `the Docker documentation on seccomp <https://docs.docker.com/engine/security/seccomp/>`__.
* If you are using Docker, you can use the Docker option ``--cap-add=SYS_PTRACE`` (or provide your own seccomp profile that allows ptrace, by adding ``"ptrace"`` to the `default profile <https://github.com/moby/moby/blob/master/profiles/seccomp/default.json>`__; see `the Docker documentation on seccomp <https://docs.docker.com/engine/security/seccomp/>`__).

------------

Expand Down
2 changes: 1 addition & 1 deletion reprounzip-qt/reprounzip_qt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.13'
__version__ = '1.0.14'
13 changes: 8 additions & 5 deletions reprounzip-qt/reprounzip_qt/reprounzip_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,14 @@ def run_in_system_terminal(cmd, env={},
('xterm', lambda a: ['-e', a])]:
if find_command(term) is not None:
args = arg_factory(cmd)
proc = subprocess.Popen([term] + args,
stdin=subprocess.PIPE)
proc.stdin.close()
if wait:
subprocess.check_call([term] + args,
stdin=subprocess.DEVNULL)
else:
subprocess.Popen([term] + args,
stdin=subprocess.DEVNULL)
retcode = proc.wait()
if retcode != 0:
raise subprocess.CalledProcessError(retcode,
[term] + args)

return None
return "Couldn't start a terminal", 'critical'
2 changes: 2 additions & 0 deletions reprounzip-qt/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
2 changes: 1 addition & 1 deletion reprounzip-qt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
with io.open('README.rst', encoding='utf-8') as fp:
description = fp.read()
setup(name='reprounzip-qt',
version='1.0.13',
version='1.0.14',
packages=['reprounzip_qt', 'reprounzip_qt.gui'],
package_data={'reprounzip_qt': ['icon.png']},
entry_points={
Expand Down
2 changes: 1 addition & 1 deletion reprozip-jupyter/reprozip_jupyter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Traces and packs notebook environments with ReproZip.
"""

__version__ = '0.4'
__version__ = '1.0.14'


def _jupyter_nbextension_paths():
Expand Down
2 changes: 2 additions & 0 deletions reprozip-jupyter/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
2 changes: 1 addition & 1 deletion reprozip-jupyter/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
with io.open('README.rst', encoding='utf-8') as fp:
description = fp.read()
setup(name='reprozip-jupyter',
version='0.4',
version='1.0.14',
packages=['reprozip_jupyter'],
package_data={'reprozip_jupyter': ['notebook-extension.js']},
entry_points={
Expand Down
7 changes: 4 additions & 3 deletions reprozip/reprozip/tracer/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,10 @@ def write_configuration(directory, sort_packages, find_inputs_outputs,
LIMIT 1
)
WHERE p.parent ISNULL
ORDER BY p.id DESC
LIMIT 1;
''')
ORDER BY p.id
LIMIT 2147483647 OFFSET ?;
''',
(len(runs),))
for (r_name, r_argv, r_envp, r_workingdir,
r_start, r_end, r_exitcode) in executions:
# Decodes command-line
Expand Down
4 changes: 3 additions & 1 deletion scripts/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bump versions in setup.py files, __init__.py files, docs/conf.py, installers
Create a signed tag for the version
git tag -s 1.0.11

Make sdists, gpg sigs, upload to PyPI using twine
Make sdists, wheels, gpg sigs, upload to PyPI using twine

Make binary Linux wheels using scripts/linux-wheels.sh

Expand All @@ -16,6 +16,8 @@ Create a release on GitHub, add the CHANGELOG to it, link to the attached files
Attach tarballs and wheels
Attach installers

Update conda-forge feedstocks

Build Windows installer using native Python installer & InnoDB

Build MacOS installer using Python built from source, App shim, Packages.app
Expand Down
160 changes: 81 additions & 79 deletions scripts/conda/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,85 +44,87 @@
else:
raise ValueError("Unknown platform")

bits = struct.calcsize('P') * 8

arch = '{0}-{1}'.format(osname, bits)

for python_ver in ('2.7', '3.4', '3.5', '3.6'):
for package_name in ('reprozip', 'reprounzip', 'reprounzip-docker',
def build_pkg(python_ver, package_name):
temp_dir = tempfile.mkdtemp(prefix='rr_conda_')

pkgdir = join(top_level, package_name)

try:
# Builds source distribution
subprocess.check_call(['python', 'setup.py', 'sdist',
'--dist-dir', temp_dir], cwd=pkgdir)

# Rename it
temp_file, = os.listdir(temp_dir)
shutil.move(join(temp_dir, temp_file),
join(temp_dir, '{0}.tar.gz'.format(package_name)))

# Copies conda recipe
shutil.copytree(join(top_level, 'scripts', 'conda', package_name),
join(temp_dir, package_name))

# Update recipe
with open(join(temp_dir, package_name, 'meta.yaml')) as fp:
lines = fp.readlines()
# Changes version in recipe
lines = [l.replace('_REPLACE_version_REPLACE_', version)
for l in lines]
with open(join(temp_dir, package_name, 'meta.yaml'), 'w') as fp:
for line in lines:
# Changes version
line = line.replace('_REPLACE_version_REPLACE_', version)
# Changes URL
if osname == 'win':
line = line.replace(
'_REPLACE_url_REPLACE_',
'file:///{0}/{1}.tar.gz'.format(
temp_dir.replace(os.sep, '/'),
package_name))
else:
line = line.replace(
'_REPLACE_url_REPLACE_',
'file://{0}/{1}.tar.gz'.format(temp_dir,
package_name))
fp.write(line)

# Builds Conda package
croot = join(temp_dir, 'croot')
os.mkdir(croot)
output_pkg = subprocess.check_output(['conda', 'build',
'--croot', croot,
'--python', python_ver,
'--output', package_name],
cwd=temp_dir).rstrip()
output_pkg = output_pkg.decode('ascii')
output_pkg = join(temp_dir, output_pkg)
subprocess.check_call(['conda', 'build',
'--croot', croot,
'--python', python_ver,
package_name],
cwd=temp_dir)

# Copies result out
shutil.copyfile(join(pkgdir, output_pkg),
join(dest_dir, os.path.basename(output_pkg)))
finally:
# Removes temporary directory
shutil.rmtree(temp_dir)
# Clears Conda cache
if os.path.exists(anaconda_cache):
shutil.rmtree(anaconda_cache)


if __name__ == '__main__':
for python_ver in ('2.7', '3.4', '3.5', '3.6', '3.7'):
for package_name in ('reprozip',):
if package_name == 'reprozip' and osname != 'linux':
continue

build_pkg(python_ver, package_name)

# noarch packages
for package_name in ('reprounzip', 'reprounzip-docker',
'reprounzip-vagrant', 'reprounzip-vistrails',
'reprozip-jupyter', 'reprounzip-qt'):
if package_name == 'reprozip' and osname != 'linux':
continue

temp_dir = tempfile.mkdtemp(prefix='rr_conda_')

pkgdir = join(top_level, package_name)

try:
# Builds source distribution
subprocess.check_call(['python', 'setup.py', 'sdist',
'--dist-dir', temp_dir], cwd=pkgdir)

# Rename it
temp_file, = os.listdir(temp_dir)
shutil.move(join(temp_dir, temp_file),
join(temp_dir, '{0}.tar.gz'.format(package_name)))

# Copies conda recipe
shutil.copytree(join(top_level, 'scripts', 'conda', package_name),
join(temp_dir, package_name))

# Update recipe
with open(join(temp_dir, package_name, 'meta.yaml')) as fp:
lines = fp.readlines()
# Changes version in recipe
lines = [l.replace('_REPLACE_version_REPLACE_', version)
for l in lines]
with open(join(temp_dir, package_name, 'meta.yaml'), 'w') as fp:
for line in lines:
# Changes version
line = line.replace('_REPLACE_version_REPLACE_', version)
# Changes URL
if osname == 'win':
line = line.replace(
'_REPLACE_url_REPLACE_',
'file:///{0}/{1}.tar.gz'.format(
temp_dir.replace(os.sep, '/'),
package_name))
else:
line = line.replace(
'_REPLACE_url_REPLACE_',
'file://{0}/{1}.tar.gz'.format(temp_dir,
package_name))
# Change build string
line = line.replace('_REPLACE_buildstr_REPLACE_',
'py{0}'.format(python_ver))

fp.write(line)

# Builds Conda package
croot = join(temp_dir, 'croot')
os.mkdir(croot)
output_pkg = subprocess.check_output(['conda', 'build',
'--croot', croot,
'--python', python_ver,
'--output', package_name],
cwd=temp_dir).rstrip()
output_pkg = output_pkg.decode('ascii')
output_pkg = join(temp_dir, output_pkg)
subprocess.check_call(['conda', 'build',
'--croot', croot,
'--python', python_ver,
package_name],
cwd=temp_dir)

# Copies result out
shutil.copyfile(join(pkgdir, output_pkg),
join(dest_dir, os.path.basename(output_pkg)))
finally:
# Removes temporary directory
shutil.rmtree(temp_dir)
# Clears Conda cache
if os.path.exists(anaconda_cache):
shutil.rmtree(anaconda_cache)
build_pkg('3.6', package_name)
9 changes: 4 additions & 5 deletions scripts/conda/reprounzip-docker/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source:
url: _REPLACE_url_REPLACE_

build:
#preserve_egg_dir: True
noarch: python
entry_points:
# Put any entry points (scripts to be generated automatically) here. The
# syntax is module:function. For example
Expand All @@ -19,14 +19,13 @@ build:
# If this is a new build for the same version, increment the build
# number. If you do not include this key, it defaults to 0.
# number: 1
string: _REPLACE_buildstr_REPLACE_

script: python setup.py install --single-version-externally-managed --record=record.txt
script: $PYTHON -m pip install --no-deps --ignore-installed .

requirements:
build:
host:
- python
- setuptools
- pip

run:
- python
Expand Down
10 changes: 4 additions & 6 deletions scripts/conda/reprounzip-qt/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source:
url: _REPLACE_url_REPLACE_

build:
#preserve_egg_dir: True
noarch: python
entry_points:
# Put any entry points (scripts to be generated automatically) here. The
# syntax is module:function. For example
Expand All @@ -21,18 +21,16 @@ build:
# If this is a new build for the same version, increment the build
# number. If you do not include this key, it defaults to 0.
# number: 1
string: _REPLACE_buildstr_REPLACE_

script: python setup.py install --single-version-externally-managed --record=record.txt
script: $PYTHON -m pip install --no-deps --ignore-installed .

requirements:
build:
host:
- python
- setuptools
- pip

run:
- python
- setuptools
- pyyaml
- pyqt <5
- reprounzip >=1.0
Expand Down

0 comments on commit 3942480

Please sign in to comment.