From 7d630915b6f1c4955a2bb2ba6506c3e49f10e20d Mon Sep 17 00:00:00 2001 From: David Carmichael Date: Thu, 8 Aug 2024 21:00:48 +0100 Subject: [PATCH] feat: add CONTRIBUTING.md, move setup instructions to CONTRIBUTING.md form README.md --- CONTRIBUTING.md | 114 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 94 --------------------------------------- pyproject.toml | 3 +- 3 files changed, 116 insertions(+), 95 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..7d3a3d26 --- /dev/null +++ b/CONTRIBUTING.md @@ -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 +``` diff --git a/README.md b/README.md index dd53e423..32154841 100644 --- a/README.md +++ b/README.md @@ -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 -``` diff --git a/pyproject.toml b/pyproject.toml index 5140da07..f27fd794 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = "david@uilix.com" }] readme = "README.md" @@ -55,6 +55,7 @@ exclude = [ "tests_docker", ".gitignore", ".env", + "CONTRIBUTING.md", ] [tool.mypy]