Skip to content

Commit 5ed41be

Browse files
Merge pull request #96 from djw8605/add-pypi
Add pypi support
2 parents 78aca4c + 966297c commit 5ed41be

7 files changed

Lines changed: 344 additions & 21 deletions

File tree

.gitignore

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
61+
# Flask stuff:
62+
instance/
63+
.webassets-cache
64+
65+
# Scrapy stuff:
66+
.scrapy
67+
68+
# Sphinx documentation
69+
docs/_build/
70+
71+
# PyBuilder
72+
target/
73+
74+
# Jupyter Notebook
75+
.ipynb_checkpoints
76+
77+
# IPython
78+
profile_default/
79+
ipython_config.py
80+
81+
# pyenv
82+
.python-version
83+
84+
# celery beat schedule file
85+
celerybeat-schedule
86+
87+
# SageMath parsed files
88+
*.sage.py
89+
90+
# Environments
91+
.env
92+
.venv
93+
env/
94+
venv/
95+
ENV/
96+
env.bak/
97+
venv.bak/
98+
99+
# Spyder project settings
100+
.spyderproject
101+
.spyproject
102+
103+
# Rope project settings
104+
.ropeproject
105+
106+
# mkdocs documentation
107+
/site
108+
109+
# mypy
110+
.mypy_cache/
111+
.dmypy.json
112+
dmypy.json
113+
114+
# Pyre type checker
115+
.pyre/

.travis.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,25 @@ before_script:
2929
- pip install markdown-include
3030

3131
services:
32-
- docker
32+
- docker
3333

3434
before_install:
35-
- sudo apt-get update
36-
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"' | sudo tee /etc/default/docker > /dev/null
37-
- sudo service docker restart
38-
- sleep 5
39-
- sudo docker pull centos:centos${OS_VERSION}
35+
- sudo apt-get update
36+
- echo 'DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock -s devicemapper"'
37+
| sudo tee /etc/default/docker > /dev/null
38+
- sudo service docker restart
39+
- sleep 5
40+
- sudo docker pull centos:centos${OS_VERSION}
4041

4142

4243
script:
43-
# Run tests in Container
44-
- if [ "$BUILD_TYPE" = "docs" ]; then bin/stashcp2/tests/build_docs.sh; fi
45-
- bin/stashcp2/tests/setup_tests.sh ${OS_VERSION}
44+
- if [ "$BUILD_TYPE" = "docs" ]; then bin/stashcp2/tests/build_docs.sh; fi
45+
- bin/stashcp2/tests/setup_tests.sh ${OS_VERSION}
46+
47+
deploy:
48+
provider: pypi
49+
user: "djw8605"
50+
password:
51+
secure: fRcpI2s8eM5VcHt7q3ROxiB69ATg8XewRBXSY2LvdxysVKc9rp38KJOAI2JtS+JYdmoY/BUeLUHmxwEmSywjtK2x7qYP7EImscyu0deIsNFx9z+2eyfkPlPEA7StE5isorpIzGTqINvptqk1zGycQM9OUhJqOjFfdLH3/dlQFFhbRnoqPZx/j+QHdVgLgVn72RHEc6leW6zHPGyrLJH8wmPpvzEHFRf0pdFb73vcONzboB1yFwmh6GrDa6+B/uHS3H9N7J6P3QMQjn6yV6Q3f5D/mV+v9AdAqHvKY0QLCIo6bDooq7eGq0dPgbooktIzN4tvsbOkG7eqCtPLxiVyBdFPPQb9PTRHinf/+zs3LylpYKElmu9whkvDaKz2GxKStctFsRr7ofC0vVIp5pjArPVKT4etLOwmzmMchTP/qUIhvFG3MwQOR7x80GpTTgkrv21z1/h3bFyk8zRaikQuZ6X3uIm3+FrG8fp6HVnR9jROYE9BV4UF2Mf+QZ2I7NqC9T0ASw9HslM4G/E0M97JODmNIAppquDAZRR+jPUUqwWHL3W65SAncoc2teNz8TLZLFvnPA01PK/ltpvssEL2lWIZrCshNyX1OJA24mMgs1aqB22PNPc7cvvGQGDvLaYweUZDMnyJiCevHicPOcqj9pWXAzHib+3GzPZ8dWa1d2g=
52+
on:
53+
tags: true

bin/stashcp2/tests/setup_tests.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ if [ "${BUILD_TYPE}" = "http" ]; then
1010
# Run the test without a container
1111
# Copy in the .job.ad file:
1212
cp bin/stashcp2/tests/job.ad ./.job.ad
13+
python setup.py install
1314

