The following packages are required in order to do development for edamame
. Most of these packages are available in most distributions of Linux and many come pre-installed in some distros.
python3
gir1.2-gtk-3.0
p7zip-full
python3-parted
python3-gnupg
python3-dnspython
python3-dev
libpython3-dev
The following are not required but may help out
arch-install-scripts
coreutils
squashfs-tools
pylint
To install all of the dependencies at once, use
sudo apt install -y python3 gir1.2-gtk-3.0 p7zip-full python3-parted python3-dev python3-gnupg arch-install-scripts coreutils squashfs-tools pylint libpython3-dev
Do you know some programming and want to help out, but haven't worked on someone else's codebase before? This section is here for you. These are some recommended steps on how to contribute without diving into specifics.
- Create a Github account (if necessary)
- It is strongly recommended to protect your GitHub account with 2FA to protect us from your account being compromised.
- SMS 2FA is not recommended
- Download and install a git management tool.
- Gitkraken is recommended
- The rest of the guide assumes you are using Gitkraken.
- Go to preferences==>SSH. Generate a new private/public key.
- Go to Github SSH settings and add your public key.
- Open the Drauger OS Development repository you want to work on.
- Click the fork button
- Go to your repositories, you should now see your forked repository of the Drauger OS repository
- Click on code ==> SSH and copy the URL provided
- Go into Gitkraken and clone your forked repository using the SSH URL
- When viewing your repository in Gitkraken, find the dev branch (remote) and have Gitkraken checkout. You should be checked out to the current dev branch of your repository
- While you are working, changes might be made to the Drauger OS repository you forked.
- If changes affect the files you are working on, you may need to rebase from your repository's page. Be aware that your work may be lost, so backup your working files.
- If you rebase, don't forget to pull from Gitkraken.
- Make the desired changes and commits.
- Push your commits to your repository as necessary
- When you are finished making your changes, run through the pre-pull checklist
- Go to the pull requests section of the Drauger OS repository and generate a pull request
- Even if you have permissions to do so, don't approve pull requests you yourself generate
- Run pylint
- Run unit tests
- Check type hinting
- Test the code (run the application)
more coming soon
All Python code should conform to PEP8
as closely as possible. If you open a pull request pep8speaks
will provide feedback on your PEP8
conformance.
A good rule of thumb is if your Python code gets a score of 7.5
or higher from pylint
, and works correctly, the chances of having your pull request accepted is fairly high, but no pull request is guaranteed to be accepted.
more coming soon
You can find a number of tests to make sure your programs work correctly in the tests
directories. These are currently tailored to how these programs are written, i.e. they work for Python scripts. None of the UI is tested yet. Feel free to write more tests and request their addition in a pull request.
If, after modifying a function, the unit test fails, fix the issue in the function. Don't modify the unit test unless the functions interface has changed
coming soon
This section provides standards agreed upon by senior developers. By following these guidelines, you reduce the likelihood the pull request will be refused.
- Your code should be self documenting (i.e. variable names, function names, etc.)
- Comment where necessary. Assume someone else is going to read your code
- Docstrings will describe how others will interface with your function
- other users should not need to read the code in your function to know how to use it
- Harden your function inputs
- Functions should have high functional cohesion -- doing one thing, and doing it well
- Functions should have loose coupling -- limited connections to other functions and high portability
- Minimize the scopes of variables
- Avoid duplicate code
- When able, prioritize code readability