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

Use poetry for dependency management #51

Merged
merged 27 commits into from
Apr 7, 2020
Merged

Use poetry for dependency management #51

merged 27 commits into from
Apr 7, 2020

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented Apr 6, 2020

Checklist:

poetry will replace pipenv in the autohooks project.
Allow to get the poetry settings easily by using a config class.
Use the version from pyproject.toml and poetry config.
We don't support python 2 and running setup.py with python 2 will fail
with an import error for `from pathlib import Path`
Use the poetry config from the pyproject.toml file to set most setting
in setup.py.

We are still using setup.py instead of poetry as a build-system (PEP 517)
because setup.py allows us to activate the git hooks as a post install
when beeing installed via a source distribution (.tar.gz file).
Drop pipenv usage from RELEASE.md.
Drop support for pipenv
Poetry seems to be very good at finding all packages even namespace
packages.
Using the pyproject.toml file for loading the version number doesn't
work because at runtime after installation the pyproject.toml file is
not part of the python package and therefore not available at all.
Update circleci config to use poetry instead of pipenv now.
Always create a new pypirc when running the deploy target of circleci.
tomlkit will allow to preserve the style and layout of the toml files.
Use the new internal safe_version function instead.
This is a slightly modified version from python-gvm.
When changing the version and uploading a new tag the version
information will be checked.
setuptools are required for installing autohooks at the moment.
This is a leftover from exchanging toml with tomlkit.
@codecov
Copy link

codecov bot commented Apr 6, 2020

Codecov Report

Merging #51 into master will increase coverage by 7.68%.
The diff coverage is 77.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   43.95%   51.63%   +7.68%     
==========================================
  Files          13       14       +1     
  Lines         571      732     +161     
==========================================
+ Hits          251      378     +127     
- Misses        320      354      +34     
Impacted Files Coverage Δ
autohooks/version.py 70.07% <69.84%> (+70.07%) ⬆️
autohooks/config.py 97.75% <96.07%> (-0.29%) ⬇️
autohooks/__version__.py 100.00% <100.00%> (ø)
autohooks/hooks.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5de2eb1...3297113. Read the comment docs.

When creating the environment poetry internally uses venv. It seems venv
always installs the pip and setuptools version provided with the python
version. In case of python 3.5. these versions are to old for autohooks.
We replaced pipenv with poetry.
@bjoernricks bjoernricks marked this pull request as ready for review April 6, 2020 14:03
@bjoernricks bjoernricks changed the title Poetry Use poetry for dependency management Apr 6, 2020
CHANGELOG.md Outdated Show resolved Hide resolved
Co-Authored-By: Michael Wiegand <wiegandm@users.noreply.github.com>
@bjoernricks bjoernricks merged commit 7c0e842 into greenbone:master Apr 7, 2020
@bjoernricks bjoernricks deleted the poetry branch April 7, 2020 06:13
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

Successfully merging this pull request may close these issues.

2 participants