Amoni - A tool to manage local development

The latest anvilistas project:

Amoni

A command line tool to help manage local development of Anvil apps.

Amoni gives you:

  • A preconfigured postgresql server running in a docker container
  • A preconfigured Anvil application server running in a docker container
  • Simple commands to start and stop those servers
  • A preconfigured docker container to run your test suite
  • Convenient access to the anvil error log
  • Your app available in your browser at port 3030 on your local machine
  • Your database server available on port 5432 on your local machine

So your workflow becomes (almost :wink:)

   amoni init
   cd <my_new_amoni_project_directory>
   amoni start

   >>> Wait a while the first time while the server images download
   >>> Point my browser at http://localhost:3030
   >>> Marvel at how simple that was

   amoni test

   >>> Sigh with relief at those lovely passing tests

   amoni stop

   >>> Perform the Engineers Victory Dance™
   >>> Sup coffee (or beverage of choice)

Read the Documentation
Start a Discussion / Ask a Question
Browse the Code
Chat with the anvilistas team

14 Likes

I think these are related:

I haven’t tried any of them yet, though, and don’t understand enough to compare and contrast these approaches, but I’d be interested if others have thoughts.

1 Like

Sounds awesome!

Can’t wait to try it out.

Do you have any resources or tips and tricks for testing client-side code?

1 Like

Not yet, but we have some ideas of how we might extend amoni. Watch this space…

3 Likes

Hi Tim, I think it boils down to personal preferences. I am not a good programmer. So I really needed tight integration with PyCharm: I need it’s strict type checking features, it’s integration with pytest, it’s fantastic auto-complete, and its debugger which allows line-by-line execution.

All the things that a bad programmer needs. And so that’s why I put the time and effort into pyDALAnvilWorks.

My anvil apps are simple though. So I only put those things into this repo that I use. I think Amoni will be much better for more sophisticated apps.

1 Like

The amoni app server image has now been rebuilt with v1.7.0:

4 Likes

A whole bunch of updates to amoni:

  • amoni install app and amoni install dependency to fetch apps from a remote repository (e.g. at anvil.works), add them to your project and configure the app server correctly.

  • amoni init now takes its path and app name directly on the command line, runs git init on the folder it creates and creates an initial commit

  • Stub files that enable an autocompleter to see the tables available in your app

1 Like

Next up - commands to add/edit/remove data tables and columns (when I get a spare hour or two).

3 Likes

Thank you for the awesome tool @owen.campbell !
May I ask - how to add anvil_extras as working dependency?

I receive error


The app you requested could not be loaded.

This app may be misconfigured. The following error occurred:

App dependency not found

But I did everything from manual and anvil_extras is the single dependency of my app…
I’ve completed this step -

amoni app add --as-dependency https://github.com/anvilistas/anvil-extras.git anvil_extras C6ZZPAPN4YYF5NVJ

I see in my config.yaml that

dep_id:
  C6ZZPAPN4YYF5NVJ: anvil_extras

And I have anvil_extras in my app folder.
And in anvil.yaml of my Anvil application I see the same dependency id

- app_id: C6ZZPAPN4YYF5NVJ
  version: {dev: false}

Probably best to pick this up on the amoni repo rather than here as it’s not an anvil issue:

1 Like

Done!

1 Like

Amoni is now at v0.0.10 with a bug fix for the issue found by @psychedel.gcloud and another to handle apps with no data tables gracefully.

5 Likes

HI Owen, thanks for your hard work. Just a note, I looked into your anvil-stubs package and if you want more stubs, I have most of them in the anvil folder on pyDALAnvilWorks

4 Likes

Amoni is now at v0.0.11 with a fix for a bug found by @bobincomox

1 Like