mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
1.4 KiB
1.4 KiB
Contributing to PISA
The following is a set of guidelines for contributing to PISA.
Code Style Guidelines
We use black as our base code formatter. Before submitting a PR make sure you have properly formatted your code by running:
black {source_file_or_directory}
On top of that, there are a few rules to also have in mind.
Code Spacing
Blocks of code should be created to separate logical sections
responder = Responder(db_manager)
responder.jobs, responder.tx_job_map = Builder.build_jobs(responder_jobs_data)
watcher.responder = responder
watcher.appointments, watcher.locator_uuid_map = Builder.build_appointments(watcher_appointments_data)
We favour spacing between blocks like if/else, try/except, etc.
if tx in missed_confirmations:
missed_confirmations[tx] += 1
else:
missed_confirmations[tx] = 1
Code Documentation
Code should be, at least, documented using docstrings. We use the Sphinx Google Style for documenting functions.
Test Coverage
We use pytest to build and run tests. Tests should be provided to cover both positive and negative conditions. Test should cover both the proper execution as well as all the covered error paths. PR with no proper test coverage will be rejected.