File: CONTRIBUTING.md

package info (click to toggle)
python-schema-salad 8.9.20250408123006-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,056 kB
  • sloc: python: 19,177; cpp: 2,631; cs: 1,869; java: 1,341; makefile: 187; xml: 184; sh: 103; javascript: 46
file content (24 lines) | stat: -rw-r--r-- 1,642 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Style guide:
- Python 3.9+ compatible code
- PEP-484 type hints
- Prefer new style format strings https://pyformat.info/
- Use ``make format`` to format your code

It is suggested that you run `git config blame.ignoreRevsFile .git-blame-ignore-revs`
to filter out mass-formatting commits from `git blame`.

In order to contribute to the development of ``schema-salad``, you need to install it from source (preferably in a virtual environment):
Here's a rough guide (improvements are welcome!)
- Install virtualenv via pip: ``pip install virtualenv``
- Clone the code repository locally: ``git clone https://github.com/common-workflow-language/schema_salad.git``
- Switch to schema_salad directory: ``cd schema_salad``
- Create a virtual Python environment: ``virtualenv env``
- To begin using the Python virtual environment, it needs to be activated: ``source env/bin/activate``
- To check if you have the Python virtual environment set up: ``which python`` and it should point to python executable in your virtual env
- Install schema-salad in the Python virtual environment: ``pip install .``
- Check the version which might be different from the version installed in general on any system: ``schema-salad-tool --version``
- After you've made the changes, you can the complete test suite via tox: ``tox``
	- If you want to run specific tests, say ``unit tests`` in Python 3.5, then: ``tox -e py35-unit``.
	- Look at ``tox -l`` for all available tests and runtimes
- If tests are passing, you can simply commit and create a PR on ``schema_salad`` repo:
- After you're done working, you can deactivate the virtual environment: ``deactivate``