Skip to main content

ts-backend-check is a Python package used to check TypeScript types against their corresponding backend models to assure that all fields have been accounted for.

Project description

TSBE Check logo

rtd ci_backend issues python pypi pypistatus license coc matrix

Check TypeScript types against backend models

ts-backend-check is a Python package used to check TypeScript types against their corresponding backend models to assure that all fields have been accounted for.

Contents

Usage

Installation

pip install ts-backend-check

Basic Usage

The CLI provides a simple interface to check TypeScript types against backend models:

# Show help and available commands:
ts-backend-check --help

# Check a TypeScript type against a backend model:
ts-backend-check check <typescript_file> <backend_model>

# Example command:
ts-backend-check check src/types/user.ts src/models/user.py

Command Options

  • check: Compare TypeScript types with backend models
    • typescript_file: Path to the TypeScript interface/type file
    • backend_model: Path to the backend model file (e.g. Python class)

Version Information

ts-backend-check --version

Contributing

Public Matrix Chat

activist uses Matrix for internal communication. You're more than welcome to join us in our public chat rooms to share ideas, ask questions or just say hi to the team :)

Please see the contribution guidelines if you are interested in contributing. Work that is in progress or could be implemented is tracked in the issues and projects.

[!NOTE] Just because an issue is assigned on GitHub doesn't mean the team isn't open to your contribution! Feel free to write in the issues and we can potentially reassign it to you.

Also check the -next release- and -priority- labels in the issues for those that are most important, as well as those marked good first issue that are tailored for first-time contributors. For those new to coding or our tech stack, we've collected links to helpful documentation pages in the contribution guidelines.

We would be happy to discuss granting you further rights as a contributor after your first pull requests, with a maintainer role then being possible after continued interest in the project. activist seeks to be an inclusive, diverse and supportive organization. We'd love to have you on the team!

How you can help

Environment setup

  1. First and foremost, please see the suggested IDE setup in the dropdown below to make sure that your editor is ready for development.

[!IMPORTANT]

Suggested IDE setup

VS Code

Install the following extensions:

  1. Fork the ts-backend-check repo, clone your fork, and configure the remotes:

[!NOTE]

Consider using SSH

Alternatively to using HTTPS as in the instructions below, consider SSH to interact with GitHub from the terminal. SSH allows you to connect without a user-pass authentication flow.

To run git commands with SSH, remember then to substitute the HTTPS URL, https://github.com/..., with the SSH one, git@github.com:....

  • e.g. Cloning now becomes git clone git@github.com:<your-username>/ts-backend-check.git

GitHub also has their documentation on how to Generate a new SSH key 🔑

# Clone your fork of the repo into the current directory.
git clone https://github.com/<your-username>/ts-backend-check.git
# Navigate to the newly cloned directory.
cd ts-backend-check
# Assign the original repo to a remote called "upstream".
git remote add upstream https://github.com/activist-org/ts-backend-check.git
  • Now, if you run git remote -v you should see two remote repositories named:
    • origin (forked repository)
    • upstream (ts-backend-check repository)
  1. Create a virtual environment, activate it and install dependencies:

    # Unix or MacOS:
    python3 -m venv venv
    source venv/bin/activate
    
    # Windows:
    python -m venv venv
    venv\Scripts\activate.bat
    
    # After activating venv:
    pip install --upgrade pip
    pip install -r requirements-dev.txt
    
    # To install the CLI for local development:
    pip install -e .
    

You're now ready to work on ts-backend-check!

[!NOTE] Feel free to contact the team in the Development room on Matrix if you're having problems getting your environment setup!

Contributors

Thanks to all our amazing contributors! ❤️

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ts_backend_check-1.0.0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file ts_backend_check-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ts_backend_check-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ad9bfc944692c26d3cf5f8d2978081fb299e78dd56c83c176f8bc24fddaae65
MD5 8b8eaf76f4aef19e4d973ecfa4bb678c
BLAKE2b-256 65818de64d004dc829f6d3b4278b7814e7c4715884b0a92cbe4c7096e8b0bc95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page