Skip to content

Commit

Permalink
Merge 6f6b78f into f18bf1b
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Jan 16, 2019
2 parents f18bf1b + 6f6b78f commit 5cb0035
Show file tree
Hide file tree
Showing 16 changed files with 599 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -61,7 +61,7 @@ matrix:
# Coverage test, pass the results to coveralls.
- os: linux
python: 3.5
env: MAIN_CMD='coverage' SETUP_CMD='run hpsspy/test/hpsspy_test_suite.py'
env: MAIN_CMD='coverage' SETUP_CMD='run setup.py test'

# PEP 8 compliance.
- os: linux
Expand Down
10 changes: 9 additions & 1 deletion doc/changes.rst
Expand Up @@ -2,10 +2,18 @@
Release Notes
=============

0.5.0 (unreleased)
------------------

*Python 2 support will be dropped starting with this release.*

0.4.1 (unreleased)
------------------

* No changes yet.
* Handle directory names that contain underscore characters; improve test
coverage (PR `#4`_).

.. _`#4`: https://github.com/weaverba137/hpsspy/pull/4

0.4.0 (2017-08-10)
------------------
Expand Down
15 changes: 9 additions & 6 deletions doc/configuration.rst
Expand Up @@ -158,12 +158,14 @@ imposes some additional requirements, conventions and idioms:
file, not the regular expression itself. This is because regular
expression *substition* is performed on the archive file name.
For example ``batch.tar`` means "archive a batch/ directory".
For longer file names, the "suffix" of the file will be used.
``data_d1_batch.tar`` also means "archive a batch/ directory", because
``data_d1_`` is stripped off.
For longer file names, any "prefix" of the file name will be stripped
off, and the "suffix" of the file will be used. For example,
``d1/data_d1_batch.tar`` also means "archive a batch/ directory", because
``data_d1_`` recognized as a prefix and stripped off. In particular,
this allows directory names to contain underscores.
- An archive filename that ends with ``_files.tar``, *e.g.* ``foo/bar_files.tar``
is a signal to :command:`missing_from_hpss` to construct
the archive file in a certain way, not by decending into a directory,
the archive file in a certain way, not by descending into a directory,
but by constructing an explicit list of files and building an archive
file out of that.

Expand All @@ -175,15 +177,16 @@ imposes some additional requirements, conventions and idioms:
``"foo/(bar|baz|flub)/.*$" : "foo/foo_\\1.tar"``. The name of the
directory matched in parentheses will be substituted into the file name.
- Archive arbitrary subdirectories of a *set* of subdirectories:
``"d1/foo/(ab|bc|cd|de|ef)/([^/]+)/.*$":"d1/foo/\\1/d1_foo_\\1_\\2.tar"``
``"d1/foo/(ab|bc|cd|de|ef)/([^/]+)/.*$" : "d1/foo/\\1/d1_foo_\\1_\\2.tar"``
- Match files in a directory, but not any files in any
subdirectory: ``"foo/[^/]+$" : "foo_files.tar"``. See also the
``_files.tar`` convention mentioned above.
- Group some but not all subdirectories in a directory into a single
archive file for efficiency: ``"foo/([0-9])([0-9][0-9])/.*$" : "foo/foo_\\1XX.tar"``.
Note the ending of the archive file, and that the directories have to
have a very uniform naming convention (three and only three digits
in this example).
in this example). Also, the placeholder ``X`` needs to be at the *end* of
the file name.
- Do not create an archive file, just copy the file, as is, to HPSS:
``"d1/README\\.txt$" : "d1/README.txt"``. Similarly, for a set of TXT files:
``"d1/([^/]+\\.txt)$" : "d1/\\1"``.
Expand Down
2 changes: 1 addition & 1 deletion hpsspy/os/__init__.py
Expand Up @@ -10,7 +10,7 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
#
from . import path
# from . import path
from ._os import *

import re
Expand Down
4 changes: 2 additions & 2 deletions hpsspy/os/_os.py
@@ -1,8 +1,8 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
hpsspy._os
~~~~~~~~~~
hpsspy.os._os
~~~~~~~~~~~~~
Contains the actual functions in :mod:`hpsspy.os`.
"""
Expand Down

0 comments on commit 5cb0035

Please sign in to comment.