Python dependencies declaration in many places: package.xml, pyproject.toml, requirements.txt

Open
#393 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python
Domain
tooling

Research direction

Start by tracing AddonManager's handling of package.xml and requirements.txt, then inspect addon_catalog_cache.json generation. Review the cited pyproject.toml and metadata.txt usage across the indexed Addons. Done requires an agreed declaration and migration approach, including how existing FreeCAD-specific metadata is represented during the transition.

Written by the indexing model from the issue text.

Description

Currently AddonManager installs pip dependencies declared by Addons in the package.xml file, but there are also some Addons (7 in the current index) that uses requirements.txt, and modern Addons that uses pyproject.toml to declare them (few but increasing as it is the standard project metadata for python since PEP621 in 2020 )

  • Do we want to move to pyproject.toml ?
  • pyproject.toml can be used also for all the metadata included in package.xml , currently there is a lot of duplication.

There are also about 18 Addons in the current index that have a metadata.txt file with INI format. But AFAIK this not used at all in current AddonManager.

Migration from package.xml to pyproject.toml can be automated during addon_catalog_cache.json generation (Server side of AddonManager) during transition.

All of the FreeCAD specific sections present in package.xml can be expressed in pyproject.toml as it supports arbitrary sections under tools table.

Dominant language
Python
Stars
24
Forks
36
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FreeCAD/AddonManager

All issues in FreeCAD/AddonManager

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.