-
Notifications
You must be signed in to change notification settings - Fork 63
Add steps for ensuring pre-commit hooks are installed #416
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
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e5fa18d
Add steps for ensuring pre-commit hooks are installed
dragid10 e24f6db
Add .idea folder to gitignore
dragid10 d8f16b8
Add steps for running tests and linters/formatters
dragid10 38cd5c0
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
dragid10 2108766
Retain trace logs on failure
dragid10 db952b3
Add tracing to playwright tests
dragid10 63d46d5
Run tracing action regardless of test status
dragid10 53bd37f
Fix folder where test results will upload
dragid10 bea0117
Use proper tests dir
dragid10 d6a5b28
Actually turn on tracing and upload the resulting failed results
dragid10 2d3870c
Use jekyll serve detach command
dragid10 5bf3807
Add macos, jetbranins and vscode to gitignore
dragid10 ad7f414
Remove sleep fixture
dragid10 d44ff4f
Use standard python comparison operator
dragid10 3605f87
Add explanation to test assertion
dragid10 90e624c
Fix linting issues
dragid10 07fc1ab
Merge pull request #1 from dragid10/fix-playwright-tests
dragid10 7222b89
Merge branch 'gh-pages' into gh-pages
dragid10 937529c
Pull upstream changes
dragid10 349509e
Use white theme for images
dragid10 bebee3a
Remake changes in CONTRIBUTING file
dragid10 3851a17
Remove unneeded test-results folder
dragid10 a02f0c7
Revert .gitignore
dragid10 3ad0efa
Revert to base readme
dragid10 1f1a87b
Merge branch 'upstream-gh-pages' into gh-pages
dragid10 a04d7c0
Use white theme to stay consistent
dragid10 6c25c62
Increase GH action job to 30 mins
dragid10 368e725
Run linter to fix linting errors
dragid10 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 |
---|---|---|
|
@@ -15,3 +15,4 @@ _site/ | |
.bundle/ | ||
vendor/ | ||
2 | ||
/.idea/ |
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 | ||||
---|---|---|---|---|---|---|
|
@@ -12,6 +12,114 @@ This repo is the [GitHub Pages](https://pages.github.com/) website, built in Jek | |||||
|
||||||
Please read [Contributing to Black Python Devs](CONTRIBUTING.md) | ||||||
|
||||||
Follow these steps and note these guidelines to begin contributing: | ||||||
|
||||||
1. First step is to set up the local development environment. | ||||||
1. Bug fixes are always welcome. Start by reviewing the [list of bugs](https://github.com/BlackPythonDevs/blackpythondevs.github.io/issues). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
1. A good way to easily start contributing is to pick and work on a [good first issue](https://github.com/BlackPythonDevs/blackpythondevs.github.io/labels/good%20first%20issue). We try to make these issues as clear as possible and provide basic info on how the code should be changed, and if something is unclear feel free to ask for more information on the issue. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
# How to Contribute | ||||||
|
||||||
## Fork the repository | ||||||
|
||||||
- To fork the repository so you have a copy of the codebase, you will click on the **"Fork"** button from the repository main page | ||||||
|
||||||
 | ||||||
|
||||||
- Clicking on the Fork button takes you to the **"Create New Fork"** page where you select the owner (your personal github account) and click on the Create fork button. | ||||||
|
||||||
 | ||||||
|
||||||
## Creating an issue | ||||||
|
||||||
- Click on the issues tab in the repository. | ||||||
|
||||||
 | ||||||
|
||||||
- Click on the green button with the label **"New issue"** and you should see the image below: | ||||||
|
||||||
 | ||||||
|
||||||
- Type in the issue title in the title textbox and type in a clear explanation of the issue in the textarea. You can add images, code snippets, etc to explain your issue. | ||||||
|
||||||
- Once you are done, you can preview your issue by selecting the Preview tab. If you are satisfied with the issue presentation, you can click on the green "Submit new issue" button to create your issue. | ||||||
|
||||||
- And that's it! If you cose to comment requesting the issue to be assigned to you, wait for a maintainer to do so. You should get an email notification of the issue being assigned to you or you can view the issue assignment in the issue page. It should look similar to this: | ||||||
|
||||||
 | ||||||
|
||||||
## Working on an issue | ||||||
|
||||||
- The easiest way to make changes and test them is by using [](https://codespaces.new/BlackPythonDevs/blackpythondevs.github.io) | ||||||
|
||||||
- You can also access the Codespaces from the repository main page: | ||||||
|
||||||
 | ||||||
|
||||||
- The web version of VSCode should open in a new tab in your browser: | ||||||
|
||||||
 | ||||||
|
||||||
- Now that you have the code editor set up, you need to install the dependencies. To do this, you have to open the code editor's terminal and run the command `bundle install`. | ||||||
|
||||||
- The easiest way to open the terminal is to click on the 3 horizontal lines (also known as hamburger) at the top left of the code editor > Terminal > New Terminal: | ||||||
|
||||||
 | ||||||
|
||||||
- In the terminal run the command `bundle install`. | ||||||
|
||||||
 | ||||||
|
||||||
- Afterwards, run the command `pip install -r requirements-dev.txt` to install the python dev dependencies. | ||||||
|
||||||
 | ||||||
|
||||||
- Install the pre-commit hooks to automatically format the code before committing. Run the command `pre-commit install`: | ||||||
|
||||||
 | ||||||
|
||||||
- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve > /dev/null 2>&1 &` or run the default **Build Task** <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>: | ||||||
|
||||||
 | ||||||
|
||||||
- The server address shows `http://127.0.0.1:4000`. This is the address for any local computer so this server will be wrong since the application is running on a remote computer so we have to get the address of that computer. We can get the address by clicking on the Ports tab next to the Terminal: | ||||||
|
||||||
 | ||||||
|
||||||
- <kbd>Ctrl</kbd> + Click on the Forwarded Address assigned to Port 4000. This will open the running application in a new tab: | ||||||
|
||||||
 | ||||||
|
||||||
### Testing Changes (create new tests as needed) | ||||||
|
||||||
- To run the test suites for the codebase | ||||||
|
||||||
- Ensure the site is running locally with `bundle exec jekyll serve > /dev/null 2>&1 &`. This will run the server in the background, and any content changes will immediately reflect on the site. | ||||||
|
||||||
 | ||||||
|
||||||
- If you need to restart the server, you can run `killall jekyll` to stop the server and then run `bundle exec jekyll serve > /dev/null 2>&1 &` to start the server again. | ||||||
|
||||||
- Run all tests in the test-suite with the command `python3 -m pytest`: | ||||||
|
||||||
 | ||||||
|
||||||
### Pushing Changes | ||||||
|
||||||
- Run `pre-commit run --all` to ensure your code is formatted and linted correctly before pushing your changes. | ||||||
|
||||||
 | ||||||
|
||||||
- Run `git commit -m "<Your commit message>"` to commit your changes. | ||||||
|
||||||
 | ||||||
|
||||||
- Finally run `git push origin <your-branch-name>` to push your changes to your fork. | ||||||
|
||||||
 | ||||||
|
||||||
- Once you’ve committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. Please ensure that you compare your feature branch to the desired branch of the repo you are supposed to make a PR to. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes in your development branch and update it. 🥳 | ||||||
|
||||||
## To Develop | ||||||
|
||||||
[](https://codespaces.new/BlackPythonDevs/blackpythondevs.github.io) | ||||||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
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.
Great work on breaking this information down. One thing I would like to do is move these steps into CONTRIBUTING.md.