Skip to content
Snippets Groups Projects
Commit afcdc37b authored by Jenkins for Software Heritage's avatar Jenkins for Software Heritage
Browse files

New upstream version 0.0.65

parents 3b2c9018 3e26744a
No related branches found
Tags debian/upstream/0.0.65
No related merge requests found
Showing with 27 additions and 930 deletions
*.pyc
*.sw?
*~
.coverage
.eggs/
__pycache__
*.egg-info/
version.txt
/analysis.org
/swh/deposit/fixtures/private_data.yaml
/swh/deposit.json
/test.json
/swh/test
db.sqlite3
/.noseids
*.tgz
*.zip
*.tar.gz
*.tar.bz2
*.tar.lzma
Copyright (C) 2015-2016 The Software Heritage developers
See http://www.softwareheritage.org/ for more information.
This diff is collapsed.
FLAKEFLAGS='--exclude=swh/manage.py,swh/deposit/settings.py,swh/deposit/migrations/'
MANAGE=python3 -m swh.manage
db-drop:
dropdb swh-deposit-dev || return 0
db-create: db-drop
createdb swh-deposit-dev
db-prepare:
$(MANAGE) makemigrations
db-migrate:
$(MANAGE) migrate
db-load-data:
$(MANAGE) loaddata deposit_data
db-load-private-data: db-load-data
$(MANAGE) loaddata ../private_data.yaml
run-dev:
$(MANAGE) runserver
run:
gunicorn3 -b 127.0.0.1:5006 swh.deposit.wsgi
test:
./swh/manage.py test
Metadata-Version: 1.0
Metadata-Version: 2.1
Name: swh.deposit
Version: 0.0.63
Version: 0.0.65
Summary: Software Heritage Deposit Server
Home-page: https://forge.softwareheritage.org/source/swh-deposit/
Author: Software Heritage developers
Author-email: swh-devel@inria.fr
License: UNKNOWN
Description: UNKNOWN
Project-URL: Funding, https://www.softwareheritage.org/donate
Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
Project-URL: Source, https://forge.softwareheritage.org/source/swh-deposit
Description: # swh-deposit
This is [Software Heritage](https://www.softwareheritage.org)'s
[SWORD 2.0](http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html) Server
implementation.
**S.W.O.R.D** (**S**imple **W**eb-Service **O**ffering **R**epository
**D**eposit) is an interoperability standard for digital file deposit.
This implementation will permit interaction between a client (a
repository) and a server (SWH repository) to permit deposits of
software source code archives and associated metadata.
The documentation is at ./docs/README-specification.md
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Description-Content-Type: text/markdown
Provides-Extra: testing
DEPOSIT_ID=1
ARCHIVE=../../swh-deposit.zip
ARCHIVE2=../../swh-model.zip
STATUS=--no-partial
PARTIAL_STATUS=--partial
UPDATE_STATUS='done'
ATOM_ENTRY=../../atom-entry.xml
EXTERNAL_ID='external-id'
create-archives:
7z a $(ARCHIVE) $(FOLDER)
7z a $(ARCHIVE2) $(FOLDER2)
new:
./create_deposit.sh $(ARCHIVE) $(STATUS)
new-complete:
./create_deposit_with_metadata.sh $(ARCHIVE) $(ATOM_ENTRY) $(STATUS) $(EXTERNAL_ID)
new-partial:
make new STATUS=$(PARTIAL_STATUS) ARCHIVE=$(ARCHIVE)
update:
./update-deposit-with-another-archive.sh $(DEPOSIT_ID) $(ARCHIVE2) $(STATUS)
update-partial:
make update DEPOSIT_ID=$(DEPOSIT_ID) ARCHIVE2=$(ARCHIVE2) STATUS=$(PARTIAL_STATUS)
replace:
./replace-deposit-archive.sh $(ARCHIVE2) $(DEPOSIT_ID)
download:
./download-deposit-archive.sh $(DEPOSIT_ID)
status:
./status.sh $(DEPOSIT_ID)
service-document:
./service-document.sh
home:
./home.sh
update-status:
./update-status.sh $(DEPOSIT_ID) $(UPDATE_STATUS)
#!/usr/bin/env bash
. ./default-setup
DEPOSIT_ID=${1-1}
curl -i -u "${CREDS}" ${SERVER}/1/${COLLECTION}/${DEPOSIT_ID}/content/
#!/usr/bin/env bash
. ./default-setup
ARCHIVE=${1-'../../deposit.zip'}
STATUS=${2-'--no-partial'}
./swh-deposit \
--username ${USER} \
--password ${PASSWORD} \
--collection ${COLLECTION} \
--archive-deposit \
--archive ${ARCHIVE} \
${STATUS} \
--url ${SERVER}/1
#!/usr/bin/env bash
. ./default-setup
ATOM=${1-'../../atom.xml'}
PROGRESS=${2-'false'}
curl -i -u "$CREDS" \
--data-binary @${ATOM} \
-X POST \
-H "In-Progress: ${PROGRESS}" \
-H 'Content-Type: application/atom+xml;type=entry' \
-H 'Slug: external-id' \
-H 'Packaging: http://purl.org/net/sword/package/SimpleZip' \
${SERVER}/1/${COLLECTION}/
#!/usr/bin/env bash
. ./default-setup
ARCHIVE=${1-'../../swh-deposit.zip'}
ATOM_ENTRY=${2-'../../atom-entry.xml'}
STATUS=${3-'--no-partial'}
EXTERNAL_ID=${4-'external-id'}
./swh-deposit \
--username ${USER} \
--password ${PASSWORD} \
--collection ${COLLECTION} \
--archive-deposit \
--archive ${ARCHIVE} \
--metadata-deposit \
--metadata ${ATOM_ENTRY} \
--slug ${EXTERNAL_ID} \
${STATUS} \
--url ${SERVER}/1
SERVER=http://127.0.0.1:5006
USER='hal'
PASSWORD='hal'
COLLECTION=hal
CREDS="$USER:$PASSWORD"
#!/usr/bin/env bash
. ./default-setup
DEPOSIT_ID=${1-1}
curl ${SERVER}/1/${COLLECTION}/${DEPOSIT_ID}/raw/
#!/usr/bin/env bash
. ./default-setup
curl ${SERVER}
echo
#!/usr/bin/env bash
. ./default-setup
ARCHIVE=${1-'../../swh-model.zip'}
NAME=$(basename ${ARCHIVE})
MD5=$(md5sum ${ARCHIVE} | cut -f 1 -d' ')
DEPOSIT_ID=${2-1}
curl -i -u "$CREDS" \
-X PUT \
--data-binary @${ARCHIVE} \
-H "In-Progress: false" \
-H "Content-MD5: ${MD5}" \
-H "Content-Disposition: attachment; filename=${NAME}" \
-H 'Slug: external-id' \
-H 'Packaging: http://purl.org/net/sword/package/SimpleZip' \
-H 'Content-type: application/zip' \
${SERVER}/1/${COLLECTION}/${DEPOSIT_ID}/media/
#!/usr/bin/env bash
. ./default-setup
curl -i -u "${CREDS}" ${SERVER}/1/servicedocument/
#!/usr/bin/env bash
. ./default-setup
DEPOSIT_ID=${1-1}
./swh-deposit \
--username ${USER} \
--password ${PASSWORD} \
--collection ${COLLECTION} \
--status \
--deposit-id ${DEPOSIT_ID} \
--url ${SERVER}/1
#!/usr/bin/env bash
. ./default-setup
DEPOSIT_ID=${1-1}
ARCHIVE=${2-'../../swh-core.zip'}
NAME=$(basename ${ARCHIVE})
MD5=$(md5sum ${ARCHIVE} | cut -f 1 -d' ')
PROGRESS=${3-'false'}
curl -i -u "${CREDS}" \
-X POST \
--data-binary @${ARCHIVE} \
-H "In-Progress: ${PROGRESS}" \
-H "Content-MD5: ${MD5}" \
-H "Content-Disposition: attachment; filename=${NAME}" \
-H 'Slug: external-id-2' \
-H 'Packaging: http://purl.org/net/sword/package/SimpleZip' \
-H 'Content-type: application/zip' \
${SERVER}/1/${COLLECTION}/${DEPOSIT_ID}/media/
#!/usr/bin/env bash
. ./default-setup
DEPOSIT_ID=${1-1}
UPDATE_STATUS=${2-'done'}
curl -i \
-X PUT \
-H 'Content-Type: application/json' \
-d "{\"status\": \"${UPDATE_STATUS}\"}" \
${SERVER}/1/${COLLECTION}/${DEPOSIT_ID}/update/
swh-deposit (0.0.1-1) unstable; urgency=low
* Bootstrap version
-- Antoine R. Dumont (@ardumont) <antoine.romain.dumont@gmail.com> Mon, 22 May 2017 20:14:03 +0200
9
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment