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

Dependency tracking requires save / inconsistent version display between header output and nbproject.__version__ #128

Open
sunnyosun opened this issue Jul 10, 2022 · 9 comments

Comments

@sunnyosun
Copy link
Member

sunnyosun commented Jul 10, 2022

See here:
Screen Shot 2022-07-10 at 15 48 54

@Koncopd
Copy link
Member

Koncopd commented Jul 10, 2022

Hi, thanks, this should be fixed on master.

@sunnyosun
Copy link
Member Author

I think the issue was because vscode doesn't immediately autosave the notebook.

If I run Header() twice it displays the new dependencies.

@sunnyosun sunnyosun reopened this Jul 10, 2022
@sunnyosun
Copy link
Member Author

@Koncopd I'm already using the latest version 0.1.6, but somehow the header still says 0.0.3... Is this a bug?

Screen Shot 2022-07-10 at 18 03 18

@falexwolf
Copy link
Member

The auto-inference of dependencies only works if the current notebook buffer is saved on disk.

Jupyter Lab automatically saves, hence there is no quirks. VS Code requires to hit save before re-running.

I think we have to spell this out in the tutorial or print a logging warning or something like this. 🤔 Otherwise, users will probably get confused.

@falexwolf falexwolf changed the title Dependency tracking doesn't update unless restarting the notebook Dependency tracking requires save / inconsistent version display between header output and nbproject.__version__ Jul 10, 2022
@falexwolf
Copy link
Member

@sunnyosun , I think that also Jupyter Lab doesn't auto-save. I needed to hit save before pandas is detected as a dependency also on Jupyter Lab.

image

I think that's OK to expect people to hit save. Let's just document it.

@sunnyosun
Copy link
Member Author

Looks like nbproject also didn't detect bionty version correctly. Did I do something wrong?

Screen Shot 2022-07-11 at 18 58 01

@Koncopd
Copy link
Member

Koncopd commented Jul 12, 2022

@sunnyosun and what do you have in conda list and pip freeze? I think this happens when you use develop install (for example flit install -s or pip install -e), it freezes the version then in the environment and doesn't update it when the package code changes. The version is updated only when you reinstall the package.

From my conda env
image
But from python it shows 0.2.0.

@sunnyosun
Copy link
Member Author

Hmm, I have 0.2.0 in both conda and pip, also I've tried to reinstall the package 🤔

@Koncopd
Copy link
Member

Koncopd commented Jul 12, 2022

Hm, interesting, i need to check with bionty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants