Skip to main content

Pull MTG card images in b

Project description

mtg_card_puller

Pull MTG card images from a file list.

Installation

To setup mtg_card_puller create a conda environment with the generated environment.yaml. This sets up a development environment with all the required packages. This is what is used when building out the functionality of this project.

conda env create -f environment.yaml
conda activate mtg_puller

Then install the python module. This installs the module the same way as if someone just wanting to use this package would install it. This is what is used when using this package as a dependency. Note: This installs the dev extra dependencies. When installing this to use as a standalone package, you should leave off the [dev] part.

python -m pip install .[dev]

If functionality from this repo is needed in another project, you can install this package as a dependency directly from the GitHub repo.

python -m pip install git+https://github.com/seerai/mtg_card_puller.git

You can then test that the docker image builds and runs correctly.

docker build -t mtg_card_puller:latest .

Once the build is complete, test the image:

docker run --rm mtg_card_puller:latest

You should see a message printed:

Replace this message by putting your code into mtg_card_puller.cli.main
See click documentation at https://click.palletsprojects.com/

Development

READMEs and Notes

Every folder in this project other than `mtg_card_puller`` should have a README.md file (the template does this automatically for all folders). Each of these READMEs should be kept up to date and should describe the contents of the folder. This is especially important for the the data folder and should include all data files, their sources and how to download them. This is also a good place to put any notes about the contents of the folder. For example, if you are working on a notebook and want to save some notes about what you are doing, you can put them in the README for that folder. You should always be asking yourself "If someone else were to look at this folder, would they know what is going on?". If the answer is no, then you should add more information to the README.

Dependency Management

When developing on this project, make sure that you never directly pip install any packages. This leads to situations where peoples environemnts are different and the code will not run correctly when another person tries to install the package. Instead, always add the dependency to the pyproject.toml file and reinstall the package. This ensures that all dependencies are tracked and others can use this package without issue. When possible, you should also pin a version or version range of the dependency. i.e. numpy==1.19.2 or numpy>=1.19.2,<1.20.0.

Testing

Any functions implemened in this package should be covered by tests if possible. This doesnt mean that every line of code needs to be tested, but that the functionality of the code is tested. Anything that is used only for development purposes can sometimes be excluded from testing. However, any function/class you expect someone to use after installing this as a package should be tested. You should always be asking yourself "If someone else were to use this code, would they know that it works correctly?". If the answer is no, then you should add tests.

This project uses pytest for testing. To run the tests, cd to the root of the project and run:

coverage run -m pytest

This will run all the tests and generate a coverage report. To view the coverage report, run:

coverage report

Project details


Download files

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

Source Distribution

mtg_card_puller-0.0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

mtg_card_puller-0.0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file mtg_card_puller-0.0.3.tar.gz.

File metadata

  • Download URL: mtg_card_puller-0.0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for mtg_card_puller-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4f2b3b597ede8919c0d55d43c3091e26e8f2792f6083f66ea72745ca684eb6c6
MD5 40575c22a76d83d9c13bb45aa1a00d7a
BLAKE2b-256 7c4eec55cb7f07e6e852b50337b8fd52abcf98c188d0dc9a055e1c1165e8e1e4

See more details on using hashes here.

File details

Details for the file mtg_card_puller-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mtg_card_puller-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 161d126c8cf499745933663baca516285db79434f20af27403172888daf1a192
MD5 74846f3322f6756cdc2bbe244ffa48ff
BLAKE2b-256 9ea0c0d3128fd464476ee52f1eccb6336fd0653e713745e42e491f08cc9951cd

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