Comments (7)
BTW, I used your issue as an excuse to bootstrap the version option documentation at: https://kdeldycke.github.io/click-extra/version.html
from click-extra.
I just realized that this is something that was more or less requested by @puzzlepeaches in #319. The difference with the later is that the --config
parameter is provided on the command line, so there is an alternative way to gather this raw, unprocessed value.
I guess this workaround was good enough in that case, but doesn't cut it for the --version
parameter.
All in all, there is an opportunity somewhere to have all processed parameters be available in the context.
from click-extra.
Another thing to consider is the way I keep the table format ID in the context. See: 9121c6f
from click-extra.
Good news @rasa, you can now fetch version's metadata from the context. Everything's explained in the documentation: https://kdeldycke.github.io/click-extra/version.html#get-metadata-values
It is part of the main
branch and will be available in the upcoming Click Extra v4.5.0 release.
from click-extra.
Click Extra 4.5.0 has just been released, and now expose all sorts of version-related metadata in the context: https://kdeldycke.github.io/click-extra/version.html#get-metadata-values
from click-extra.
As a reminder, the current version option in Click Extra is a full copy of Click's original code. But made into a class here, to allow its use with the declarative params=
argument. Which fixes Click #2324 issue.
So in its current capacity the version string is not exposed. It is detected or consumed right before exit the CLI execution flow, as you can see here:
click-extra/click_extra/version.py
Lines 124 to 125 in fa9b002
To have it support what you're looking for, we need to refactor the version code and enhance it. This is a feature request.
from click-extra.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from click-extra.
Related Issues (20)
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Remove runtime dependencies on sphinx and so on HOT 2
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Broken links HOT 1
- Yaml config not working HOT 2
- double @config_option on help HOT 3
- Broken links
- Broken links
- Broken links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from click-extra.