alkrauss48 / simple-slides

Simple Slides is a responsive and text-first presentation tool that keeps your audience engaged.
https://simpleslides.dev
MIT License
44 stars 8 forks source link

UX Feedback #21

Open pythoninthegrass opened 6 months ago

pythoninthegrass commented 6 months ago

Hey Aaron!

Testing out Simple Slides for my presentation this weekend. Very polished overall and easy to use!

Not sure how much access you have, but my pytest talk has some silly behavior atm:

Entirely possible that it's me holding markdown wrong. Know other apps like Deckset splits pages by --- kinda like front matter in YAML.

Using macOS 12.7.4 (21H1123), Firefox 124.0.2.

Lmk if you need any more details.

Screen Shot 2024-04-24 at 10 20 10 PM Screen Shot 2024-04-24 at 10 21 08 PM Screen Shot 2024-04-24 at 10 21 57 PM Screen Shot 2024-04-24 at 10 24 14 PM Screen Shot 2024-04-24 at 10 25 10 PM

pythoninthegrass commented 6 months ago

FWIW this is the raw markdown if you can't bust into my account

How to write tests with pytest

meetup-pytest

whoami

me-mt-rainier

Agenda

Agenda

What is pytest? ^1

The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries.

Features

  • Detailed info on failing assert statements (no need to remember self.assert* names)
  • Auto-discovery of test modules and functions
  • Modular fixtures for managing small or parametrized long-lived test resources
  • Can run unittest (including trial) test suites out of the box
  • Python 3.8+ or PyPy 3
  • Rich plugin architecture, with over 1300+ external plugins and thriving community

Why pytest?

Wildly detailed overview by somebody else ^2

test-pyramid

Unit tests

unittest is Python's built-in testing framework.

The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages. It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the reporting framework.

A unit is the smallest testable part of an application. In procedural programming, a unit could be an entire module, but it is more commonly an individual function or method.

Unit tests

Exhibit A ^4

import unittest

class TestStringMethods(unittest.TestCase):

    def test_upper(self):
        self.assertEqual('foo'.upper(), 'FOO')

    def test_isupper(self):
        self.assertTrue('FOO'.isupper())
        self.assertFalse('Foo'.isupper())

    def test_split(self):
        s = 'hello world'
        self.assertEqual(s.split(), ['hello', 'world'])
        # check that s.split fails when the separator is not a string
        with self.assertRaises(TypeError):
            s.split(2)

if __name__ == '__main__':
    unittest.main()

Integration tests

Integration testing is the phase in software testing in which the whole software module is tested... It occurs after unit testing and before system testing. Integration testing takes as its input modules that have been unt tested, groups them in larger aggregates, applies tests defined in an integration test plan to those aggregates, and delivers as its output the integrated system ready for system testing. ^5

Integration tests

Exhibit B

import unittest

class TestBasic(unittest.TestCase):
    def setUp(self):
        # Load test data
        self.app = App(database='fixtures/test_basic.json')

    def test_customer_count(self):
        self.assertEqual(len(self.app.customers), 100)

    def test_existence_of_customer(self):
        customer = self.app.get_customer(id=10)
        self.assertEqual(customer.name, "Org XYZ")
        self.assertEqual(customer.address, "10 Red Road, Reading")

class TestComplexData(unittest.TestCase):
    def setUp(self):
        # load test data
        self.app = App(database='fixtures/test_complex.json')

    def test_customer_count(self):
        self.assertEqual(len(self.app.customers), 10000)

    def test_existence_of_customer(self):
        customer = self.app.get_customer(id=9999)
        self.assertEqual(customer.name, u"バナナ")
        self.assertEqual(customer.address, "10 Red Road, Akihabara, Tokyo")

if __name__ == '__main__':
    unittest.main()

Mocking

TODO

Fixtures

TODO

Demo

TODO

Q&A

Questions?

Thank you!

Techlahoma

The Verge OKC

Sources

alkrauss48 commented 6 months ago

This is great feedback, and I was actually looking at your presentation a little bit ago. Some general thoughts to this are:

That brings me to the biggest issue you brought up which I hadn't ever thought about; code blocks that have line breaks. Currently slides are separated by double new lines (\n\n or \r\n), regardless of how it is formatted; that's why your code blocks are looking weird and are separated across multiple slides.

This is something that I probably will want to address, and I'm surprised I haven't really run into it myself yet. I'll check it out in the near future!

Thanks so much for the feedback, it is much appreciated.

pythoninthegrass commented 6 months ago

The image also isn't expanded b/c of what you said; it won't get stretched beyond its current resolution. This is something I could be convinced to change

DO IIIIT

Think the only deal breaker is the code blocks tbh. But the other stuff is nice to have. I'll toy around with formatting tomorrow when I finish the presentation.

Great work, sir! Very pleasant experience in my first go-around