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

Updating Contributing Docs #148

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 52 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,65 @@

## Developer setup

Git clone the repository:
* Create a [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of the [PyScript-CLI github repository](https://github.com/pyscript/pyscript-cli/fork) to your own GitHub account.

```shell
git clone https://github.com/pyscript/pyscript.git
```
* [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) your newly forked version of the PyScript-CLI repository onto your local development machine. For example, use this command in your terminal:

(Recommended) Upgrade local pip:
```sh
git clone https://github.com/<YOUR USERNAME>/pyscript-cli
```

```shell
pip install --upgrade pip
```
> **WARNING**: In the URL for the forked PyScript-CLI repository, remember to replace
`<YOUR USERNAME>` with your actual GitHub username.

Make a virtualenv and activate it:
* Change into the root directory of your newly cloned `pyscript-cli` repository:

```shell
python -m venv .venv
source .venv/bin/activate
```
```sh
cd pyscript-cli
```

Install your local enviroment dependencies
* Add the original PyScript-CLI repository as your `upstream` to allow you to keep your own fork up-to-date with the latest changes:

```shell
pip install -e ".[dev]"
```
```sh
git remote add upstream https://github.com/pyscript/pyscript-cli.git
```

* If the above fails, try this alternative:

```sh
git remote remove upstream
```

```sh
git remote add upstream git@github.com:pyscript/pyscript-cli.git
```

* Pull in the latest changes from the main `upstream` PyScript repository:

```sh
git pull upstream main
```

> Contribute changes using the [GitHub flow model](https://docs.github.com/en/get-started/using-github/github-flow) of coding collaboration.

* (Recommended) Upgrade local pip:

```shell
pip install --upgrade pip
```

* Make a virtualenv and activate it:

```shell
python -m venv .venv
source .venv/bin/activate
```

* Install your local enviroment dependencies

```shell
pip install -e ".[dev]"
```

## Use the CLI

Expand Down
2 changes: 1 addition & 1 deletion tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def check_plugin_project_files(
assert dedent(
f""" <div>
<h2> Description </h2>
<p>{ plugin_description }</p>
<p>{plugin_description}</p>
</div>"""
)
assert f'<py-script src="./{python_file}">' in contents
Expand Down
Loading