NTHU-Data-API is a project designed for NTHU developers.
It provides an easy way to fetch data from the NTHU website.
Ensure you have Python 3 installed on your machine. You can verify this by running python3 --version in your terminal. If you don't have Python 3 installed, you can download it here.
- Clone the repository:
git clone https://github.com/NTHU-SA/NTHU-Data-API.git- Navigate to the project directory:
cd NTHU-Data-API- Install the required dependencies:
pip3 install -r requirements-dev.txtCopy the environment template file and fill in your details:
cp .env.template .envTo ensure code quality and consistency, we use pre-commit hooks. The pre-commit will automatically format your code before each commit. Install them by running:
pre-commit installpython3 main.pyWe follow certain guidelines for contributing. Here are the types of commits we accept:
feat: Add or modify featuresfix: Fix a bug... You can refer to the full list of commit types in the Conventional Commits specification.
To run tests locally before committing changes, follow these steps:
- Install the required dependencies:
pip3 install -r requirements-tests.txt- Run tests: Navigate to the project's root directory and execute:
python3 -m pytest -n auto tests- Generate a coverage report (optional): If you need a test coverage report, run:
python3 -m pytest -n auto tests --cov=src --cov=tests --cov-report=xml --cov-report=html:coverage --cov-fail-under=85This project is maintained by NTHUSA 32nd.
This project is licensed under the MIT License.
Thanks to SonarCloud for providing code quality metrics: