Community app for Corona Virus 'Lock-down'

That blog post is from 2016. So (as far as I am aware) the beta image you saw is just the initial beta and git process is as you currently see it.

For git purposes - you’d want to do git pushes and pulls on your local machine and possibly, in addition, use a github repository to take advantage of github pull requests.

Here’s the linked article for managing production and development environments. This is based on the solo coder so you’d have to extend the ideas to a team development.

Anvil Docs | Apps in development and production

1 Like

As far as I know Anvil apps cannot be developed by a team unless all the team members are in the same business plan.

The only alternative is to keep cloning and merging each other apps.

1 Like

I think we have correctly configured GIT Access both on Anvil’s IDE, in my local repository and in PyCharm I use on my local PC.
As you can see I was able to make a pull, modifications, a merge and a push.

Nevertheless every time I accessed the IDE I was kicked out because “some one else is modifying the app in another session” (I can’t remember the message exactly).

And I accessed the IDE for things like:
-use GUI elements properties (I don’t want to mess with the YAML file)
-“press play” and try the modification
-see and modify Data Tables

Don’t take all of the above as sterile criticism, I think me and Paul are just missing the right way to team-work on an App and we’re here to ask the Gurus the right way to do that.

Thanks and BR

1 Like

And I think Peter deleted accidentally my code in one of his edits of _Anvil_Server_Functions.py module:


Funciont update_telephone is no longer there.

So did my client-side code, the telephone_lost_focus event handler:

The question is: how can he notice I have pushed some code?

1 Like

On second thought, @AWSOM Peter might have intentionally replaced my code, I can see a different approach in the way he managed the update of those fields.

1 Like

if it were me - i’d combine the above dev/production suggestions from anvil…

…and combine it with github pull requests.

  • each edit your own development version of the app
  • push it to your forked github repo
  • make pull requests to the production github repo
  • push the github production repo to your anvil production app.
1 Like

Hi Aldo - you’re right on both fronts… Yes I did intentionally replace the code in this case (I found a more general way of updating all input fields in the database Table), but it was only by accident that I noticed you’d added a new function, so you question about how would either of us know, is still valid.

@bridget I think this whole topic is crying out for a beginner-friendly tutorial and maybe a rethink. I’m loving Anvil for solo development but this whole collaborative/version control process is really clunky and error prone, and the ‘organisation’ feature of other colleagues being able to change the source code directly with no notification to the original author is kind of dangerous imho.

Thanks @stefano.menci. Aldo and I are in the same business plan actually but team development within Anvil is still pretty restrictive/error prone:

  1. Only one of us can work on the code at any one time unless we clone the app (as if we weren’t in the same business plan/team - so it defeats the point somewhat).
  2. Apart from the new saved title in the Version History, we have no way of knowing the actual changes/diffs which our co-workers have made, unless we either inspect all code manually in Anvil, or make a Git clone and compare/merge/manage outside of Anvil and re-import every time.
  3. I think I’ve been following the process suggested by @stucork (Community app for Corona Virus 'Lock-down') but being quite new to Git/Github/Anvil and in the absence of a step by step beginners’ tutorial, it’s quite possible I’m not! For example when I cloned to a local repository on my computer, I was unable to push it back to Github even when I created a new Github account with the same email as this Anvil account, and logged on to the Github client using this new account:

I don’t understand or use SSH keys so maybe that’s where I’m going wrong, but again, the posts/tutorials already mentioned in this discussion aren’t explicit enough or beginner-friendly enough for me to be sure.

@bridget sorry to sound so negative, but everything else in my Anvil journey so far has been simple and intuitive and feature rich and quick to get up and running, but collaborative working and in-built version control/dev-test-production management are holding Anvil back from being a ‘serious’ product-set imho, especially for the price tag of a business account. I don’t mean to sound like a grumpy/ungrateful customer when Meredydd was so hugely generous in the first place, but I hope you find this candid feedback helpful for making Anvil even more attractive to (paying!) business users. Cheers!

