diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0b24b9..e2192e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -172,10 +172,7 @@ The project's CLI is not using click because it is an external dependency. The g │   ├── __main__.py # The entry point for the project │   └── VERSION # The version for the project is kept in a static file ├── README.md # The main readme for the project -├── setup.py # The setup.py file for installing and packaging the project -├── requirements.txt # An empty file to hold the requirements for the project -├── requirements-test.txt # List of requirements for testing and devlopment -├── setup.py # The setup.py file for installing and packaging the project +├── pyproject.toml # Configuration file used by packaging tools └── tests # Unit tests for the project (add mote tests files here) ├── conftest.py # Configuration, hooks and fixtures for pytest ├── __init__.py # This tells Python that this is a test package diff --git a/MANIFEST.in b/MANIFEST.in index 731ca3e..4edf8c1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include LICENSE include HISTORY.md -include requirements graft tests graft earth_osm \ No newline at end of file diff --git a/Makefile b/Makefile index 31fb843..44cd7c4 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ show: ## Show the current environment. .PHONY: install install: ## Install the project in dev mode. @echo "Don't forget to run 'make virtualenv' if you got errors." - $(ENV_PREFIX)pip install -e .[test] + $(ENV_PREFIX)pip install -e .[dev] .PHONY: fmt fmt: ## Format code using black & isort. @@ -67,7 +67,7 @@ virtualenv: ## Create a virtual environment. @rm -rf .venv @python3 -m venv .venv @./.venv/bin/pip install -U pip - @./.venv/bin/pip install -e .[test] + @./.venv/bin/pip install -e .[dev] @echo @echo "!!! Please run 'source .venv/bin/activate' to enable the environment !!!" @@ -90,7 +90,7 @@ api-docs: ## Generate the API documentation. echo "There are uncommitted changes. Stash or commit changes first"; \ else \ echo "Generating API documentation..."; \ - $(ENV_PREFIX)pip install -r requirements-docs.txt; \ + $(ENV_PREFIX)pip install -r .[docs]; \ $(ENV_PREFIX)lazydocs \ --output-path="./docs/api-docs" \ --overview-file="README.md" \ diff --git a/README.md b/README.md index b33d6a8..3334811 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ To contribute to earth-osm, follow these steps: 3. Install the development dependencies: ```bash pip install git+https://github.com/pypsa-meets-earth/earth-osm.git - pip install -r requirements-test.txt + pip install -r .[test] ``` 4. Read the [CONTRIBUTING.md](CONTRIBUTING.md) file for more detailed information on how to contribute to the project. diff --git a/pyproject.toml b/pyproject.toml index dd1b32e..6158954 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ Homepage = "https://github.com/pypsa-meets-earth/earth-osm/" Issues = "https://github.com/pypsa-meets-earth/earth-osm/issues" [project.optional-dependencies] -test = [ +dev = [ "pytest", "coverage", "flake8", @@ -46,6 +46,14 @@ test = [ "mkdocs", "osmium", ] +docs = [ + "lazydocs", + "mkdocs", + "mkdocs-material", + "mkdocs-awesome-pages-plugin", + "mkdocstrings[python]", + "markdown-include", +] [console_scripts] earth_osm = "earth_osm.__main__:main" diff --git a/requirements-docs.txt b/requirements-docs.txt deleted file mode 100644 index fe1d957..0000000 --- a/requirements-docs.txt +++ /dev/null @@ -1,6 +0,0 @@ -lazydocs -mkdocs -mkdocs-material -mkdocs-awesome-pages-plugin -mkdocstrings[python] -markdown-include \ No newline at end of file diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 881b399..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,12 +0,0 @@ -pytest -coverage -flake8 -black -isort -pytest-cov -codecov -mypy>=0.9 -gitchangelog -mkdocs -pprint -osmium \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 3825b78..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -geopandas -pandas -tqdm -requests -protobuf>=4.21.1 \ No newline at end of file