-
Notifications
You must be signed in to change notification settings - Fork 26
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
setup: speed up and clean improvements #699
setup: speed up and clean improvements #699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also try a pyenv shell
at the begining of ./scripts/setup.
@@ -73,3 +73,4 @@ python_version = "3.6" | |||
test = "python setup.py test" | |||
build_sphinx = "python setup.py build_sphinx" | |||
dev = "pytest --no-cov -vs tests" | |||
setup = "./scripts/setup" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PIPENV_QUIET=1 ./script/setup
instead or better include PIPENV_QUIET=1
in the ./scripts/setup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PIPENV_QUIET=1
have an impact on the pipenv command only if used outside the pipenv itself. So before the pipenv run setup
or before the script IF it includes pyenv shell
inside.
It is to avoid the Courtesy note (Cf. pypa/pipenv#3068). But our pipenv version have a bug on it.
Edit: I will test with pyenv shell
inside the scripts/setup
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jma: pyenv shell
seems to need more preparation before being usable for this.
❯ ./scripts/setup
pyenv: shell integration not enabled. Run `pyenv init' for instructions.
❯ pyenv init
# Load pyenv automatically by appending
# the following to ~/.zshrc:
eval "$(pyenv init -)"
It remains more comfortable to use the custom shortcut functionnality of pipenv:
- no more preparation for the developer
- a message explains to developer which command to use (if it forget to use
pipenv
command)
f6175cc
to
2b73e22
Compare
aa518ea
to
3d29ec9
Compare
3d29ec9
to
036a573
Compare
* Setup: * Cleans up DeprecationWarning from Python * Cleans up "There are .env of .flaskenv" warning messages * Adds new pipenv command: `setup`. Launch `pipenv run setup` * Deletes all `pipenv run` in scripts/setup file to avoid loading multiple times the same environment * Checks at setup if we are in a virtualenv (via pipenv) Co-Authored-by: Olivier DOSSMANN <[email protected]>
036a573
to
bb0a2f5
Compare
Why are you opening this PR?
pipenv run
), we need to reduce it to 1 load.For that I use this tip from Pipenv: https://pipenv.readthedocs.io/en/latest/advanced/#custom-script-shortcuts .
For Python I also use a "ignore DeprecationWarning" state.
How to test?
The setup should only display info messages, things about the setup.
Python DeprecationWarnings should have disappeared.
Code review check list