I think git is one of those things in anvil that makes it great - like html/css/javascript - you don’t need it, but it’s there if you already know it/want to use it.

Maybe if you have questions about git you can move them to a separate thread and we can help where we can. It might be helpful for others who are trying to get to grips with using git and anvil for collaboration in the future.

Off the top of my head - one issue you may have faced is that anvil will ‘save automatically’ which is great for not losing your code, but a bit tricksy if you’re new to git and want to push changes. You often have to force commit changes to anvil apps from your local repository because the commit histories don’t line up.

with ssh keys here’s a nice tutorial online that got me started:

https://youtu.be/hQWRp-FdTpc
and his related git gist
SSH & DevOps Crash Course Snippets · GitHub

1 Like

Sorry, I missed that.

Two members of a team can work on the same app, but not concurrently, because there is only one branch.

The only way to simulate multiple branches is to have 3 apps, one prod plus one per member.
Each member develops on its own app/branch, and when they are ready they pull both the dev and their app to their computer, merge the changes of the dev into the prod and push.

The result is that the development app will show one commit per merge and will look clean. Yes, a little clunky, but I’ve done it and it’s manageable.

2 Likes

Found A Native Python Implementation for you!!!

Well, not entirely native, and here comes a little story:

Maps are hard. Spheres are hard. The Earth is beyond ginormous. To find the needle in the haystack, i.e User, takes A LOT of very smart code crunching. That’s exactly what Google did with Google Maps and Chrome V8.

Testament to their labour: Both the solutions I sent rely on the exact same underlying API. Sure, I can throw a curl call and get your location from a third party. But that’s NOT THIS USE CASE.

You need PRECISE locations. Sometimes maybe even indoors. That means you need hardware access to your client via their browser. And I’m sorry, but the only way to do that easily and effectively is using the browsers’ built in html 5 geolocation API. You can also attempt to triangulate based on WiFi signal strengths, which is available on Android and nowhere else, since that again, is quite complicated and requires a bit more than that “old college try” if you want to build that yourself.

1 Like

btw thanks for doing this. Not only for a nice app idea but for someone coming back to the platform its a nice refresher on how to do some things most apps always need, EULA’s, User Profiles, etc.

1 Like

UPDATE: I’m excited to say we have a Minimum Viable Product and @aldo.ercolani is already working on localisation for Italy…

https://anvil.works/build#clone:P33PVE5OAIUCIJY3=TH42XLEGYI2TOLUOUTEK7QAO

And here’s the UK Test version: https://wgaca-uk-test.anvil.app/

Please use the Contact Us button on the homepage for logging bugs and suggestions. Thanks!

2 Likes

Hey @AWSOM!

Fork Changelog:

  • Created a more modern and representative Logo Design so as to not limit the usage of the Software to emergency situations.
  • Generated and uploaded favicon package from realfavicongenerator.net (see assets)
  • Added modern fonts from google fonts to the Native Libraries, and renamed all the .html files to break bindings whilst inserting the standard-html page for fallback
  • Removed unnecessary repetitions of Logo (manual rewrite of built in anvil functions? why?)
    *started fixing theme.css (classes spread out across files not useful as css gets compiled to single file anyway. Python and grepping :neutral_face:)

I’m going to continue playing around with it and I’ll post another update in the future. Feel free to use whatever you can for whatever purpose!

1 Like

PS: If you’re on android, and you use chrome, you can add the app to your home screen and then it makes a lovely Icon and you get a Splash Screen!

1 Like

Thanks so much @hjp!

  • Very clever new logo and actually I think “Reciprocity” is a brilliant name too. Unfortunately I’ve already printed 500 paper leaflets with the old logo and “WGACA” name to share with neighbours here in London so would like to keep the old branding for now please. Could you revert to the original logo just for now please?

  • Love the new fonts and icons… Really improves the look, thank you.

  • Regarding the repeated Logo, I wasn’t aware I was overwriting the built in anvil functions, so it wasn’t intentional… it’s still only a week since I started working with Anvil so thanks for spotting this!

  • When I tried just now, the menu buttons disappear after logging in for me, but reappear (and unhelpfully force you back to the About page) when you refresh the page manually.

  • Regarding CSS - this is unknown territory for me, so many thanks for anything you can do to improve things either structurally or visually. I also tried (unsuccessfully) to set up Roles for Green/Red/Blue buttons rather than hard-coding the colours into my actual code, so if you’re able to work your magic there that would be really helpful too, thanks.

