Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸 Init version at 1 and also stop auto-bumping version in CLI #277

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.10", "3.11"]

steps:
- name: Checkout main
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ nbproject.header() # Tracks notebook, displays metadata

# do things

nbproject.publish() # Checks consecutiveness, bumps version
nbproject.publish() # Checks consecutiveness & title, sets version & imported python packages
```

More: Read the [docs](https://lamin.ai/docs/nbproject).
3 changes: 1 addition & 2 deletions nbproject/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ def publish(files_dirs: Iterator[str]):
nb, add_pkgs, pin_versions=True
)

version = "0"
version = "1"
if "version" in nbproject_meta:
version = nbproject_meta["version"]
version = "1" if version == "0" else str(int(version) + 1)
nbproject_meta["version"] = version

write_notebook(nb, nb_path)
Expand Down
2 changes: 1 addition & 1 deletion nbproject/dev/_meta_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MetaContainer(BaseModel):

id: str
"""A universal 8-digit base62 ID."""
version: str = "0"
version: str = "1"
"""Published version of notebook."""
time_init: str
"""Time of nbproject init in UTC. Often coincides with notebook creation."""
Expand Down
Loading