1415
# Test against a file that is known to not exist
1516
set +e
16-
bin/stashcp --cache=$XRD_CACHE /blah/does/not/exist ./
17+
stashcp --cache=$XRD_CACHE /blah/does/not/exist ./
1718
if [ $? -eq 0 ]; then
1819
echo "Failed to exit with non-zero exit status when it should have"
1920
exit 1
2021
fi
2122
set -e
2223

2324
# Try copying with different destintion filename
24-
bin/stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
25+
stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
2526

2627
result=`md5sum query.test | awk '{print $1;}'`
2728

@@ -32,7 +33,7 @@ if [ "${BUILD_TYPE}" = "http" ]; then
3233
rm -f query.test
3334

3435
# Perform tests
35-
bin/stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
36+
stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
3637

3738
result=`md5sum query1 | awk '{print $1;}'`
3839

bin/stashcp2/tests/test_inside_docker.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ cp /StashCache/bin/stashcp2/tests/job.ad ./.job.ad
4242

4343
# Test against a file that is known to not exist
4444
set +e
45-
/StashCache/bin/stashcp --cache=$XRD_CACHE /blah/does/not/exist ./
45+
/StashCache/stashcp.py --cache=$XRD_CACHE /blah/does/not/exist ./
4646
if [ $? -eq 0 ]; then
4747
echo "Failed to exit with non-zero exit status when it should have"
4848
exit 1
4949
fi
5050
set -e
5151

5252
# Try copying with no forward slash
53-
/StashCache/bin/stashcp --cache=$XRD_CACHE user/dweitzel/public/blast/queries/query1 ./
53+
/StashCache/stashcp.py --cache=$XRD_CACHE user/dweitzel/public/blast/queries/query1 ./
5454

5555
result=`md5sum query1 | awk '{print $1;}'`
5656

5757
rm query1
5858

5959
# Try copying with different destintion filename
60-
/StashCache/bin/stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
60+
/StashCache/stashcp.py --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 query.test
6161

6262
result=`md5sum query.test | awk '{print $1;}'`
6363

@@ -68,7 +68,7 @@ fi
6868
rm -f query.test
6969

7070
# Perform tests
71-
/StashCache/bin/stashcp --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
71+
/StashCache/stashcp.py --cache=$XRD_CACHE -d /user/dweitzel/public/blast/queries/query1 ./
7272

7373
result=`md5sum query1 | awk '{print $1;}'`
7474

@@ -78,7 +78,7 @@ fi
7878
rm -f query.test
7979

8080
# Perform methods test
81-
/StashCache/bin/stashcp --cache=$XRD_CACHE --method=cvmfs,xrootd -d /user/dweitzel/public/blast/queries/query1 ./
81+
/StashCache/stashcp.py --cache=$XRD_CACHE --method=cvmfs,xrootd -d /user/dweitzel/public/blast/queries/query1 ./
8282

8383
result=`md5sum query1 | awk '{print $1;}'`
8484

@@ -88,7 +88,7 @@ fi
8888
rm -f query.test
8989

9090
# Perform methods test
91-
/StashCache/bin/stashcp --cache=$XRD_CACHE --method=xrootd -d /user/dweitzel/public/blast/queries/query1 ./
91+
/StashCache/stashcp.py --cache=$XRD_CACHE --method=xrootd -d /user/dweitzel/public/blast/queries/query1 ./
9292

9393
result=`md5sum query1 | awk '{print $1;}'`
9494

@@ -98,7 +98,7 @@ fi
9898
rm -f query.test
9999

100100
# Perform methods test
101-
/StashCache/bin/stashcp --cache=$XRD_CACHE --method=http,xrootd -d /user/dweitzel/public/blast/queries/query1 ./
101+
/StashCache/stashcp.py --cache=$XRD_CACHE --method=http,xrootd -d /user/dweitzel/public/blast/queries/query1 ./
102102

103103
result=`md5sum query1 | awk '{print $1;}'`
104104

@@ -109,7 +109,7 @@ rm -f query.test
109109

110110

111111

112-
/StashCache/bin/stashcp --cache=$XRD_CACHE -d -r /user/dweitzel/public/blast/queries ./
112+
/StashCache/stashcp.py --cache=$XRD_CACHE -d -r /user/dweitzel/public/blast/queries ./
113113
ls -lah
114114

115115
rm -rf queries
File renamed without changes.

0 commit comments

Comments
 (0)