GithubHelp home page GithubHelp logo

pyrchidekt's Introduction

Pyrchidekt

Pyrchidekt is a Python library for interfacing with decks from the website Archidekt.

Installation

pip install pyrchidekt

Example

The following example shows how to use pyrchidekt to query a deck and iterate through all cards in each category.

from pyrchidekt.api import getDeckById

deck = getDeckById(1)
for category in deck.categories:
    print(f"{category.name}")
    for card in category.cards:
        print(f"\t{card.quantity} {card.card.oracle_card.name}")
    print("")

Developing

It is encouraged to use virtual environments to develop pyrchidekt. To start developing, install the requirements:

pip install -r requirements/dev.txt

Testing

Testing will be run on PRs and before deploys for new releases. For local testing, see below.

Setup

You must additionally install the testing dependencies:

pip install -r requirements/test.txt

All tests can be run as follows:

coverage run -m pytest tests

With reporting then checked using:

coverage report

There are two types of tests: unit and integration.

Unit Tests

Unit tests ensure that the basic data dict conversion works correctly from how the inferred API works. These are run as follows:

coverage run -m pytest tests/unit

These tests should be run often when changing the dataclasses

Integration Tests

Integration tests ensure that pyrchidekt works with the current API of Archidekt. They are run as follows:

coverage run -m pytest tests/integration

These tests can be run less frequently. So long as Archidekt doesn't change their API data structures, these will pass.

pyrchidekt's People

Contributors

linkian209 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.