Finally I’m not sure what kind of subscription you have at the moment but would it help you to be added to our Business Account?

All the best and thanks for getting involved!
Peter

I’m so glad you like it! Apologies for being verbose:

The app is named as “Reciprocity-WGACA” purposefully to show that WGACA has full IP ownership. I’d be honoured if you would keep the name for the production/commercial release. To change out the logo design now would be difficult, see the assets directory for details.

I’d recommend we continue independently with development for now, with the Reciprocity-WGACA app acting as a project-specific code snippet source for the main test version you released and then your flyers stay the same. (I might make new flyer designs if we can get this out as a “Powered by Anvil.Works” showcase app!)

Fonts can be changed anytime, but the current selection was carefully considered to reflect the origin of the Software i.e academic/english/community as well as to fit with the new design.

What I meant by re-writing built in Anvil functions => :hover | :focus , was done manually in the form code.

A very funny error I kept getting when deleting images. Somehow they were bound to the underlying panel and gave a critical error when absent upon a self_panel_refresh_contents call on the homescreen. I’m going to play with it some more but that’s what is causing your observed behaviour. (I broke someones shim!)

Regarding CSS; Anvil does indeed seem to have a full implementation thereof, BUT, it’s a strange one. For example, the Material Design look, didn’t look right to me, so I started swapping out entire themes and I have a lot of testing and digging to do to figure out how Anvil plays with CSS’s underlying nuances and quirks…

I’m continuing parallel development on everything, because it produced fascinating bugs so far. I’m also going to be adding in some Python Libraries and code that might make everyone’s lives easier.

So please continue as if nothing has changed! It goes MVP=>Alpha=>Beta=>Production. You just released the MVP, and I just jumped the gun and started with Alpha.

I already have an Individual Account which allows me a full Python 3.7+ Server Environment, so all the code I fix should work perfectly if you copy it over to the MVP.

Welcome to Hyper Reality, where we build the past from parts of the future :wink:

1 Like

Also, Reciprocity is the 2nd iteration;

See first edits here:

1 Like

@hjp worth sharing the clone rather than the link to the live app so that @AWSOM can did around your code base more easily…

Hi, first of all I hope you are safe and that you get full recovery. This is a great thread that gives me some flashbacks. I was the Integration Manager for urb-it, a Stockholm based Swedish startup that then went official and a publicly traded company. The company expanded to Paris and London and other cities. It is focusing on Premium Deliver Services. Delivery within the hour, you shop we collect & handover. We hade a cloud and mobile first ecosystem. We trained thousands of students of providing per delivery upfront payment gigeconomy style. I had a lot of integrations and handled APIs and all the integrations with retailer stores and walked the landscape of ranging an area and handled pickup locations. Most difficult was the retailer quality in promising a stock level availbility on a given store. I did a lot of Python to solve the hard stuff back then. I am just now learning Anvil the hard way. Learning by doing and networking.
I am just thrilled over what can be built with Anvil in a much smarter way and ex. Stripe built in. In the end it comes down to assets, events, location and matching. I am in the process of doing a more generalised , distributed and suburban similar thing. If you need help with Swedish perhaps I can help ? Though the cool name in english perhaps does not apply in Sweden. I want to share my knowledge of the concepts which has some overlaps but was with a more commercial interrest in mind. There where a lot of similar architectural decisions made everyday. I love this idea of more locally connecting the dots also with a more none-commercial approach or with a lower cost of the service - or even free - ( someone else is paying for it ). Provide a video link https://drive.google.com/open?id=1lfqMeXSUhOO43uAN2TimV8_V1tC3l0-e

1 Like