Code Monkey home page Code Monkey logo

myjudo's Introduction

MyJudo Build Status Kritika Analysis Status Docker Automated build Docker Repository on Quay

This is an experimental website using the Perl 6 programming language and Cro.

Building & Running

docker-compose up --build

Add resources/fake-tls/ca-crt.pem to your browser to avoid scary self signed warnings.

Visit http://localhost and get redirected to https://localhost

Testing

First install sqlite3 and make sure by running sqlite3 --version that the one you have is greater than to 3.8.3.

Then install needed modules with:

zef install --deps-only .

Finally run the tests with:

prove6 -I=lib -v t/*

Currently running at https://myjudo.net

This app is serving as basis for my November 2017 workshop at the London Perl Workshop on Bailador:

http://act.yapc.eu/lpw2017/talk/7213

Scuttlebutt user?, you can also clone this repo via ssb://%MkBUFeRs7fTN2lAUXuYYaK3i9ln29vBisvJnhEcx4KA=.sha256

myjudo's People

Contributors

jj avatar jraspass avatar lancew avatar lizmat avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jj ohmycloud lizmat

myjudo's Issues

Fix tests - Hash ordering

2018.05 - changed the hash ordering so the tests have started failing as I think they are order specific.

New DB

sqlite will only get me so far. :-)

Sensei - Sensei relationships should be verified.

Following discussions with Dr Mike Callan:

Relationships between sensei should be verified, so that the data is more reliable. For example, Charles Palmer though often mentioned as having trained with Kano; as I understand it; could not have due to not having trained at Kodokan before Kano's death.

We want to allow anyone to "suggest" a relationship (entry in sensei_sensei table), but trusted users would be able to set a "verified" field to true on the rows in the table to show that relationship is verified (maybe some logging?).

I imagine in the UI dotted lines connecting unverified relationships and solid lines showing verified links. Perhaps grey coloured text for non verified coaches in your tree?

Change sensei-sensei from 1:1 to 1:many

Currently the sensei-sensei is done via a field on each sensei, so 1:1.
Would be nice to (as we do with user-sensei) allow multiple relationships.
So time for a link table. :-)

Performance issue, slow load times

Seeing slow loading times on production.
seeing errors in the log:

Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426 Use of uninitialized value element of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in sub resolve at /usr/share/perl6/site/sources/FF427524EDC76E6B9122E483788D43C631D6C88B (Template::Mustache) line 426

Extend session details

  • Type of training session
    • Randori
    • Kata
    • Uchi Komi
    • Nage Komi

It would be nice to record the type of training session, so that some statistics could be recorded/generated.

Warn on service.p6 line 15

Use of uninitialized value %result of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block at service.p6 line 15

Problem with registering

After registering and trying to log in I get an internal server error, whith this in the log:

jmerelo at penny in ~/Code/forks/MyJudo (master●●) 
$ bailador --config=host:0.0.0.0,port=3131 easy bin/app.pl6
Attempting to boot up the app
# Entering the dance floor: http://0.0.0.0:3131
! DBDish::SQLite: Error: near "WITH": syntax error (1)\n  in method handle-error at /home/jmerelo/.rakudobrew/moar-2017.11/instal! l/share/perl6/site/sources/CF5EBB8C909051D17C8743E2B59D9365D293FF0C (DBDish::SQLite::Connection) line 17\n  in method prepare at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/CF5EBB8C909051D17C8743E2B59D9365D293FF0C (DBDish::SQLit! e::Connection) line 26\n  in method get_user_data at /home/jmerelo/Code/forks/MyJudo/lib/MyJudo.pm6 (MyJudo) line 175\n  in sub  at bin/app.pl6 line 108\n  in method execute at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/53E2E097B04EBB21E6CD806F17779EB2C6866E01 (Bailador::Route::Simple) line 12\n  in block  at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/3E224B7E6C04FA4758643CE3EC169B9B87C9C2F9 (Bailador::Route) line 22\n  in method recurse-on-routes at!  /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/3E224B7E6C04FA4758643CE3EC169B9B87C9C2F9 (Bailador::Route) line 20\n  in block  at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/3E224B7E6C04FA4758643CE3EC169B9B87C9C2F9 (Bailador::Route) line 37\n  in block  at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/3E224B7E6C04FA4758643CE3EC169B9B87C9C2F9 (Bailador::Route) line 25\n  in method recurse-on-routes at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/3E224B7E6C04FA4758643CE3EC169B9B87C9C2F9 (Bailador::Route) line 20\n  in method dispatch at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/341F58F51C05C5B62B7CB9E146D9ECB7B2C07627 (Bailador::App) line 339\n  in block  at /home/jmerelo/.rakudobrew/moar-2017.11/install/share/perl6/site/sources/341F58F51C05C5B62B7CB9E146D9ECB7B2C07627 (Bailador::App) line 318\n

With

$ perl6 --version
This is Rakudo version 2017.11 built on MoarVM version 2017.11
implementing Perl 6.c.

Ical feed

Would be nice to have an ical feed of training sessions that you could sub to in calender and see hwn you trained and what you did on the day.

Training Types This Month Chart

Currently we have a chart breaking down total sessions by type (kata, randori etc) it would be nice to have this months pie chart also.

Activity reporting

Create reports in the users pages (and via email?) of users activity this week/month/quarter

Server hangs....

Hangs and site goes down, the following errors:

Earlier failure:
 (HANDLED) Failed to open file /app/MyJudo/views/index.tm: Too many open files
  in method from-file at /opt/rakudo-pkg/share/perl6/site/sources/C3B82B0A420ECCEDE6A12078167339A3057B2138 (Template::Mojo) line 112
  in block  at /app/MyJudo/lib/Routes.pm6 (Routes) line 28
  in block  at /opt/rakudo-pkg/share/perl6/site/sources/7C719666D0F678DBDE30BEFAA802017E80D2DF2C (Cro::HTTP::Router) line 130

Final error:
 Type check failed in binding to parameter '$tmpl'; expected Str but got Failure (Failure.new(exception...)
  in method new at /opt/rakudo-pkg/share/perl6/site/sources/C3B82B0A420ECCEDE6A12078167339A3057B2138 (Template::Mojo) line 116
  in method from-file at /opt/rakudo-pkg/share/perl6/site/sources/C3B82B0A420ECCEDE6A12078167339A3057B2138 (Template::Mojo) line 113
  in block  at /app/MyJudo/lib/Routes.pm6 (Routes) line 28
  in block  at /opt/rakudo-pkg/share/perl6/site/sources/7C719666D0F678DBDE30BEFAA802017E80D2DF2C (Cro::HTTP::Router) line 130

Failed to open file /dev/urandom: Too many open files
  in sub _crypt_random_bytes at /opt/rakudo-pkg/share/perl6/site/sources/694216A6AA32B79B40ED31868C6EDFAB61B56ABC (Crypt::Random::Nix) line 10
  in sub crypt_random_buf at /opt/rakudo-pkg/share/perl6/site/sources/C223DF36B97268CA54BFBCF1C7C6BCDB9B0B32EA (Crypt::Random) line 13
  in sub crypt_random at /opt/rakudo-pkg/share/perl6/site/sources/C223DF36B97268CA54BFBCF1C7C6BCDB9B0B32EA (Crypt::Random) line 21
  in sub crypt_random_uniform at /opt/rakudo-pkg/share/perl6/site/sources/C223DF36B97268CA54BFBCF1C7C6BCDB9B0B32EA (Crypt::Random) line 28
  in sub crypt_random_sample at /opt/rakudo-pkg/share/perl6/site/sources/758A012BC24B97FD12CC128CDFC607A20B3EA1EF (Crypt::Random::Extra) line 34
  in sub generate-session-id at /opt/rakudo-pkg/share/perl6/site/sources/C961425F6DD22A6CAAEAEC562A586FE91F8E3510 (Cro::HTTP::Session::IdGenerator) line 5
  in block  at /opt/rakudo-pkg/share/perl6/site/sources/411A3B29BE5BB247D56E33C7E556B7855EBA5009 (Cro::HTTP::Session::InMemory) line 118
  in block  at /opt/rakudo-pkg/share/perl6/site/sources/32DA898BE7D88D49C2A69159C9F9C42E70E61E30 (Cro::HTTP::Internal) line 45
  in block  at /opt/rakudo-pkg/share/perl6/site/sources/7C719666D0F678DBDE30BEFAA802017E80D2DF2C (Cro::HTTP::Router) line 221

Public profiles

Checkbox for the user that makes their profile public, so that /user/dave is able to be seen by others. Obviously only read access and some restrictions on what is shown?

Age techniques display

To encourage spaced repetition some more, lets show the age of a technique visually somehow. I.e. no colouration or green if recently done, orange if not done in last 3 months, red if not done in the last 6 months

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.