Comments (4)
Hello,
Great question, but alas I did not think that far ahead.
It's pretty easy to add new variables, you can see how I did it in the source code: https://github.com/addisonElliott/pyqt5ac/blob/master/pyqt5ac.py#L170-L172
PRs are welcome!
from pyqt5ac.
Hi Sara,
And would you like to override this variable through the command line in order to use the same config for different projects? Or why is it necessary to use a separate variable? Why not to just declare:
ioPaths:
-
- "my_project_name/gui/*.ui"
- "my_project_name/generated/%%FILENAME%%_ui.py"
or even this should work (I didn't try though):
ioPaths:
-
- "*/gui/*.ui"
- "%%DIRNAME%%/generated/%%FILENAME%%_ui.py"
But maybe I miss something.
from pyqt5ac.
What I am making at the moment is a template base PyQt5 application, so I expect the package name to be configurable to some degree. This said, my specific problem is in how I would like the *.qrc files to be compiled.
For example, I have this structure:
my_project/
`--- gui
|--- resources
| |--- image.png
| `--- resources.qrc <-- this one...
|--- interface.ui
`--- generated
|---interface_ui.py
`---resources_rc.py <--- ...becomes this
This would translate, I guess, into this config file:
ioPaths:
-
- "*/gui/*.ui"
- "%%DIRNAME%%/generated/%%FILENAME%%_ui.py"
-
- "*/resources/*.qrc"
- "%%DIRNAME%%/../generated/%%FILENAME%%_ui.py"
Which, to be honest, starts to look confusing with respect to
variables:
BASEDIR: `my_project`
ioPaths:
-
- "%%BASEDIR%%/gui/*.ui"
- "%%BASEDIR%%/gui/generated/%%FILENAME%%_ui.py"
-
- "%%BASEDIR%%/gui/resources/*.qrc"
- "%%BASEDIR%%/gui/generated/%%FILENAME%%_rc.py"
In addition, relative paths might cause trouble as, in most cases, the user wants the code generated from *ui files and *.qrc to fall in the same folder in order for the relative import to work.
Just my opinion. In addition, implementation seems trivial atm, I will send over a pull request soon.
from pyqt5ac.
@ZanSara thanks! PR was merged. I will add some finishing touches.
from pyqt5ac.
Related Issues (20)
- Set up auto publication to Pypi repository HOT 5
- Set up CI on GitLab
- Write functional tests
- Ensure eventually generated folders contain `__init__.py` files HOT 4
- More robust check for regeneration [WIP] HOT 2
- Update deprecated yaml loading
- Deprecate json usage
- Fail execution if file generation fails
- Set up webhook to GitLab mirror repository HOT 7
- Set up codeclimate integration HOT 3
- Introduce dependency scopes in setup.py HOT 3
- Tests seems to be not independent HOT 2
- Typing HOT 1
- Custom variables not supported from CLI HOT 3
- Introduce tests for CLI
- Auto-detect configuration files HOT 1
- Configurable logging levels
- Paths are not relative to the configuration file HOT 1
- "Bad file descriptor error" from 'click\_winconsole.py' HOT 3
- shlex.split hangs if rcc_options is defined by empty in YAML config
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 pyqt5ac.