Skip to content

Commit

Permalink
Rio compat (jupyter-server#74)
Browse files Browse the repository at this point in the history
* add version file

* better version handling

* hahaha

* test

* cleanup
  • Loading branch information
Steve Silvester authored and GitHub Enterprise committed Aug 17, 2021
1 parent afee28e commit cd9c7fd
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for data_studio_jupyter_extensions

.PHONY: install build watch run-remote run-local test
.PHONY: install build watch run-remote run-local test version

install:
pip install -q -e ".[test]" --index-url https://pypi.apple.com/simple
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ You can invoke the pre-commit hook manually at any time with
```bash
pre-commit run
```

To upgrade the package version, run:

```bash
tbump --only-patch <version>
```
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ make install

if [[ $1 == "build" ]]; then
make test
tbump --only-patch --non-interactive 100.100.100
elif [[ $1 == "publish" ]]; then
python -m build
fi
2 changes: 1 addition & 1 deletion data_studio_jupyter_extensions/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1" # pragma: no cover
__version__ = "0.1.0" # pragma: no cover
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@ addopts = "--doctest-modules"
testpaths = [
"data_studio_jupyter_extensions/tests"
]

[tool.tbump.version]
current = "0.1.0"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
'''

[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"

[[tool.tbump.file]]
src = "data_studio_jupyter_extensions/_version.py"

[[tool.tbump.file]]
src = "version"
2 changes: 1 addition & 1 deletion rio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pipelines:
machine:
baseImage: docker.apple.com/rio/fuji-bdz:latest
env:
MY_VERSION: $(python setup.py --version)-#{}
MY_VERSION: $(cat version)-#{}
PYTHON_VERSION: python-3.8.7
build:
template: freestyle:v4:publish
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ test =
coverage
pytest-cov
pre-commit
check-manifest
build
jupyter_releaser


[flake8]
ignore = E, C, W, F401, F403, F811, F841, E402, I100, I101, D400
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0

0 comments on commit cd9c7fd

Please sign in to comment.