Summary: | Add some units from the petroleum industry | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kunitconversion | Reporter: | ishovkun <igshov> |
Component: | general | Assignee: | John Layt <jlayt> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | joaonetto901, kde, kdelibs-bugs, nate |
Priority: | NOR | Keywords: | junior-jobs |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kunitconversion/b2419e57eeea5cd98b3bfb42c3032b421633bf39 | Version Fixed In: | 5.53 |
Sentry Crash Report: |
Description
ishovkun
2017-12-20 14:46:12 UTC
I would like to work on this feature, it seems simple to implement. I'm completely new to the community, could I get some help? Hi, João, you might want to check out our Getting Started guide [1], you can browse the relevant source code files in [2], they are split into categories like units of volume, temperature, power, etc. Patches you can upload to [3], enjoy and welcome aboard! ;) [1] https://community.kde.org/Get_Involved [2] https://cgit.kde.org/kunitconversion.git/tree/src [3] http://phabricator.kde.org/ Hi João! As it happens, my very first patch was for this repo, and Kai helped me (Bug 379171)! I can help you. First, set up your development environment per https://community.kde.org/Get_Involved/development#Set_up_your_development_environment (or https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source if you are already somewhat familiar with source control and software development workflows). Check out https://cgit.kde.org/kunitconversion.git and try to compile it. The proposed oil barrel unit would make sense to do in volume.cpp. For Darcies and Milidarcies, we don't have a permeability-related category, so perhaps you could create permeability.h and permeability.cpp, following the pattern of the other ones. Don't hesitate to reach out if you get stuck or need a hand! First of all, thanks for all the support. It really helped me feel more comfortable here. Finally, I managed to get my development enviroment running, and could compile kunitconversion. Still, I have a question, can I run it apart of Krunner or do I have to compile the entire Krunner? Thanks in advance Since it's a shared library, all you have to do is install your compiled version and KRunner will pick it up after being killed and restarted. You have two options: 1. Install it to /usr and overwrite the system version of the kunitconversion shared library. If you do this, you'll probably want to reinstall the distro-provided version after you're done testing. 2. Install it to a different location and adjust some things to make KRunner preferentially find your custom-compiled version. If you opt to do this. Probably Kai can be of more assistance than I can. I finally managed to compile and execute Krunner. I'll start working on the feature. I implemented the first part of the request on, added the OilBarrel unit. The second part of the project brings some questions, the SI unit for permeability is SquareMeters, which is a Area type of unit. I implemented pemearbility.h and pemearbility.cpp based on the patterns of the other files. I declared Darcy and Mili-Darcys as units (Since Da are already used by eletric voltage, I called it Darcy) and they can convert to each other. My questions now are: Is there a way to establish a connection between Darcy and SquareMeters? After I implemented permeability.cpp, I added it to CMakeLists.txt, but I can't test my changes, how can I link it to the rest of the library? Sorry for the double post. This is what I got so far: https://drive.google.com/file/d/1MP2_9n7TGBWeE_ubCKitsNQPubKA8ijZ/view?usp=sharing Git commit b2419e57eeea5cd98b3bfb42c3032b421633bf39 by Nate Graham, on behalf of João Netto. Committed on 06/11/2018 at 21:11. Pushed by ngraham into branch 'master'. Updated with petroleum industry units Summary: Added a new volume unity Oil Barrels and a new permeability class that handles Darcy and MiliDarcys. FIXED-IN: 5.53 Reviewers: ngraham, broulik, #frameworks Reviewed By: ngraham Subscribers: ngraham, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D16684 M +1 -0 README.md M +1 -0 src/CMakeLists.txt M +2 -0 src/converter.cpp A +63 -0 src/permeability.cpp [License: LGPL (v2+)] A +36 -0 src/permeability_p.h [License: LGPL (v2+)] M +13 -2 src/unit.h M +10 -0 src/volume.cpp https://commits.kde.org/kunitconversion/b2419e57eeea5cd98b3bfb42c3032b421633bf39 |