iitis / PyQBench

Apache License 2.0
4 stars 3 forks source link

Initial repository configuration #1

Closed dexter2206 closed 2 years ago

dexter2206 commented 2 years ago

This PR adds the basic configuration that we'll use for development, along with basic layout of qbench package. The details are described below.

Package structure

The main package is called qbench. Setup files setup.cfg and pyproject.toml allow installation of the package in local environment and contain required metadata. The setup.py file allows installation in editable mode.

Note that some metadata (e.g. project description) contain only stubs/placeholders that will be replaced later on.

Package will be versioned using git tags (or GitHub releases). To do this, required configuration of setuptools_scm package is provided in pyproject.toml. To allow installation from zip archive, files .git_archival.txt and gitattributes are provided.

Tests

Tests are placed in tests package. For now, there is only a single dummy test (required for pytest not to fail on this PR).

Development tools

There are several development tools that we'll use with this repository, in particular:

All code pushed to the repository should comply with the above tools. You can install all of them by installing package with dev dependencies. Compliance with the above is checked for each pull request in a GitHub actions workflow. Workflows definition can be found in .github/workflows/quality_checks.yml

Optionally, you can check compliance with the above tools on each commit. To do so, install pre-commit package (pip install pre-commit) and run precommit install. Pre-commit hooks configuraiton is storedi n .pre-commit-config.yml.

How to test this PR

To test that GitHub Actions workflows work, just look at this PR, it should contain the required checks.