Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lunar/swh-deposit
  • anlambert/swh-deposit
  • swh/devel/swh-deposit
  • douardda/swh-deposit
  • ardumont/swh-deposit
  • marmoute/swh-deposit
  • rboyer/swh-deposit
7 results
Show changes
Commits on Source (70)
Showing with 35 additions and 932 deletions
*.pyc
*.sw?
*~
/.coverage
/.coverage.*
.eggs/
__pycache__
*.egg-info/
version.txt
build/
dist/
/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
.tox/
Copyright (C) 2015-2016 The Software Heritage developers
See http://www.softwareheritage.org/ for more information.
This diff is collapsed.
FLAKEFLAGS='--exclude=swh/deposit/manage.py,swh/deposit/settings.py,swh/deposit/migrations/'
MANAGE=python3 -m swh.deposit.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/deposit/manage.py test
Metadata-Version: 2.1
Name: swh.deposit
Version: 0.0.71
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
Project-URL: Source, https://forge.softwareheritage.org/source/swh-deposit
Project-URL: Bug Reports, https://forge.softwareheritage.org/maniphest
Project-URL: Funding, https://www.softwareheritage.org/donate
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, as well as a simple client to upload deposits on the server.
**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
Provides-Extra: server
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/
_build/
apidoc/
*-stamp
include ../../swh-docs/Makefile.sphinx
APIDOC_EXCLUDES += ../swh/*/settings/*