Giter VIP home page Giter VIP logo

Comments (11)

juyrjola avatar juyrjola commented on September 23, 2024 1

Thanks a lot, @akx!

from wagtail-svgmap.

juyrjola avatar juyrjola commented on September 23, 2024

Would be great! PR much appreciated. =)

from wagtail-svgmap.

stuaxo avatar stuaxo commented on September 23, 2024

Any idea how I've broken these unit tests?

https://travis-ci.org/City-of-Helsinki/wagtail-svgmap/jobs/338979401

Probably something silly I've done, but might be something more easily fixed by someone that knows the codebase ?

from wagtail-svgmap.

akx avatar akx commented on September 23, 2024

Since dependencies haven't been locked (which is a good idea for a library like this), it's just "test rot" as dependencies have changed between the last successful test and this.

Among others (which I elided here for brevity), these have updated:

Django 1.10.2 -> 1.11.10
django-modelcluster 2.0 -> 3.1
django-taggit 0.18.3 -> 0.22.2
django-treebeard 4.0.1 -> 4.2.0
djangorestframework 3.4.7 -> 3.6.4
Pillow 3.4.1 -> 5.0.0
wagtail 1.6.3 -> 1.13.1
Willow-0.3.1 -> Willow 1.0

The test_page_creation test with this

>       assert example_map_option.get('selected')
E       assert ''
E        +  where '' = <bound method Tag.get of <option selected="" value="1">Example Map ZsbCrN2Ir3Sm</option>>('selected')
E        +    where <bound method Tag.get of <option selected="" value="1">Example Map ZsbCrN2Ir3Sm</option>> = <option selected="" value="1">Example Map ZsbCrN2Ir3Sm</option>.get

failure could be that Wagtail or Django has changed the way selected gets serialized in the admin. The simple fix is likely to just change assert example_map_option.get('selected') to assert example_map_option.get('selected') is not None.

The second failure has to do with what the view's context contains. It's obviously used to contain form at some point, but it might be something else like delete_form with the new package versions.

from wagtail-svgmap.

akx avatar akx commented on September 23, 2024

@stuaxo I fixed those issues in #15, so if you rebase #14 on top of master, you should be able to continue.

Also, I added Wagtail version variations to .travis.yml, which you should be able to use to also test against Wagtail 2.0 (beta?).

from wagtail-svgmap.

stuaxo avatar stuaxo commented on September 23, 2024

Cheers, will do.

The wagtail version is the newest 2.x on pypi, currently wagtail==2.0b1

Since they recommend projects to be on 2, I'd expect a non beta release relatively soon.

from wagtail-svgmap.

stuaxo avatar stuaxo commented on September 23, 2024

Oops, merged, not rebased, seemed to get away with it as tests pass now :)

The only complication is sorting travis - since wagtail doesn't support python 2.7.

from wagtail-svgmap.

akx avatar akx commented on September 23, 2024

Set up a build matrix exclude clause. For instance if the WAGTAIL envvar is wagtail==2.0b1, add that to the env list and then an exclude stanza like this:

matrix:
  exclude:
  - python: 2.7
    env: WAGTAIL=WAGTAIL==2.0b1

from wagtail-svgmap.

stuaxo avatar stuaxo commented on September 23, 2024

(excuse the scrappy commit history, squash these if they get merged :)

I managed to really confuse myself about build matrices - it still seems to try and build with python 2.7 on my current .travis -

https://github.com/stuaxo/wagtail-svgmap/blob/821416843fba340afd3c87365fa09d22c9e0ce87/.travis.yml

from wagtail-svgmap.

stuaxo avatar stuaxo commented on September 23, 2024

OK, commits all squashed and got everything working in the wsm_test dir.

Didn't manage to work out the excludes thing, but I'll leave that for now.

In wsm_test:

Possible breaking change is I removed the session auth middleware - it doesn't exist in 2.0 and is implicit in 1.10.

Newer wagtail needs on_delete on Foreign keys, so I set this to SET_NULL

from wagtail-svgmap.

stuaxo avatar stuaxo commented on September 23, 2024

Closed as PR was merged.

from wagtail-svgmap.

Related Issues (10)

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.