Skip to content

Commit e7b06e3

Browse files
committed
bootstrap the bookstore package
1 parent f0689ce commit e7b06e3

15 files changed

+2747
-12
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bookstore/_version.py export-subst

.gitignore

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
local_settings.py
56+
57+
# Flask stuff:
58+
instance/
59+
.webassets-cache
60+
61+
# Scrapy stuff:
62+
.scrapy
63+
64+
# Sphinx documentation
65+
docs/_build/
66+
67+
# PyBuilder
68+
target/
69+
70+
# Jupyter Notebook
71+
.ipynb_checkpoints
72+
73+
# pyenv
74+
.python-version
75+
76+
# celery beat schedule file
77+
celerybeat-schedule
78+
79+
# SageMath parsed files
80+
*.sage.py
81+
82+
# dotenv
83+
.env
84+
85+
# virtualenv
86+
.venv
87+
venv/
88+
ENV/
89+
90+
# Spyder project settings
91+
.spyderproject
92+
.spyproject
93+
94+
# Rope project settings
95+
.ropeproject
96+
97+
# mkdocs documentation
98+
/site
99+
100+
# mypy
101+
.mypy_cache/
102+
103+
# pyCharm
104+
.idea
105+
106+
# pytest
107+
.pytest_cache
108+
109+
# Binder example
110+
binder/*run*.ipynb

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: python
2+
sudo: false
3+
python:
4+
- 3.5
5+
- 3.6
6+
install:
7+
- pip install setuptools pip --upgrade
8+
- pip install -e .[test]
9+
- pip install check-manifest flake8
10+

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2018, nteract
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
recursive-include bookstore *.py
2+
recursive-include bookstore *.ipynb
3+
recursive-include bookstore *.json
4+
recursive-include bookstore *.yaml
5+
recursive-include bookstore *.keep
6+
recursive-include bookstore *.txt
7+
8+
include setup.py
9+
include requirements.txt
10+
include requirements-dev.txt
11+
include README.rst
12+
include LICENSE
13+
include MANIFEST.in
14+
include *.md
15+
include *.toml
16+
17+
include versioneer.py
18+
include bookstore/_version.py
19+
include .coveragerc
20+
21+
# Documentation
22+
graft docs
23+
# exclude build files
24+
prune docs/_build
25+
# exclude sample notebooks for binder
26+
prune binder/
27+
# Scripts
28+
graft scripts

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Depot
1+
# bookstore
22

33
This repository provides tooling and workflow recommendations for storing, scheduling, and publishing notebooks.
44

@@ -38,29 +38,29 @@ Since most people are on a regular filesystem, we'll start with writing to the `
3838
## Configuration
3939

4040
```python
41-
from depot import DepotContentsArchiver
41+
from bookstore import bookstoreContentsArchiver
4242

4343
# jupyter config
4444
# At ~/.jupyter/jupyter_notebook_config.py for user installs
4545
# At __ for system installs
4646
c = get_config()
4747

48-
c.NotebookApp.contents_manager_class = DepotContentsArchiver
48+
c.NotebookApp.contents_manager_class = bookstoreContentsArchiver
4949

50-
c.Depot.workspace_prefix = "/workspace/kylek/notebooks"
51-
c.Depot.published_prefix = "/published/kylek/notebooks"
52-
c.Depot.scheduled_prefix = "/scheduled/kylek/notebooks"
50+
c.bookstore.workspace_prefix = "/workspace/kylek/notebooks"
51+
c.bookstore.published_prefix = "/published/kylek/notebooks"
52+
c.bookstore.scheduled_prefix = "/scheduled/kylek/notebooks"
5353

5454
# Optional, in case you're using a different contents manager
5555
# This defaults to notebook.services.contents.manager.ContentsManager
56-
# c.Depot.Archiver.underlying_contents_manager_class = ADifferentContentsManager
56+
# c.bookstore.Archiver.underlying_contents_manager_class = ADifferentContentsManager
5757

58-
c.Depot.Backend = "s3"
59-
c.Depot.S3.bucket = "<bucket-name>"
58+
c.bookstore.Backend = "s3"
59+
c.bookstore.S3.bucket = "<bucket-name>"
6060

61-
# Note: if Depot is used from an EC2 instance with the right IAM role, you don't
61+
# Note: if bookstore is used from an EC2 instance with the right IAM role, you don't
6262
# have to specify these
63-
c.Depot.S3.access_key_id = <AWS Access Key ID / IAM Access Key ID>
64-
c.Depot.S3.secret_access_key = <AWS Secret Access Key / IAM Secret Access Key>
63+
c.bookstore.S3.access_key_id = <AWS Access Key ID / IAM Access Key ID>
64+
c.bookstore.S3.secret_access_key = <AWS Secret Access Key / IAM Secret Access Key>
6565
```
6666

RELEASING.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Releasing
2+
3+
First check that the CHANGELOG is up to date for the next release version
4+
5+
```
6+
git tag 2.0.0
7+
git push && git push --tags
8+
rm -rf dist/*
9+
python setup.py sdist bdist_wheel
10+
twine upload dist/*
11+
```

bookstore/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
from ._version import get_versions
3+
__version__ = get_versions()['version']
4+
del get_versions

0 commit comments

Comments
 (0)