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

PyScript should include version information #546

Closed
3 tasks done
fpliger opened this issue Jun 23, 2022 · 3 comments · Fixed by #958
Closed
3 tasks done

PyScript should include version information #546

fpliger opened this issue Jun 23, 2022 · 3 comments · Fixed by #958
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release tag: tooling Related to the configuration of infrastructure and tooling type: feature New feature or request

Comments

@fpliger
Copy link
Contributor

fpliger commented Jun 23, 2022

Checklist

  • I added a descriptive title
  • I searched for other feature requests and couldn't find a duplicate (including also the type-feature tag)
  • I confirmed that it's not related to another project are area (see the above section)

What is the idea?

Each release of PyScript should include a version and make it printable on the console or have it available somewhere

Why is this needed

It's important for users to know what version they are in so they can know what's supported on that version and what not. It can also help with bug reporting, triaging, etc...

What should happen?

A user should be able to get that information on the console (we can decide if we want to have it by default or ask users to add a flag in , like debug: true.

Also, should be able to type __version__ or pyscript.__version__ in the REPL and be able to see the current version (or something similar)

Additional Context

No response

@fpliger fpliger added type: feature New feature or request tag: tooling Related to the configuration of infrastructure and tooling labels Jun 23, 2022
@JeffersGlass
Copy link
Member

Is anyone working on this? I'd be happy to give it a shot.

For access and format, I'd suggest the following, similar to both sys.version_info and what IPython does: :

pyscript.version_info() returns a namedtuple(year, month, day, releaselevel, serial)
pyscript.__version__ returns a string concatenated with '.', possibly just YYYY.MM.DD?

For example, for a tagged release of version 2023.02.1:

>>> pyscript.version_info()
version_info(year=2023, month=2, day=1, releaselevel='final', serial=0)
>>> pyscript.__version__
'2023.02.1`

I've been looking at ways to have these values automatically be set either on pre-release or release, so the tags don't have to be manually updated. The releaselevel parameter I imagine would be 'unstable' or 'alpha' in general, so the latest unstable builds can be identified at runtime if needed, and would be 'final' only for tagged releases.

@marimeireles
Copy link
Member

@JeffersGlass no one is working on this.
If you have the space, please go for it! ☺️

@marimeireles marimeireles added the backlog issue has been triaged but has not been earmarked for any upcoming release label Oct 4, 2022
@JeffersGlass
Copy link
Member

Working on it! The version-reporting part is done and fairly straightforward, the more complicated part is figuring out how it integrates with the build/CI/CD system so that the versioning is updated automatically in a consistent way.

I'll open a WIP PR with progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release tag: tooling Related to the configuration of infrastructure and tooling type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants