Skip to content

Latest commit

 

History

History
87 lines (74 loc) · 2.86 KB

File metadata and controls

87 lines (74 loc) · 2.86 KB

PyLander

License Apache-2.0 icon

👋 Welcome to Open Source Calendar built with Python. 🐍

Project's objectives

  1. Develop open source calendar tool using new technics while trying new things.
  2. Using Python as main programming language and plain HTML/JS for GUI.
  3. Create bonding in our community.

Creating development environment

Prerequisites

  1. Windows or Linux based system - either WSL on windows or full blown linux.
  2. Python
  3. Install python's requirements:
pip install -r requirements.txt
  1. Install pre-commit hooks:
pre-commit install

Running on Windows

virtualenv env
.\env\Scripts\activate.bat
pip install -r requirements.txt
# Copy app\config.py.example to app\config.py.
# Edit the variables' values.
# Rendering JWT_KEY:
python -c "import secrets; from pathlib import Path; f = Path('app/config.py'); f.write_text(f.read_text().replace('JWT_KEY_PLACEHOLDER', secrets.token_hex(32), 1));"
uvicorn app.main:app --reload

Running on Linux

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp app/config.py.example app/config.py
# Edit the variables' values.
uvicorn app.main:app --reload

Cypress:

Front end testing tool.

Every test created with testLevel configuration, the defualt level we run our test is 5. Basic tests will spicified with lower testLevel than advanced tests.

#To run Cypress:

  1. Make sure you already installed npm (run npm --version to check).
  2. Run the server
  3. Nevigate to 'test-ui' folder: calendar/tests/test-ui
    • Run with Test Runner:
      1. Run on terminal: npx cypress open
      2. Test Runner will open: choose test and click it to execute
    • Run all test without watching:
      1. Run on terminal: npx cypress run
    • Run a specific test file without watching:
      1. Run on terminal: npx cypress run --spec cypress/integration/path/to/file
    • Run tests with change level env config to 10: npx cypress run --env level=10

Running tests

Rendering JWT_KEY:

python -c "import secrets; from pathlib import Path; f = Path('app/config.py'); f.write_text(f.read_text().replace('JWT_KEY_PLACEHOLDER', secrets.token_hex(32), 1));"

Running tox

# Standard tests: 'coverage' and 'flake8'
tox
# Only flake8 tests
tox -e flake8
# Coverage with html reports
tox -e rep

Contributing

View contributing guidelines.