Comments (5)
you changed the API, thus removing the methods and only preserving the class attributes. It would be nice if you changed it back so we could stay consistent
from rpg.
Sorry for that, I thought we agreed about it at meeting. What changed later was removal of mark_doc
and mark_docdir
- this helpers will be useful so I will put them back. add_tag
is no longer useful since there is the same attribute. Having files as list of tuples can represent all the files while tagging them as %doc, %dir, %docdir, %config and setting permission attributes. What exactly you want back and why? In this phase we have to design convenient API - Spec class will be accessed through plugins. Plugin should be able to remove/change/add files and other Spec attributes.
from rpg.
One more thing I'd like to change is to make tags
dict[key -> set(vals)] instead of list so we can be sure that Requires
and BuildRequires
will occur only once without any checking.
from rpg.
I follow your thoughts, I understand, that getters and setters are obsolete in python, but in terms of designing a convenient API, we have to think about things to be a little bit foolproof, to be specific, nobody can guarantee that if somebody inserts a tag into the dictionary they'll follow the correct syntax, e.g. 'Requires' cannot be used as 'requires' or REQUIRES, same for the syntax of script directives => this is why I think it could be much more convenient to have methods like add_tag, add_script/remove_XYZ, because the user would just call a method and the method would take care of everything necessary, otherwise the user/plugin developer would be completely responsible for how they access our attributes and what they use them for...
nevertheless, if you insist on dropping all the methods, there really is nothing for me to code if we provide no methods, don't you think???
from rpg.
It's not the more code, the better. We have to think about maintainability at first. It's hard to read code with a lot of generic crap (like Java get/setters). Some use case could be to iterate over Requires
elements. Do you wanna create another iterating method for each tag?
When you write method with wrongly mixed lower and upper case letters you also don't get desired result. Somewhere still has to be static list of all allowed tags to avoid writing bullshit to Spec file (with ignore case checking or not). Plugin programmer will know what to use from documentation.
We can also revert changes more backward where common tags were represented by attributes. Do it as you want but keep it clean/simple with no generic stuff, please. These one liner methods could be added anytime in emergency case. BTW there will always be work, you can take another issue from Alpha version milestone when you're done.
from rpg.
Related Issues (20)
- ModuleFinder error HOT 1
- Replace Makedepend HOT 1
- %files should contain macroed paths HOT 2
- QT Plugin (qmake)
- implement npm plugin
- implement Ruby plugin
- CI: build sprm rpg package inside docker
- when runnign log tasks, show the action to the user + wheel
- bash completion doesn't work from installed rpg package
- fix fedora review build issues HOT 1
- investigate whether Feaders could be heplful for RPG HOT 1
- core dumped after clicking on "build" button HOT 2
- in build page: distro and architecture rolldowns are overlapped HOT 2
- RFE: possibility to change window size HOT 1
- c plugin (and any other compiled lang) plugin should uncheck BuildArch: noarch option
- use reactive programming for "mock init" and dnf loading HOT 1
- build fails randomly HOT 1
- Some macros missing in mock HOT 3
- Improve setuptools test for better coverage
- Hawkey build segfault HOT 1
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 rpg.