You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Vertically align the type hints in function definitions
6
6
7
-
In order to contribute to the development of ``cwltool``, you need to install cwltool from source (preferably in a virtual environment):
7
+
The development is done using ``git``, we encourage you to get familiar with it.
8
8
Here's a rough guide (improvements are welcome!)
9
-
- Install virtualenv via pip: ``pip install virtualenv``
9
+
To get the code and start working on the changes you can start a console and:
10
10
- Clone the cwltool: ``git clone https://github.com/common-workflow-language/cwltool.git``
11
11
- Switch to cwltool directory: ``cd cwltool``
12
-
- Create a virtual environment: ``virtualenv cwltool``
12
+
13
+
In order to contribute to the development of ``cwltool``, the source code needs to pass the test before your changes are accepted.
14
+
There are a couple ways to test the code with your changes: let `tox` manage installation and test running in virtual environments, or do it manually (preferably in a virtual environment):
15
+
- Install ``tox`` preferably using the OS' package manager, otherwise it can be installed with ``pip install --user -U tox``
16
+
- Make your changes to the code and add tests for new cool things you're adding!
17
+
- Run the tests with the command ``tox``, it's recommended to use some parameters as tox will try to run all the checks in all available python interpreters.
18
+
- The important tests to run are ``unit tests`` and ``type tests``.
19
+
To run these two in Python 3.7, we can tell tox to run only those tests by running: ``tox -e py37-unit,py37-mypy2,py37-mypy3``.
20
+
- Run ``tox -l`` to see all available tests and runtimes
21
+
22
+
For the more traditional workflow:
23
+
- Create a virtual environment: ``python3 -m venv cwltool``
13
24
- To begin using the virtual environment, it needs to be activated: ``source bin/activate``
14
-
- To check if you have the virtual environment set up: ``which python`` and it should point to python executable in your virtual env
15
-
- Install cwltool in the virtual environment: ``pip install .``
25
+
- To check if you have the virtual environment set up: ``which python`` and it should point to python executable in your virtualenv
26
+
- Install cwltool: ``pip install -e .``
16
27
- Check the version which might be different from the version installed in general on any system: ``cwltool --version``
17
-
-After you've made the changes, you can the complete test suite via tox: ``tox``
18
-
- If you want to run specific tests, say ``unittests`` in Python 3.8, then: ``tox -e py38-unit``.
19
-
- Look at ``tox.ini`` for all available tests and runtimes
20
-
- If tests are passing, you can simply commit and create a PR on ``cwltool`` repo:
21
-
- After you're done working on the ``cwltool``, you can deactivate the virtual environment: ``deactivate``
28
+
-Make your changes to the code and add tests for new cool things you're adding!
29
+
- Run the unit-tests to see : ``python setup.py test``
30
+
- After you're done working on ``cwltool``, you can deactivate the virtual environment: ``deactivate``
31
+
32
+
When tests are passing, you can simply commit and create a PR on ``cwltool`` repo
0 commit comments