Code Monkey home page Code Monkey logo

Comments (12)

pylipp avatar pylipp commented on June 18, 2024 1

I like list instead of print very much. It complies well with the implementation which comes from the listing module.

I'm not familiar with terms around the SQL ecosystem, so show instead of the current list does not feel that intuitive to me. What do you think about the explicit databases, or periods (which displays a list of what you can specify using the --period option on other commands).

The inspiration for rm came from the Linux rm, and the git command. I'm fine with changing it to the explicit remove.

Note: with

[ ] support print at date other than today

I talk about a feature that shows the content of the list at a point in the past (like a snapshot). Honestly I don't know how this idea appeared :D maybe it's better to make the --filters option more powerful.

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

@pylipp I think show would be a better alternative to print.

from financeager.

pylipp avatar pylipp commented on June 18, 2024

Thanks for the suggestion! I still find it a bit ambiguous since e.g. there's also the get command which shows a single entry. With the renamed command, many entries are shown in a tabular format.

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

@pylipp Honestly, list would have been perfect. Throw in a --period argument and you achieve

  • support print at date other than today

Maybe we could also rename the current list command to show (which is the command most SQL systems follow to list tables, indexes and databases). That way we free up list to replace print.

Also, rm is a not really a good choice of name for the remove command. If you're making the user type update, you might as well ask them to explicitly type remove too (both the commands have very low usage semantics).

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

What do you think about the explicit databases, or periods (which displays a list of what you can specify using the --period option on other commands).

This makes sense to me. 👍

I talk about a feature that shows the content of the list at a point in the past (like a snapshot). Honestly I don't know how this idea appeared :D maybe it's better to make the --filters option more powerful.

Ohh! I misunderstood this feature request. I thought you just wanted to extend the current print command to other periods.

So, maybe we should make milestones (or would you like to track in separate issues):

  • Make databases command
  • Rename print to list and rm to rename
  • Make periods command

from financeager.

pylipp avatar pylipp commented on June 18, 2024

Milestones is a great idea! I see them like this:

  • rename list to periods
  • rename print to list
  • rename rm to remove
    There's no need to make new commands, everything's already there in one way or the other :D

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

Awesome! @pylipp Can you add the milestones to this issue, and assign it to me? I'll start on this.

from financeager.

pylipp avatar pylipp commented on June 18, 2024

not sure whether I did it right :'D

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

Awesome! I'll add new issues / PRs to the milestone as and when needed.

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

@pylipp So I tried setting up the package and running the tests. Some of your tests are fragile / not cross-platform.

On windows I had 10 tests failing, on MacOS I had 2. The ones failing on Mac are:

======================================================================
FAIL: test_invalid_host (test.test_httprequests.HttpRequestProxyTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/abhibha/misc/financeager/test/test_httprequests.py", line 51, in test_invalid_host
    self.assertIn("Name or service not known", error_message)
AssertionError: 'Name or service not known' not found in "Error sending request: HTTPConnectionPool(host='weird.foodomain.nope', port=80): Max retries exceeded with url: /periods/2000/standard/1 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x107d51e90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))"

======================================================================
FAIL: test_verbose (test.test_cli.CliLocalServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/mock.py", line 1209, in patched
    return func(*args, **keywargs)
  File "/Users/abhibha/misc/financeager/test/test_cli.py", line 150, in test_verbose
    "Loading custom config from {}".format(TEST_CONFIG_FILEPATH)))
AssertionError: False is not true

----------------------------------------------------------------------

I'll open a separate issue to address those.

from financeager.

pylipp avatar pylipp commented on June 18, 2024

Oh that's a pity! I purely tested on Linux distros...
For a workaround, you can probably open a PR; pushes to the branch then trigger builds on travis CI.

However, the first test fails for me whenever I don't have an internet connection... For the second one I'd have to have a closer look.

Would using a Docker container be an option for you?

from financeager.

babhishek21 avatar babhishek21 commented on June 18, 2024

No worries. I managed to find viable fixes (see #36). I'll put up a separate PR for that.

from financeager.

Related Issues (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.