10000 Clearer contribution docs & add troubleshooting page (#597) · gytdev/pyscript@cede06a · GitHub
[go: up one dir, main page]

Skip to content

Commit cede06a

Browse files
Clearer contribution docs & add troubleshooting page (pyscript#597)
* Expanded upon the make setup docs * Fixed formatting & speling, added troubleshooting * same * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 19491d8 commit cede06a

File tree

2 files changed

+45
-14
lines changed

2 files changed

+45
-14
lines changed

CONTRIBUTING.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,51 +16,64 @@ Thank you for wanting to contribute to the PyScript project!
1616
* [Becoming a maintainer](#becoming-a-maintainer)
1717
* [Trademarks](#trademarks)
1818

19-
## Code of Conduct
19+
# Code of Conduct
2020

2121
The [PyScript Code of Conduct](https://github.com/pyscript/governance/blob/main/CODE-OF-CONDUCT.md) governs the project and everyone participating in it. By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers or administrators as described in that document.
2222

23-
## Contributing
23+
# Contributing
2424

25-
### Reporting bugs
25+
## Reporting bugs
2626

2727
Bugs are tracked on the [project issues page](https://github.com/pyscript/pyscript/issues). Please check if your issue has already been filed by someone else by searching the existing issues before filing a new one. Once your issue is filed, it will be triaged by another contributor or maintainer. If there are questions raised about your issue, please respond promptly.
2828

29-
#### Creating useful issues
29+
## Creating useful issues
3030

3131
* Use a clear and descriptive title.
3232
* Describe the specific steps that reproduce the problem with as many details as possible so that someone can verify the issue.
3333
* Describe the behavior you observed, and the behavior you had expected.
3434
* Include screenshots if they help make the issue clear.
3535

36-
### Reporting security issues
36+
## Reporting security issues
3737

3838
If you aren't confident that it is appropriate to submit a security issue using the above process, you can e-mail it to security@pyscript.net
3939

40-
### Asking questions
40+
## Asking questions
4141

4242
If you have questions about the project, using PyScript, or anything else, please ask in the [PyScript forum](https://community.anaconda.cloud/c/tech-topics/pyscript).
4343

44-
### Setting up your environment
44+
# Setting up your local environment
4545

46-
* clone the repo
46+
* Clone the repo using
4747
```
4848
git clone https://github.com/pyscript/pyscript
4949
```
50-
* cd into the main project folder
50+
* cd into the `pyscriptjs` folder using the line below in your terminal (if your terminal is already in pyscrpit then use **cd pyscriptjs** instead)
5151
```
5252
cd pyscript/pyscriptjs
5353
```
54-
* install the dependencies with npm install - make sure to use nodejs version >= 16
54+
* Install the dependencies with the command below
55+
56+
```
57+
make setup
58+
```
59+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **NOTE**: If `make setup` gives a node/npm version required error then go to [troubleshooting](https://github.com/pyscript/governance/blob/main/TROUBLESHOOTING.md)
60+
61+
* You can also run the examples localy by running the command below in your terminal
5562
```
56-
npm install
63+
make example
5764
```
58-
* run npm run dev to build and run the dev server. This will also watch for changes and rebuild when a file is saved.
65+
* Run ***npm run dev*** to build and run the dev server. This will also watch for changes and rebuild when a file is saved.
5966
```
6067
npm run dev
6168
```
69+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **NOTE**: To access your local build paste `http://localhost:8080` into your browser
70+
71+
* When you make changes locally, double check that your contribution follows the PyScript formatting rules by running `npm run lint`. Note that in this case you're looking for the errors, <u>**NOT**</u> the warnings (Unless the warning is created by a local change). If an error is found by lint you should fix it <u>**before**</u> creating a pull request
72+
73+
74+
Now that node and npm have both been updated `make setup` should work, and you can continue [setting up your environment](#setting-up-your-environment) without problems (hopefully).
6275

63-
### Places to start
76+
## Places to start
6477

6578
If you would like to contribute to PyScript, but you aren't sure where to begin, here are some suggestions.
6679

@@ -69,7 +82,7 @@ If you would like to contribute to PyScript, but you aren't sure where to begin,
6982
* **Look over the open pull requests.** Do you have comments or suggestions for the proposed changes? Add them.
7083
* **Check out the examples.** Is there a use case that would be good to have sample code for? Create an example for it.
7184

72-
### Submitting a change
85+
# Submitting a change
7386

7487
All contributions must be licensed Apache 2.0, and all files must have a copy of the boilerplate license comment (can be copied from an existing file).
7588

TROUBLESHOOTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Troubleshooting
2+
3+
This page is meant for troubleshooting common problems with PyScript.
4+
5+
## Table of contents:
6+
* [Make Setup](#make-setup)
7+
8+
## Make setup
9+
10+
A lot of problems related to `make setup` are related to node and npm being outdated. Once npm and node are updated, `make setup` should work. You can follow the steps on the [npm documentation](https://docs.npmjs.com/try-the-latest-stable-version-of-npm)to update npm (the update command for Linux should work for Mac as well). Once npm has been updated you can continue to the instructions to update node below.
11+
12+
To update Node run the following commands in order (Most likely you'll be prompted for your user password, this is normal):
13+
14+
```
15+
sudo npm cache clean -f
16+
sudo npm install -g n
17+
sudo n stable
18+
```

0 commit comments

Comments
 (0)
0