Git Product home page Git Product logo

fetch-leetcode-problem's Introduction

Fetch Problem

Python package to get a dictionary with information about a leetcode problem, formatted in rst

Installing

  1. Install package with pip install rossmassey.fetch-leetcode-problem
  2. Use import fetch_leetcode_problem or from fetch_leetcode_problem import ...
  3. See Documentation for usage

Documentation

  1. cd docs && make html

Deploy Documentation

Sphinx documentation is generated from the docstrings

https://rossmassey.github.io/fetch-leetcode-problem/

Building & Publishing to PyPI

Upload Python Package

This is done automatically on release tag by GitHub actions

Manually

Assume .pypirc configured in user home directory wih PyPI credentials

rm -rf dist
python3 -m build
python3 -m twine upload --repository pypi dist/*

fetch-leetcode-problem's People

Contributors

rossmassey avatar

Stargazers

aidan avatar

Watchers

 avatar

fetch-leetcode-problem's Issues

func type parsing bug

# FIXME: this work for List[int], but not List[List[int]] or more
# (i.e. 2055) arg.annotation.value.id does not exist
# will need to travel down until find .id
if arg.annotation and hasattr(arg.annotation, 'id'):
param_type = arg.annotation.id
elif arg.annotation:
param_type = f'{arg.annotation.value.id}[{arg.annotation.slice.id}]'

# FIXME: see above
if function_ast.returns and hasattr(function_ast.returns, 'id'):
rtype = function_ast.returns.id
elif function_ast.returns:
rtype = f'{function_ast.returns.value.id}[{function_ast.returns.slice.id}]'

this need to be fixed, right now it works for 0 or 1 levels (int or List[int]), but not more List[List[int]]

create recursive function (don't expect many levels) to find final .id, create function that can be used for both sections

wrong directory structure

need to add a rossmassey directory above fetch-leetcode-problem to match rossmassey.fetch-leetcode-problem name

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.