GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Missing documentation steps to start contributing · Issue #260 · unioslo/zabbix-cli

Missing documentation steps to start contributing #260

New issue
Copy link
New issue
Copy link
Open
Open
Missing documentation steps to start contributing#260
Copy link

Description

@fauust
fauust
opened on Nov 28, 2024
Issue body actions

Hi!
I am not very familiar with this python environment setup (and hatch), but I am missing some explanatory steps to start building the project and contributing.

Here is what I did since uv venv is not sufficient (or there is a magic step that I am missing):

- uv venv
+ uv venv
+ source .venv/bin/activate
+ uv pip install hatch
+ uv pip install -r pyproject.toml

Which is probably not accurate, should I open a PR based on that, let me know.

Activity

  1. pederhan commented on Nov 28, 2024

    @pederhan
    pederhan
    on Nov 28, 2024
    Member
    More actions

    Thanks for reporting this, I'll try to improve it. I am considering leaving out Hatch from the instructions, since we have now switched over to uv dependency groups for managing environments. We only use Hatch for building and versioning the project, which doesn't really involve the Hatch CLI at all.

    When it comes to venv management, I don't think it's necessary to do any manual venv creation or installation beyond:

    uv sync
    

    This requires uv >= 0.5.0, which supports PEP 735 dependency groups.

    With uv, you don't even need to activate the environment if. Running uv run pytest or uv run zabbix-cli will set up the environment and install dependencies automatically:

    $ uv run zabbix-cli
    Using CPython 3.12.7 interpreter at: /usr/bin/python3
    Creating virtual environment at: .venv
    Installed 88 packages in 247ms
    ╭───────────────────────────────────────────────────────╮
    │ Welcome to the Zabbix command-line interface (v3.4.0) │
    │ Connected to server https://<redacted> (v7.0.3)       │
    ╰───────────────────────────────────────────────────────╯
    Type --help to list commands, :h for REPL help, :q to exit.
    

    I will update the docs to reflect the changes made to environment management. They were written while we still relied on manual venv creation and installation from pyproject.toml dependencies.

    Reacted by T.J. Yang
  2. fauust commented on Nov 28, 2024

    @fauust
    fauust
    on Nov 28, 2024
    Author
    More actions

    Thanks @pederhan! I was not aware of that and I had to upgrade my uv version since the tool command was not available on my old version!

    uv sync is very nice and fast. I'll still try to continue sourcing venv (with direnv) though, it makes me feel a bit more confident and I am used to that changing prompt :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.