Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local development instructions #8

Merged
merged 4 commits into from
May 21, 2019

Conversation

Sjors
Copy link
Contributor

@Sjors Sjors commented Apr 30, 2019

There may also be a Docker way to do this, but the following worked for me.

I had to make /var/lib/config/isso.cfg and /var/lib/db/comments.db configurable for this to work.

```sh
export ISSO_CONFIG_PATH=$PWD
export COMMENTS_DB_PATH=$PWD
docker_boot.py & gunicorn patron:app
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't check if docker_boot.py actually does anything.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker_boot.py makes continual GET requests to ensure that settings load. Certain settings won't load until an initial GET request is received.

@Sjors
Copy link
Contributor Author

Sjors commented Apr 30, 2019

When running the tests one test fails with:

test_client = <FlaskClient <Flask 'app'>>, new_user = <User test>

    def test_scheduler(test_client, new_user):
        messages = []

        @email_dispatched.connect
        def suppressed_mail(message):
            messages.append(message)

>       message = messages[0]
E       IndexError: list index out of range

tests/functional/test_scheduler.py:11: IndexError

@JeffVandrewJr
Copy link
Owner

JeffVandrewJr commented May 1, 2019

I appreciate this; thank you.

As you mention, it's a known issue that the scheduler testing fails (despite the scheduler currently working correctly in production), which should probably be fixed before any local development instructions are posted. I've added #10 to reflect this.

Do you have any interest on working on fixing this one nagging scheduler test?

@Sjors
Copy link
Contributor Author

Sjors commented May 6, 2019

I don't think fixing the test suite is a prerequisite. I'm not familiar enough with the framework to be of much using trying to repair a test yet. Hopefully these instructions lead to more developers who can help out in fixing it?

@JeffVandrewJr
Copy link
Owner

@Sjors Update: I fixed the tests so they all now pass. I still need to test the changes in this PR before I merge though.

@Sjors
Copy link
Contributor Author

Sjors commented May 7, 2019

I rebased my PR on top of the latest master. The scheduler test takes 60 seconds which is annoying, but at least it passes.

@JeffVandrewJr
Copy link
Owner

@Sjors Yeah it has to wait for the scheduler; to make it go faster than a minute I'd have to refactor the scheduler stuff to accept a seconds input, which could be something for the future but not right now.

@JeffVandrewJr
Copy link
Owner

@Sjors I haven't forgotten about this; I've been busy helping some new users but should have this merged soon.

@JeffVandrewJr JeffVandrewJr merged commit 18cda4c into JeffVandrewJr:master May 21, 2019
@JeffVandrewJr
Copy link
Owner

@Sjors Everything was good, so this is all merged!

Thanks again!

@Sjors Sjors deleted the 2019/04/dev branch May 22, 2019 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants