-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add casefold to sorting * add IPython to test * change test * update README.md
- Loading branch information
1 parent
63ccce9
commit c1e06c3
Showing
3 changed files
with
66 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,63 @@ | ||
# pydeps2env | ||
|
||
An easy way to create conda environment files from you python project dependencies. | ||
Creates a conda `environment.yml` file from python package dependencies listed in a `setup.cfg` or `pyproject.toml` file. | ||
Creates a conda `environment.yml` file from python package dependencies listed in a `pyproject.toml` or `setup.cfg` file. | ||
|
||
## basic usage | ||
|
||
By default, the action will parse a `setup.cfg` file in your root directory into `environment.yml`. Here is an example | ||
By default, the action will parse a `pyproject.toml` file in your root directory into `environment.yml`. Here is an example | ||
of a simple setup: | ||
|
||
```yaml | ||
steps: | ||
- uses: CagtayFabry/[email protected].0 | ||
- uses: CagtayFabry/[email protected].2 | ||
``` | ||
```cfg | ||
[options] | ||
python_requires = >=3.8,<3.10 | ||
setup_requires = | ||
setuptools >=38.3.0 | ||
setuptools_scm | ||
install_requires = | ||
numpy >=1.20 | ||
pandas >=1.0 | ||
|
||
[options.extras_require] | ||
test = | ||
pytest | ||
```toml | ||
[project] | ||
requires-python = ">=3.8,<3.10" | ||
dependencies = [ | ||
"numpy >=1.20", | ||
"pandas >=1.0", | ||
"IPython", | ||
"boltons", | ||
] | ||
[project.optional-dependencies] | ||
test = ["pytest"] | ||
pip_only = ["bidict"] | ||
] | ||
``` | ||
|
||
The default parameters will output this `environment.yml`: | ||
The default parameters will output this sorted `environment.yml`: | ||
|
||
```yaml | ||
channels: | ||
- defaults | ||
dependencies: | ||
- python>=3.8 | ||
- boltons | ||
- IPython | ||
- numpy>=1.20 | ||
- pandas>=1.0 | ||
- python>=3.8,<3.10 | ||
``` | ||
A full output with options `--setup_requires include --extras test pip_only --pip bidict` | ||
|
||
```yaml | ||
channels: | ||
- defaults | ||
dependencies: | ||
- boltons | ||
- IPython | ||
- numpy>=1.20 | ||
- pandas>=1.0 | ||
- pytest | ||
- python>=3.8,<3.10 | ||
- setuptools>=40.9.0 | ||
- setuptools_scm | ||
- wheel | ||
- pip: | ||
- bidict | ||
``` | ||
|
||
## configuration options | ||
|
@@ -84,33 +105,35 @@ steps: | |
pip: 'bidict' | ||
``` | ||
|
||
```cfg | ||
[options] | ||
python_requires = >=3.8,<3.10 | ||
setup_requires = | ||
setuptools >=38.3.0 | ||
setuptools_scm | ||
install_requires = | ||
numpy >=1.20 | ||
pandas >=1.0 | ||
bidict | ||
[options.extras_require] | ||
test = | ||
pytest | ||
```toml | ||
[project] | ||
requires-python = ">=3.8,<3.10" | ||
dependencies = [ | ||
"numpy >=1.20", | ||
"pandas >=1.0", | ||
"IPython", | ||
"boltons", | ||
] | ||
[project.optional-dependencies] | ||
test = ["pytest"] | ||
pip_only = ["bidict"] | ||
] | ||
``` | ||
|
||
```yaml | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python>=3.8,<3.10 | ||
- setuptools>=38.3.0 | ||
- setuptools_scm | ||
- boltons | ||
- IPython | ||
- numpy>=1.20 | ||
- pandas>=1.0 | ||
- pytest | ||
- python>=3.8,<3.10 | ||
- setuptools>=40.9.0 | ||
- setuptools_scm | ||
- wheel | ||
- pip: | ||
- bidict | ||
- bidict | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,19 @@ author = "Cagtay Fabry <[email protected]>" | |
author_email = "[email protected]" | ||
|
||
requires-python = ">=3.8,<3.10" | ||
|
||
dependencies = [ | ||
"numpy >=1.20", | ||
"pandas >=1.0", | ||
"IPython", | ||
"boltons", | ||
] | ||
|
||
[project.urls] | ||
home_page = "https://github.com/CagtayFabry/pydeps2env" | ||
|
||
[project.optional-dependencies] | ||
test = ["pytest"] | ||
pip_only = ["bidict"] | ||
|
||
[project.urls] | ||
home_page = "https://github.com/CagtayFabry/pydeps2env" | ||
|
||
# Build system config, pip creates a temporary env with "requires" pkgs. | ||
[build-system] | ||
requires = [ | ||
|