optiver / vulcan-py Goto Github PK
View Code? Open in Web Editor NEWVulcan is a source code dependency manager for Python
License: Apache License 2.0
Vulcan is a source code dependency manager for Python
License: Apache License 2.0
i.e. if you have
[tool.vulcan]
plugins=["foobar"]
but not
[tool.vulcan.plugin.foobar]
That should be an error.
steps to reproduce:
pyproject.toml:
[project]
name = "python3-experimental"
description = "build-system.requires list is not installed in the venv when calling vulcan lock"
requires-python = ">=3.6"
[build-system]
requires = [ "vulcan-py~=1.0", "setuptools<58", "Cython==0.27.3" ]
build-backend = "vulcan.build_backend"
[tool.vulcan]
pacakges = []
no-lock = true
[tool.vulcan.dependencies]
quadprog = "==0.1.6"
python3.6 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
vulcan lock
vulcan lock will complain whereas
python -m pip install Cython==0.27.3
python -m pip install quadprog==0.1.6
will successfully install it
It would be good to have a place for release notes so we can read about what has changed between releases
Do instead https://pypi.org/project/pipx-in-pipx/ ๐ (I'm pipx maintainer)
These should be injected into the dependencies (not locked) when vulcan develop
is run. This is intended to be used for dependencies like pytest
or flake8
or mypy
.
lowercase here https://github.com/optiver/vulcan-py#tox-and-vulcan ๐
In principle, there is no reason the pip installs can't be run at the same time (there is no dependency between them until the end where they are joined together). This could dramatically shorten the lock for any build with 1 or more extras.
With the minimal pyproject.toml
listed in the README.md, vulcan errors with the following:
$ vulcan add textual
Traceback (most recent call last):
File "/home/dan/.local/bin/vulcan", line 8, in <module>
sys.exit(main())
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1654, in invoke
super().invoke(ctx)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/vulcan/cli.py", line 54, in main
ctx.obj = Vulcan.from_source(Path().absolute(), fail_on_missing_lock=False)
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/vulcan/__init__.py", line 75, in from_source
config = all_config['tool']['vulcan'] # type: ignore[index]
File "/home/dan/.local/pipx/venvs/vulcan-py/lib/python3.10/site-packages/tomlkit/container.py", line 650, in __getitem__
raise NonExistentKey(key)
tomlkit.exceptions.NonExistentKey: 'Key "tool" does not exist.'
I think the appropriate solution is to not require an empty [tool.vulcan]
section as apposed to adding the blank section to the configuration.
On a side note, "dependencies" should probably be added to the dynamic array
Expected behavior: Lock with the current python version (respecting python_requires etc) if in a virtualenv.
Actual behavior: Locks with vulcan's python version.
Temporary workaround: Set python-lock-with
in [tool.vulcan] section in pyproject.toml
Possible (though not super nice) resolution: make python-lock-with mandatory when no-lock is not true. Not a fan of this but it would be explicit.
e.x.
../../../.virtualenvs/myvirtualenv/lib/python3.6/site-packages/_pytest/config/__init__.py:1114
/home/thirdegree/.virtualenvs/myvirtualenv/lib/python3.6/site-packages/_pytest/config/__init__.py:1114: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: _mylib
self._mark_plugins_for_rewrite(hook)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
----------- coverage: platform linux, python 3.6.5-final-0 -----------
This can be fixed if the contents of the .pth file generated by the editables library (import _mylib) is replaced by:
# workspace root
/absolute/path/to/project/root
But then the behavior of the editable install might be different... Need to investigate further. Also not sure if this is an issue worth fixing in the first place. In the meantime this serves as documentation.
When changing the dependencies in pyproject.toml, vulcan should offer a way to verify that the lockfile is regenerated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.