Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
d52780c5
Commit
d52780c5
authored
Apr 05, 2022
by
Arun Babu Neelicattu
Committed by
Randy Döring
Apr 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export: add poetry-plugin-export
parent
d18b6520
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
16 deletions
+17
-16
docs/cli.md
+12
-3
poetry.lock
+0
-0
pyproject.toml
+1
-0
tests/console/commands/test_export.py
+4
-13
No files found.
docs/cli.md
View file @
d52780c5
...
@@ -621,8 +621,13 @@ poetry export -f requirements.txt --output requirements.txt
...
@@ -621,8 +621,13 @@ poetry export -f requirements.txt --output requirements.txt
```
```
{{% note %}}
{{% note %}}
Only the `
requirements.txt
` format is currently supported.
This command is provided by the [Export Poetry Plugin](https://github.com/python-poetry/poetry-plugin-export)
This command is also available as a pre-commit hook. See [pre-commit hooks](/docs/pre-commit-hooks#poetry-export) for more information.
and is also available as a pre-commit hook. See [pre-commit hooks](/docs/pre-commit-hooks#poetry-export) for more information.
{{% /note %}}
{{% note %}}
Unlike the `
install
` command, this command only includes the project's dependencies defined in the implicit `
default
`
group defined in `
tool.poetry.dependencies
` when used without specifying any options.
{{% /note %}}
{{% /note %}}
### Options
### Options
...
@@ -631,8 +636,12 @@ This command is also available as a pre-commit hook. See [pre-commit hooks](/doc
...
@@ -631,8 +636,12 @@ This command is also available as a pre-commit hook. See [pre-commit hooks](/doc
Currently, only `
requirements.txt
` is supported.
Currently, only `
requirements.txt
` is supported.
* `
--output (-o)
`: The name of the output file. If omitted, print to standard
* `
--output (-o)
`: The name of the output file. If omitted, print to standard
output.
output.
* `
--dev
`: Include development dependencies.
* `
--dev
`: Include development dependencies.
(**Deprecated**)
* `
--extras (-E)
`: Extra sets of dependencies to include.
* `
--extras (-E)
`: Extra sets of dependencies to include.
* `
--without
`: The dependency groups to ignore.
* `
--with
`: The optional dependency groups to include.
* `
--only
`: The only dependency groups to include.
* `
--default
`: Only include the default dependencies. (**Deprecated**)
* `
--without-hashes
`: Exclude hashes from the exported file.
* `
--without-hashes
`: Exclude hashes from the exported file.
* `
--without-urls
`: Exclude source repository urls from the exported file.
* `
--without-urls
`: Exclude source repository urls from the exported file.
* `
--with-credentials
`: Include credentials for extra indices.
* `
--with-credentials
`: Include credentials for extra indices.
...
...
poetry.lock
View file @
d52780c5
This diff is collapsed.
Click to expand it.
pyproject.toml
View file @
d52780c5
...
@@ -35,6 +35,7 @@ generate-setup-file = false
...
@@ -35,6 +35,7 @@ generate-setup-file = false
python
=
"^3.7"
python
=
"^3.7"
poetry-core
=
"^1.1.0a7"
poetry-core
=
"^1.1.0a7"
poetry-plugin-export
=
"^1.0"
cachecontrol
=
{
version
=
"^0.12.9"
,
extras
=
["filecache"]
}
cachecontrol
=
{
version
=
"^0.12.9"
,
extras
=
["filecache"]
}
cachy
=
"^0.3.0"
cachy
=
"^0.3.0"
cleo
=
"^1.0.0a4"
cleo
=
"^1.0.0a4"
...
...
tests/console/commands/test_export.py
View file @
d52780c5
from
__future__
import
annotations
from
__future__
import
annotations
from
typing
import
TYPE_CHECKING
from
typing
import
TYPE_CHECKING
from
unittest.mock
import
ANY
from
unittest.mock
import
Mock
from
unittest.mock
import
Mock
import
pytest
import
pytest
from
poetry.console.commands.export
import
Exporter
from
poetry_plugin_export.exporter
import
Exporter
from
tests.helpers
import
get_package
from
tests.helpers
import
get_package
...
@@ -155,15 +155,6 @@ def test_export_with_urls(
...
@@ -155,15 +155,6 @@ def test_export_with_urls(
the Exporter test.
the Exporter test.
"""
"""
mock_export
=
Mock
()
mock_export
=
Mock
()
monkeypatch
.
setattr
(
Exporter
,
"
export
"
,
mock_export
)
monkeypatch
.
setattr
(
Exporter
,
"
with_urls
"
,
mock_export
)
tester
.
execute
(
"--without-urls"
)
tester
.
execute
(
"--without-urls"
)
mock_export
.
assert_called_once_with
(
mock_export
.
assert_called_once_with
(
False
)
ANY
,
ANY
,
ANY
,
dev
=
False
,
extras
=
[],
with_credentials
=
False
,
with_hashes
=
True
,
with_urls
=
False
,
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment