Skip to content

Commit 86fd664

Browse files
authored
Fixes for rc2 (#157)
1 parent e2b1ab3 commit 86fd664

File tree

11 files changed

+31
-51
lines changed

11 files changed

+31
-51
lines changed

.github/workflows/build_workflow.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ jobs:
4747
4848
- name: Run Tests
4949
run: |
50-
cd tests
51-
python -m unittest
50+
python -m unittest tests/test_*.py
5251
5352
publish-docs:
5453
if: github.event_name == 'push'

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2727
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2828
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30-

NOTICE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ The views and opinions of authors expressed herein do not necessarily
1919
state or reflect those of the United States Government or Lawrence
2020
Livermore National Security, LLC, and shall not be used for advertising
2121
or product endorsement purposes.
22-

docs/source/dev_guide/release.rst

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ In this guide, we'll cover:
55

66
* Preparing The Code For Release
77
* Creating A Release On GitHub
8-
* Updating The sha256
98
* Releasing The Software On Anaconda
109
* Creating a New Version of the Documentation
1110

@@ -106,48 +105,6 @@ Remember to write a description.
106105

107106
3. Click "Publish release".
108107

109-
Updating The sha256
110-
--------------------
111-
112-
1. Download "Source code (.tar.gz)" from the `GitHub releases page <https://github.com/E3SM-Project/zstash/releases>`_.
113-
114-
2. Run ``shasum -a 256`` on this file. For example:
115-
116-
::
117-
118-
shasum -a 256 zstash-0.4.1.tar.gz
119-
120-
3. On your machine, pull the latest version of the code.
121-
This will have the ``conda/meta.yaml`` we edited in the first section.
122-
123-
::
124-
125-
git checkout master
126-
git pull <upstream-origin> master
127-
128-
Or:
129-
::
130-
131-
git fetch <upstream-origin> master
132-
git checkout -b <branch-name> <upstream-origin>/master
133-
134-
4. Change ``sha256`` in ``conda/meta.yaml`` to the result of step 2.
135-
136-
5. Commit and push your changes.
137-
138-
::
139-
140-
git commit -am 'Edit sha256 for v0.4.1'
141-
git push <upstream-origin> master
142-
143-
Or:
144-
145-
::
146-
147-
git commit -am 'Edit sha256 for v0.4.1'
148-
git push <fork-origin> <branch-name>
149-
# Create pull request for the master branch
150-
151108
Releasing The Software On Anaconda
152109
----------------------------------
153110

@@ -158,6 +115,9 @@ This triggers the CI/CD workflow that handles Anaconda releases.
158115

159116
3. Check the https://anaconda.org/e3sm/zstash page to view the newly updated package.
160117

118+
* Release candidates are assigned the ``e3sm_dev`` label
119+
* Production releases are assigned the ``main`` label
120+
161121
4. Notify the maintainers of the unified E3SM environment about the new release on the
162122
`E3SM Confluence site <https://acme-climate.atlassian.net/wiki/spaces/WORKFLOW/pages/129732419/E3SM+Unified+Anaconda+Environment>`_.
163123
Be sure to only update the ``zstash`` version number in the correct version(s) of

docs/source/usage.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ If running on Cori, it is preferable to run from ``$CSCRATCH`` rather than
1111
.. note::
1212
If you have not logged into HSI before, you will have to do so before running ``zstash`` with HPSS.
1313
On NERSC machines, just run ``hsi`` on the command line and enter your credentials.
14+
Note that ``hsi`` is only available on the log-in nodes, not the compute nodes.
1415

1516
.. warning::
1617
When specifying files, wildcards should be enclosed in double quotes (e.g., ``"a*"``).

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
author="Ryan Forsyth, Chris Golaz, Zeshawn Shaheen",
77
88
description="Long term HPSS archiving software for E3SM",
9-
packages=find_packages(exclude=["*.test", "*.test.*", "test.*", "test"]),
9+
packages=find_packages(include=["zstash", "zstash.*"]),
1010
entry_points={"console_scripts": ["zstash=zstash.main:main"]},
1111
)

tests/base.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Run the test suite with `pip install .. && python -m unittest`
2+
Run the test suite with `python -m unittest tests/test_*.py`
33
44
If running on Cori, it is preferable to run from $CSCRATCH rather than
55
/global/homes. Running from the latter may result in a
@@ -12,10 +12,14 @@
1212
import unittest
1313
from collections import Counter
1414

15+
# https://bugs.python.org/issue43743
16+
# error: Module has no attribute "_USE_CP_SENDFILE"
17+
shutil._USE_CP_SENDFILE = False # type: ignore
18+
1519
# The directory `zstash` is in. Set this if `zstash` is not in your PATH.
1620
ZSTASH_PATH = ""
1721

18-
# Top level directory. Should end in `zstash/tests`.
22+
# Top level directory. Should end in `zstash`.
1923
# This is used to ensure we are changing into the correct subdirectories and parent directories.
2024
TOP_LEVEL = os.getcwd()
2125

@@ -91,6 +95,7 @@ def setUp(self):
9195
"""
9296
Set up a test. This is run before every test method.
9397
"""
98+
os.chdir(TOP_LEVEL)
9499
self.hpss_path = None
95100
self.cache = "zstash"
96101
self.test_dir = "zstash_test"
@@ -103,6 +108,7 @@ def tearDown(self):
103108
104109
After the script has failed or completed, remove all created files, even those on the HPSS repo.
105110
"""
111+
os.chdir(TOP_LEVEL)
106112
print("Removing test files, both locally and at the HPSS repo")
107113
# self.cache may appear in any of these directories,
108114
# but should not appear at the same level as these.
@@ -137,7 +143,7 @@ def assertWorkspace(self):
137143
Assert that the code is being run from the correct directory.
138144
"""
139145
actual = os.getcwd()
140-
expected = "zstash/tests"
146+
expected = "zstash"
141147
if not actual.endswith(expected):
142148
self.stop(
143149
"Current_directory={} does not end in {}".format(actual, expected)

tests/test_check.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
write_file,
1515
)
1616

17+
# https://bugs.python.org/issue43743
18+
# error: Module has no attribute "_USE_CP_SENDFILE"
19+
shutil._USE_CP_SENDFILE = False # type: ignore
20+
1721

1822
class TestCheck(TestZstash):
1923
"""

tests/test_check_parallel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
run_cmd,
1313
)
1414

15+
# https://bugs.python.org/issue43743
16+
# error: Module has no attribute "_USE_CP_SENDFILE"
17+
shutil._USE_CP_SENDFILE = False # type: ignore
18+
1519

1620
class TestCheckParallel(TestZstash):
1721
"""

tests/test_extract.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
run_cmd,
1313
)
1414

15+
# https://bugs.python.org/issue43743
16+
# error: Module has no attribute "_USE_CP_SENDFILE"
17+
shutil._USE_CP_SENDFILE = False # type: ignore
18+
1519

1620
class TestExtract(TestZstash):
1721
"""

0 commit comments

Comments
 (0)