Skip to content

Commit

Permalink
feat: add CONTRIBUTING.md, move setup instructions to CONTRIBUTING.md…
Browse files Browse the repository at this point in the history
… form README.md
  • Loading branch information
CheeseCake87 committed Aug 8, 2024
1 parent aafa19d commit 7d63091
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 95 deletions.
114 changes: 114 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
## Contributing to Flask-Imp

Thank you for considering contributing to Flask-Imp.

Here's what to do next:

1. Fork the repository.
2. Create a new branch.
3. Make your changes.
4. Run the tests.
5. Push your changes.
6. Create a pull request.

## Working on this project.

### Setup.

**Create a new project folder and navigate to it in the terminal, then clone this repository.**

```bash
git clone https://github.com/CheeseCake87/flask-imp.git
```

### Create a virtual environment and activate it.

**Linux / MacOS**

```bash
python3 -m venv venv
```

```bash
source venv/bin/activate
```

**Windows**

```bash
python -m venv venv
```

```bash
.\venv\Scripts\activate
```

### Install the requirements.

```bash
pip install -r requirements/dev.txt
```

### Install the local version of Flask-Imp.

```bash
flit install
```

### Create a new app.

```bash
flask-imp init --name app --full
```

### Run the included Flask app.

```bash
Flask run --debug
```

### Run the tests.

```bash
pytest
```

### Run the tests under multiple Python versions using docker.

```bash
python3 tests_docker
```

### Type checking.

```bash
mypy
```

```bash
pyright
```

### Info

The tests are located in the `tests` folder.

The test Flask app is located in the `tests/test_app` folder.

The tests are linked to the `tests` blueprint located at `tests/test_app/blueprints/tests`.

### Building the docs.

All docs are generated from the [docs](docs) folder.

Edit these files, then run the following command to generate the docs.

```bash
flask --app docs compile
```

You can set it to watch for changes and automatically recompile the docs by adding the `--watch` flag.

```bash
flask --app gdocs compile --watch
```
94 changes: 0 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,97 +63,3 @@ pip install flask-imp
```bash
flask-imp init
```

---

## Working on this project.

### Setup.

**Create a new project folder and navigate to it in the terminal, then clone this repository.**

```bash
git clone https://github.com/CheeseCake87/flask-imp.git
```

### Create a virtual environment and activate it.

**Linux / MacOS**

```bash
python3 -m venv venv
```

```bash
source venv/bin/activate
```

**Windows**

```bash
python -m venv venv
```

```bash
.\venv\Scripts\activate
```

### Install the requirements.

```bash
pip install -r requirements/dev.txt
```

### Install the local version of Flask-Imp.

```bash
flit install
```

### Create a new app.

```bash
flask-imp init --name app --full
```

### Run the included Flask app.

```bash
Flask run --debug
```

### Run the tests.

```bash
pytest
```

### Run the tests under multiple Python versions using docker.

```bash
python3 tests_docker
```

### Info

The tests are located in the `tests` folder.

The test Flask app is located in the `tests/test_app` folder.

The tests are linked to the `tests` blueprint located at `tests/test_app/blueprints/tests`.

### Building the docs.

All docs are generated from the [docs](docs) folder.

Edit these files, then run the following command to generate the docs.

```bash
flask --app docs compile
```

You can set it to watch for changes and automatically recompile the docs by adding the `--watch` flag.

```bash
flask --app gdocs compile --watch
```
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "flask-imp"
version = "5.2.0"
version = "5.2.1"
description = 'A Flask auto importer that allows your Flask apps to grow big.'
authors = [{ name = "David Carmichael", email = "[email protected]" }]
readme = "README.md"
Expand Down Expand Up @@ -55,6 +55,7 @@ exclude = [
"tests_docker",
".gitignore",
".env",
"CONTRIBUTING.md",
]

[tool.mypy]
Expand Down

0 comments on commit 7d63091

Please sign in to comment.