mirror of
https://github.com/lutris/lutris
synced 2024-09-29 20:43:37 +00:00
Update CONTRIBUTING and INSTALL
This commit is contained in:
parent
b3d52d35e5
commit
a892d08f63
|
@ -1,10 +1,6 @@
|
|||
Contributing to Lutris
|
||||
======================
|
||||
|
||||
IMPORTANT!
|
||||
|
||||
If you contribute to Lutris on a somewhat regular basis, be sure to add yourself to the AUTHORS file!
|
||||
|
||||
Finding features to work on
|
||||
---------------------------
|
||||
|
||||
|
@ -19,11 +15,9 @@ where you can submit bash scripts for various open source games and engines we
|
|||
do not already have.
|
||||
|
||||
Another area where users can help is [confirming some
|
||||
issues](https://github.com/lutris/lutris/issues?q=is%3Aissue+is%3Aopen+label%3A%22need+help%22)
|
||||
that can't be reproduced on the developers setup. Other issues, tagged [need
|
||||
help](https://github.com/lutris/lutris/issues?q=is%3Aissue+is%3Aopen+label%3A%22need+help%22)
|
||||
might be a bit more technical to resolve but you can always have a look and see
|
||||
if they fit your area of expertise.
|
||||
issues](https://github.com/lutris/lutris/issues?q=is%3Aissue+is%3Aopen+label%3A%22can%27t+reproduce%22+)
|
||||
that can't be reproduced on the developers setup. Please make sure that you're able to
|
||||
reproduce an issue before attempting to fix it.
|
||||
|
||||
Note that Lutris is not a playground or a toy project. One cannot submit new
|
||||
features that aren't on the roadmap and submit a pull request for them without
|
||||
|
@ -35,15 +29,17 @@ at all times have a valid use case based on an actual game, be very specific
|
|||
about why you are implementing a feature otherwise it will get rejected.
|
||||
Avoid adding options in the GUI or introducing new installer directives for
|
||||
things that can be automated. Lutris focuses heavily on automation and on doing
|
||||
the right thing by default. Only introduce new option when absolutely
|
||||
the right thing by default. Only introduce new options when absolutely
|
||||
necessary.
|
||||
|
||||
Contributors are welcome to suggest architectural changes or better code design
|
||||
if they feel like the current implementation should be improved but please take
|
||||
note that we're trying to stay as lean as possible. Requests introducing complex
|
||||
architectural changes for the sake of "modularity", "Unix pureness" or subjective
|
||||
aspects might not be received warmly. There are no plans for any rewrite in
|
||||
another language or switching to another toolkit.
|
||||
aspects might not be received warmly. There are no current plans for any rewrite in
|
||||
another language. Once again, make sure to discuss any change with a core developer
|
||||
before writing a large amount of code. Keeping your pull requests as small as a possible
|
||||
is the best way to have them reviewed and merged quickly.
|
||||
|
||||
Running Lutris from Git
|
||||
-----------------------
|
||||
|
@ -63,16 +59,16 @@ new dependencies, check in the package configuration files for new packages to
|
|||
install. Debian based distros will have their dependencies listed
|
||||
in `debian/control` and RPM based ones in `lutris.spec`.
|
||||
|
||||
The PyGOject introspection libraries are not regular python packages and
|
||||
it is not possible for pip to install them or use them from a virtualenv. Make
|
||||
The PyGOject introspection libraries are not regular python packages, for that
|
||||
reason, using a virtualenv for development is heavily discouraged. Make
|
||||
sure to always use PyGOject from your distribution's package manager. Also
|
||||
install the necessary GObject bindings as described in the INSTALL file.
|
||||
|
||||
Set up your development environment
|
||||
-----------------------------------
|
||||
|
||||
To ensure you have the proper dependencies installed run: `make dev`
|
||||
This will install all necessary python packages to get you up and running.
|
||||
To ensure you have the proper tools installed run `make dev`
|
||||
This will install all necessary python to allow testing and validating your code.
|
||||
|
||||
This project includes .editorconfig so you're good to go if you're using any
|
||||
editor/IDE that supports this. Otherwise make sure to configure your max line
|
||||
|
@ -84,18 +80,13 @@ Formatting your code
|
|||
To ensure getting your contributions getting merged faster and to avoid other
|
||||
developers from going back and fixing your code, please make sure your code
|
||||
passes style checks by running `make sc` and fixing any reported issues
|
||||
before submitting your code. This runs a series of tools to apply pep8 coding
|
||||
before submitting your code. This runs a series of tools to apply PEP 8 coding
|
||||
style conventions, sorting and grouping imports and checking for formatting issues
|
||||
and other code smells.
|
||||
|
||||
You can help fix formatting issues or other code smells by having a look at
|
||||
the CodeFactor page: https://www.codefactor.io/repository/github/lutris/lutris
|
||||
|
||||
When writing docstrings, you should follow the Google style
|
||||
(See: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
|
||||
You should always provide docstrings, otherwise your code wouldn't pass a
|
||||
Pylint check.
|
||||
|
||||
Writing tests
|
||||
-------------
|
||||
|
||||
|
@ -107,29 +98,28 @@ Running tests
|
|||
-------------
|
||||
|
||||
Be sure to test your changes thoroughly, never submit changes without running
|
||||
the code. At the very least, run the test suite and check that nothing broke.
|
||||
the code. Also run the test suite and check that nothing broke.
|
||||
You can run the test suite by typing `make test` in the source directory.
|
||||
In order to run the test, you'll need to install nose2 and flake8:
|
||||
|
||||
pip3 install nose2 flake8
|
||||
|
||||
QAing your changes
|
||||
------------------
|
||||
|
||||
It is very important that any of your changes be tested manually, especially if
|
||||
you didn't add unit tests for the patch. Even trivial changes should be tested
|
||||
you didn't add unit tests. Even trivial changes should be tested
|
||||
as they could potentially introduce breaking changes from a simple oversight.
|
||||
|
||||
Submitting your changes
|
||||
-----------------------
|
||||
|
||||
Make a new git branch based of `master` in most cases, or `next` if you want to
|
||||
target a future release. Send a pull request through GitHub describing what
|
||||
issue the patch solves. If the PR is related to and existing bug report, you
|
||||
can add `(Closes #nnn)` or `(Fixes #nnn)` to your PR title or message, where
|
||||
`nnn` is the ticket number you're fixing. If you have been fixing your PR with
|
||||
several commits, please consider squashing those commits into one with `git
|
||||
rebase -i`.
|
||||
Make a new git branch based of `master` in most cases. Send a pull request
|
||||
through GitHub describing what issue the patch solves.
|
||||
If the PR is related to and existing bug report, you can add `(Closes #nnnn)`
|
||||
or `(Fixes #nnnn)` to your PR title or message, where `nnnn` is the ticket
|
||||
number you're fixing.
|
||||
|
||||
If you contribute to Lutris on a somewhat regular basis, be sure to add
|
||||
yourself to the AUTHORS file!
|
||||
|
||||
|
||||
Developer resources
|
||||
-------------------
|
||||
|
@ -141,7 +131,6 @@ project's code base.
|
|||
* [Python 3 documentation](https://docs.python.org/3/)
|
||||
* [PyGObject documentation](https://pygobject.readthedocs.io/en/latest/)
|
||||
* [Python Gtk 3 tutorial](https://python-gtk-3-tutorial.readthedocs.io/en/latest/objects.html)
|
||||
* [Fakegir GObject code completion](https://github.com/strycore/fakegir)
|
||||
|
||||
Project structure
|
||||
-----------------
|
||||
|
|
18
INSTALL.rst
18
INSTALL.rst
|
@ -65,23 +65,9 @@ you can run it directly from the source directory::
|
|||
cd lutris
|
||||
./bin/lutris
|
||||
|
||||
Alternatively you can install Lutris manually with the help of **virtualenv**.
|
||||
|
||||
First, install ``python-virtualenv`` from your distribution's
|
||||
repositories, along with dependencies listed in Requirements_.
|
||||
Then, create and activate virtual environment for Lutris::
|
||||
|
||||
virtualenv --system-site-packages ~/lutris
|
||||
source ~/lutris/bin/activate
|
||||
|
||||
While in the virtual environment, run the installation script::
|
||||
|
||||
python3 setup.py install
|
||||
|
||||
Run Lutris
|
||||
-----------
|
||||
|
||||
If you installed Lutris using a package, you can launch the program by typing
|
||||
``lutris`` at the command line (same applies to virtualenv method, but you need to
|
||||
activate the virtual environment first). And if you want to run Lutris without
|
||||
installing it, start ``./bin/lutris`` from within the source directory.
|
||||
``lutris`` at the command line. And if you want to run Lutris from the source tree,
|
||||
type ``./bin/lutris``
|
||||
|
|
Loading…
Reference in a new issue