-
Notifications
You must be signed in to change notification settings - Fork 1
Bsky #9
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
Merged
Merged
Bsky #9
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
659bc24
Change API calls from Twitter to Bluesky
rachelwillow 861e9bd
Change API calls from Twitter to Bluesky
rachelwillow c3ed5aa
Move Behave features directory
rachelwillow f0e57dc
Behave tests pass again
rachelwillow 57b208e
Add html templates for 401 and 500 error codes (see app.py)
rachelwillow 4ac0ee1
Fix results page not loading correctly and add shiny new favicon
rachelwillow d4ef74e
Merge branch 'bsky' of github.com:bluto-dev/bluto into bsky
rachelwillow 8a5433a
Ruff format and lint
rachelwillow 2d62679
Update requirements
rachelwillow a84c91d
Add Behave testing to CI
rachelwillow 909d59c
Persist the API client session using an exported session string
rachelwillow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,7 @@ jobs: | |
|
|
||
| - name: Check format/lint | ||
| run: ruff check | ||
|
|
||
| - name: Behave testing | ||
| working-directory: ./bluto | ||
| run: behave | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,4 +8,5 @@ flaskr.egg-info/ | |
| .env | ||
| venv | ||
| *.swp | ||
| .ruff_cache | ||
| .ruff_cache | ||
| session.txt | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| """Create an application instance.""" | ||
|
|
||
| from bluto.app import create_app | ||
|
|
||
| app = create_app() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import behave | ||
| import markov as mk | ||
|
|
||
| from pathlib import Path | ||
|
|
||
|
|
||
| # Given | ||
| @given("a list of tweets") | ||
| def step_impl(context): | ||
| with Path.open("features/test_tweets.txt") as f: | ||
| content = f.readlines() | ||
| tweets = [x.strip() for x in content] | ||
| context.tweet_list = tweets | ||
|
|
||
|
|
||
| # When | ||
| @when("we generate a {number:d} of new {length:d} character tweets") | ||
| def step_impl(context, number, length): | ||
| data = mk.make_markov_model(context.tweet_list) | ||
| context.new_tweet_list = [data.make_short_sentence(length) for i in range(number)] | ||
| assert not (None in context.new_tweet_list) | ||
|
|
||
|
|
||
| # Then | ||
| @then("the {new_number:d} and {new_length:d} of tweets is correct") | ||
| def step_impl(context, new_number, new_length): | ||
| assert len(context.new_tweet_list) == new_number | ||
| assert len(max(context.new_tweet_list, key=len)) <= new_length |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| """The public module, including the homepage and user auth.""" | ||
|
|
||
| from . import views # noqa: F401 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| {% extends "layout.html" %} | ||
|
|
||
| {% block page_title %}Unauthorized{% endblock %} | ||
| {% block header %}Unauthorized{% endblock %} | ||
|
|
||
| {% block content %} | ||
| <div class="jumbotron"> | ||
| <div class="text-center"> | ||
| <h1>404</h1> | ||
| <p>Sorry, this request is unauthorized.</p> | ||
| <p>Want to <a href="{{ url_for('public.index') }}">go home</a> instead?</p> | ||
| </div> | ||
| </div> | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| {% extends "layout.html" %} | ||
|
|
||
| {% block page_title %}Internal Service Error{% endblock %} | ||
| {% block header %}Internal Service Error{% endblock %} | ||
|
|
||
| {% block content %} | ||
| <div class="jumbotron"> | ||
| <div class="text-center"> | ||
| <h1>500</h1> | ||
| <p>Sorry, there has been an error and the request could not be completed.</p> | ||
| <p>Want to <a href="{{ url_for('public.index') }}">go home</a> instead?</p> | ||
| </div> | ||
| </div> | ||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,4 +20,4 @@ environs==14.1.1 | |
|
|
||
| # Markov | ||
| markovify==0.7.1 | ||
| python-twitter==3.4.1 | ||
| atproto==0.0.59 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this was added to requirements/prod.txt