Code Monkey home page Code Monkey logo

dj-notebook's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working for @octoenergy on decarbonizing the planet
  • ๐Ÿ˜„ Pronouns: he/him
  • ๐Ÿ I code mostly in Python, but also some NodeJS and Rust
  • ๐ŸŒฑ Iโ€™m currently learning Rust
  • ๐ŸŒŽ Contact me if you want to join me in decarbonizing the planet
  • ๐Ÿฅ‹ I'm currently training in Brazilian Jiu-Jitsu for sport and Tai Chi to help recover from a bike injury
  • ๐Ÿ“ซ How to reach me:
  • โšก Fun fact: I met my wife at PyCon US in 2010. She is awesome, her GH account is @audreyfeldroy

dj-notebook's People

Contributors

akashverma0786 avatar anna-zhydko avatar bloodearnest avatar daveparr avatar geoffbeier avatar nmpowell avatar pydanny avatar skyforest avatar specbeck avatar syyong avatar tejoooo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dj-notebook's Issues

Improve test coverage

Our current test coverage on September 30th is 52%:

Name                            Stmts   Miss  Cover   Missing
-------------------------------------------------------------
src/dj_notebook/__init__.py        13      3    77%   28-30
src/dj_notebook/shell_plus.py      44     26    41%   24-38, 43-51, 55, 60-67, 80-85, 89-91
tests/__init__.py                   0      0   100%
tests/test_dj_notebook.py           4      0   100%
-------------------------------------------------------------
TOTAL                              61     29    52%

Any improvement that increases the total percentage by at least 1% qualifies for hacktoberfest.

Check we meet DjangoCon sprint requirements

  • Installing & running the project
  • Running tests
  • Code style guidelines & tools used by your project
  • Testing requirements for new code, code coverage tools, CI, etc.
  • PR templates
  • Issues marked as beginner friendly
  • Contributing documentation?

Make tests pass

Current tests don't really check anything but should at least be passing

Map relations between models

Is your feature request related to a problem? Please describe.

Showing the relationships from one model to others would be awesome

Add reading of csv's to plus.read_frame()

Is your feature request related to a problem? Please describe.

We want to make it MUCH easier to read CSVs

Describe the solution you'd like

Provide text and file options for the plus.read_frame method

Add mermaid function

Is your feature request related to a problem? Please describe.

I want to be able to create a mermaid diagram and have a function that renders it.

Describe the solution you'd like

This API might work:

plus.mermaid(
"""
flowchart LR
    step1 --> step2
"""
)

Explore getting vizjs to work for model relations

Is your feature request related to a problem? Please describe.

vizjs handles large datasets better

Describe the solution you'd like

Should load the models.

Describe alternatives you've considered

Mermaidjs is limited in how it handles large sets

Remove support for Python 3.9

Is your feature request related to a problem? Please describe.

Types become a bit simpler to use from Python 3.10 up due to the pipe "|" operator. To simplify adding of type hints and demonstrate that this is a modern tool, we need to remove Python 3.9

Describe the solution you'd like

Remove CI and pyproject.toml support for Python 3.9

Pin dependencies (at least minimal versions)

Is your feature request related to a problem? Please describe.

Right now our dependencies are entirely unpinned.

Describe the solution you'd like

Pin to the current version? I'm worried then that people on not-quite-new projects will have installation issues.

Convert docs/index.md to docs/index.ipynb

Is your feature request related to a problem? Please describe.

Right now the home page of the docs doesn't really show off what the project can do.

Describe the solution you'd like

  • Convert the index file to .ipynb
  • Add an example of one of the charts (diagram or model_graph)

Record a dj-notebook usage video

Once complete open a pull request linking to your video that you create demonstrating usage of dj-notebook. Youtube is preferred, but other hosts that aren't spammy will be accepted.

Up to 5 people can submit videos.

  • Video: LINK HERE ADDED BY MAINTAINER
  • Video: LINK HERE ADDED BY MAINTAINER
  • Video: LINK HERE ADDED BY MAINTAINER
  • Video: LINK HERE ADDED BY MAINTAINER
  • Video: LINK HERE ADDED BY MAINTAINER

Give credit where it is due

Anyone at Kraken Tech who has contributed to this before the creation of the repo needs proper attribution.

Improve path definitions

Would be great if this did at least one of the following:

  • Handled paths without user interaction. Not sure if that is possible
  • Introspected the manage.py file to determine settings path
  • Used some other method to make path management easier, especially for beginners

Add activation page to docs

Is your feature request related to a problem? Please describe.

Activation is now sophisticated enough to need its own page

Describe the solution you'd like

Create docs/activation.md and include all three options.

Improve the model relations image

Is your feature request related to a problem? Please describe.

Currently all relations are a line. We need to fix that.

Describe the solution you'd like

  • Abstract relations probably shouldn't be visible
  • One-to-Many and Many-to-Many should be represented with typical arrow types, or have some other notation to delineate different types of relations

Get mypy to pass

Is your feature request related to a problem? Please describe.

Right now there's a surfeit of items that cause mypy to fail

Describe the solution you'd like

  • Add types everywhere
  • Ignore the test project
  • Add to make lint

Document installation of dj-notebook for VS Code

  • Needs to provide instructions for using dj-notebook with VSCode
  • Needs to be a pull request for a new file in the docs folder, not an external article.
  • Must not include any other content except for instructions on how to use dj-notebook with VScode

Raise warning if not run in DEBUG mode

Is your feature request related to a problem? Please describe.

In our book we mention that the shell and shell_plus should not be run in production.

Describe the solution you'd like

This should use both warning.warn and send a red message to the shell.

Leverage django-schema-graph's shema for model_graph

Is your feature request related to a problem? Please describe.

Rather than use our own solution, let's leverage @meshy's solution here

Describe the solution you'd like

Meshy's design is similar to what I was planning to evolve dj-notebook to, which is a proper typed system of edge and node objects. Currently we are using lists and sets, which works but is harder on presentation. He also accounts for a number of edge cases.

Really helps that the design and implementation are elegant and very well done.

Create optimized 1280ร—640px dj-notebook logo

The project could really use a social media logo. Taking submissions for the next 30 days.

Multiple submissions to be considered and multiple people can be assigned to the ticket, so please don't overwork yourself on this item. I'm not looking for anything fancy.

Change direction of diagram image

This ticket might offend purists, but our purposes class diagrams simply aren't as intuitive as simple flowcharts.

classDiagram
  A <|-- B
  B <|-- C

Loading

To this style:

flowchart TD
  A --> B
  B --> C
Loading

Note: We could change the direction, but I'm not certain that's a good idea either.

Contributor note: This ticket requires knowledge of mermaid.

Mention Kraken Tech in the README

Is your feature request related to a problem? Please describe.

This was inspired by code in Kraken.

Describe the solution you'd like

A some text to explain the history

Add django-pandas to `activate` return object

Assuming this:

from dj_notebook import activate
plus = activate('path.to.settings')
users = plus.Users.objects.all()

This is the API I want implemented:

plus.read_frame(users)

Pseudocode

This might be what is necessary to add to the Plus class:

from django_pandas.io import read_frame
    <snip>

class Plus:
    <snip>
    def read_frame(self, qs: Queryset) -> pd.Dataframe:
        return read_frame(qs)

Document usage with Emacs

Following the pattern set in the PyCharm setup, document using this library with emacs

  • Needs to provide instructions for using dj-notebook with emacs
  • Needs to be a pull request for a new file in the docs folder, not an external article.
  • Must not include any other content except for instructions on how to use dj-notebook with emacs
  • Direct copies of existing content will be rejected

Resources:

Improve plus.print()

Is your feature request related to a problem? Please describe.

dj-notebook's Plus.print() function is provides a list of all features imported from django-extensions' shell_plus feature. However, it is impossible to read

Describe the solution you'd like

Use a dataframe or something else to better display the results

Write external web article about dj-notebook

Once complete open a pull request linking to your original content that you create demonstrating usage of dj-notebook. Blogs, newsletters, dev.to, medium, or other methods apply.

Up to 5 people can submit articles, and I'll assign more than one to the ticket.

  • Article: LINK HERE ADDED BY MAINTAINER
  • Article: LINK HERE ADDED BY MAINTAINER
  • Article: LINK HERE ADDED BY MAINTAINER
  • Article: LINK HERE ADDED BY MAINTAINER
  • Article: LINK HERE ADDED BY MAINTAINER

Graph Models needs proper capitilization

Describe the bug

Everything is lower cased

To Reproduce

from dj_notebook import activate
plus = activate('sdasdasdad)

plus.graph_model(plus.User)

Expected behavior

The models should be capitalized correctly.

Screenshots

Screenshot 2023-10-07 at 16 52 20

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.