Revisit interaction between `__revision__` and `INSTALLED`

Open
#2,704 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
build-system

Research direction

Start with frontend/catalyst/init.py lines 40–41, then trace revision in setup.py lines 36–52 and INSTALLED in Makefile lines 212–213. Determine whether wheels can have both values active and what purpose the interaction serves. Done means the relationship is resolved and the relevant initialization or build logic is clarified or revised.

Written by the indexing model from the issue text.

Description

housecleaning

I was looking at these lines in reference to the new bytecode resource file, and now I'm wondering if they serve any purpose? 😅
https://github.com/PennyLaneAI/catalyst/blob/a70847908d463406e4ebe10f9b4637e6716d50a1/frontend/catalyst/__init__.py#L40-L41

As in, is __revision__ always None when INSTALLED is True? If so what's the point? If not, under what circumstances is INSTALLED True and __revision__ non-None?


This is how __revision__ gets set:
https://github.com/PennyLaneAI/catalyst/blob/a70847908d463406e4ebe10f9b4637e6716d50a1/setup.py#L36-L52

Note that INSTALLED is only ever True for wheels:
https://github.com/PennyLaneAI/catalyst/blob/a70847908d463406e4ebe10f9b4637e6716d50a1/Makefile#L212-L213

Dominant language
Python
Stars
234
Forks
84
Avg merge
3d 11h
Merged PRs (30d)
78

Getting set up

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 PennyLaneAI/catalyst

All issues in PennyLaneAI/catalyst

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.