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

📝 Fix make_new_version_of to is_new_version_of #51

Merged
merged 2 commits into from
Aug 11, 2023
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
6 changes: 3 additions & 3 deletions docs/faq/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ file.save() # save the change to the database

## How do I version a file?

You use the `make_new_version_of` parameter:
You use the `is_new_version_of` parameter:

```
new_file = ln.File(df, make_new_version_of=old_file)
new_file = ln.File(df, is_new_version_of=old_file)
```

Then, `new_file` automatically has {attr}`~lamindb.File.version` set, incrementing the version number by one.

You can also pass a custom version:

```
new_file = ln.File(df, version="1.1", make_new_version_of=old_file)
new_file = ln.File(df, version="1.1", is_new_version_of=old_file)
```

It doesn't matter which old version of the file you use, any old version is good!
16 changes: 8 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ def pull_artifacts(session):
@nox.session
def docs(session):
session.run(*"pip install git+https://github.com/laminlabs/bionty".split())
# session.run(
# *"pip install --no-deps git+https://github.com/laminlabs/lnschema-bionty"
# .split()
# )
session.run(*"pip install lnschema_bionty==0.29.2".split())
# session.run(
# *"pip install --no-deps git+https://github.com/laminlabs/lnschema-core".split() # noqa
# )
session.run(
*"pip install --no-deps git+https://github.com/laminlabs/lnschema-bionty"
.split()
)
# session.run(*"pip install lnschema_bionty==0.29.2".split())
session.run(
*"pip install --no-deps git+https://github.com/laminlabs/lnschema-core".split() # noqa
)
session.run(*"pip install git+https://github.com/laminlabs/lamindb".split())
login_testuser1(session)
session.run(*"lamin init --storage ./docsbuild --schema bionty".split())
Expand Down
Loading