diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.md b/.github/ISSUE_TEMPLATE/01-bug-report.md deleted file mode 100644 index e81141664..000000000 --- a/.github/ISSUE_TEMPLATE/01-bug-report.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: Bug report -about: Report a bug to help improve this project ---- - - - -#### Problem description - -Please explain: -* **what** you tried to achieve, -* **how** you went about it (referring to the code sample), and -* **why** the current behaviour is a problem and what output - you expected instead. - -#### Code Sample - -Create a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve). - - -```python -``` - - -``` -``` - -### Context - - - -
- -``` -``` - -
diff --git a/.github/ISSUE_TEMPLATE/01-bug-report.yaml b/.github/ISSUE_TEMPLATE/01-bug-report.yaml new file mode 100644 index 000000000..605adaeeb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-bug-report.yaml @@ -0,0 +1,64 @@ +name: 🐞 Bug report +description: Report a problem to help improve this project +title: "[BUG] " +labels: [bug, triage] +body: + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an [issue already exists](https://github.com/opencobra/cobrapy/issues) for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + - type: textarea + attributes: + label: Problem description + description: | + A concise description of what you're experiencing. + + Please explain: + + * **what** you tried to achieve, + * **how** you went about it (referring to the code sample), and + * **why** the current behaviour is a problem and what output you expected instead. + validations: + required: false + - type: textarea + attributes: + label: Code sample + description: > + Create a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve). + Please, paste your code between the ``` tickmarks below or link to a [gist](https://gist.github.com/). + value: | + Code run: + + ```python + ``` + + Traceback: + + ```text + ``` + validations: + required: false + - type: textarea + attributes: + label: Environment + description: > + Please paste the output of running `depinfo --markdown cobra` + in your environment between the `details` tags below. + value: | +
+ +
+ validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/02-feature-request.yaml b/.github/ISSUE_TEMPLATE/02-feature-request.yaml new file mode 100644 index 000000000..e64e685a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-feature-request.yaml @@ -0,0 +1,46 @@ + +name: Feature request +description: Suggest an idea for this project +title: "[Feature] " +labels: [enhancement] +body: + - type: checkboxes + attributes: + label: Checklist + description: > + Please make sure you check all these items before submitting your feature request. + options: + - label: There are [no similar issues or pull requests](https://github.com/opencobra/cobrapy/issues) for this yet. + required: true + - type: textarea + attributes: + label: Problem + description: > + A clear and concise description of what you are trying to achieve. + placeholder: > + "I want to be able to [...] but I can't because [...]". + validations: + required: false + - type: textarea + attributes: + label: Solution + description: > + A clear and concise description of what you would want to happen. + For API changes, try to provide a code snippet of what you would like the new API to look like. + validations: + required: false + - type: textarea + attributes: + label: Alternatives + description: > + Please describe any alternative solutions or features you've considered to solve + your problem and why they didn't help. + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: > + Provide any additional context, screenshots, tracebacks, etc. about the feature here. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/02-question.md b/.github/ISSUE_TEMPLATE/02-question.md deleted file mode 100644 index 193adf79a..000000000 --- a/.github/ISSUE_TEMPLATE/02-question.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Question -about: Ask a question ---- - -### Checklist - - - -- [ ] I searched the [documentation](https://cobrapy.readthedocs.io). -- [ ] I looked through [similar issues on GitHub](https://github.com/opencobra/cobrapy/issues). -- [ ] I looked up "How to do ... in cobrapy" on a search engine. - -### Question - - diff --git a/.github/ISSUE_TEMPLATE/03-feature-request.md b/.github/ISSUE_TEMPLATE/03-feature-request.md deleted file mode 100644 index f34a4ffaa..000000000 --- a/.github/ISSUE_TEMPLATE/03-feature-request.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project ---- - -### Checklist - - - -- [ ] There are [no similar issues or pull requests](https://github.com/opencobra/cobrapy/issues) for this yet. - -### Is your feature related to a problem? Please describe it. - - - -## Describe the solution you would like. - - - -## Describe alternatives you considered - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 08f13eae2..225815787 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,10 @@ # Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser blank_issues_enabled: true contact_links: -- name: 📧 Google Group - url: http://groups.google.com/group/cobra-pie +- name: Question + url: https://github.com/opencobra/cobrapy/discussions about: > - Please ask typical questions here: General constraint-based modelling problems or - issues with genome-scale models in COBRApy. + Please ask general questions about constraint-based modeling or COBRApy specifically here. - name: 💬 Gitter url: https://gitter.im/opencobra/cobrapy about: > diff --git a/release-notes/next-release.md b/release-notes/next-release.md index 2ddd48ce4..3ac1aaa2d 100644 --- a/release-notes/next-release.md +++ b/release-notes/next-release.md @@ -6,6 +6,8 @@ ## Other +* Updated the package `depinfo` to version >2. + ## Deprecated features ## Backwards incompatible changes diff --git a/setup.cfg b/setup.cfg index b7cfcf960..6f2c13cf6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,7 @@ parse = (?P\d+) \.(?P\d+) \.(?P\d+) (?P[a]*)(?P\d*) -serialize = +serialize = {major}.{minor}.{patch}{release}{num} {major}.{minor}.{patch} tag_name = {new_version} @@ -15,7 +15,7 @@ tag_name = {new_version} name = cobra url = https://opencobra.github.io/cobrapy download_url = https://pypi.org/project/cobra -project_urls = +project_urls = Source Code = https://github.com/opencobra/cobrapy Documentation = https://cobrapy.readthedocs.io Bug Tracker = https://github.com/opencobra/cobrapy/issues @@ -23,7 +23,7 @@ author = The cobrapy core development team. author_email = cobra-pie@googlegroups.com maintainer = Moritz E. Beber maintainer_email = moritz.beber@gmail.com -classifiers = +classifiers = Development Status :: 5 - Production/Stable Intended Audience :: Science/Research License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) @@ -40,7 +40,7 @@ license = LGPL-2.0-or-later OR GPL-2.0-or-later description = COBRApy is a package for constraint-based modeling of metabolic networks. long_description = file: README.rst, INSTALL.rst long_description_content_type = text/x-rst -keywords = +keywords = metabolism biology constraint-based @@ -52,9 +52,9 @@ keywords = [options] zip_safe = True -install_requires = +install_requires = appdirs ~=1.4 - depinfo ~=1.7 + depinfo ~=2.2 diskcache ~=5.0 future httpx ~=0.24 @@ -67,24 +67,24 @@ install_requires = rich >=8.0 ruamel.yaml ~=0.16 swiglpk -tests_require = +tests_require = tox packages = find: -package_dir = +package_dir = = src [options.packages.find] where = src [options.package_data] -cobra = +cobra = data/* io/*.json [options.extras_require] -array = +array = scipy -development = +development = black bumpversion isort @@ -96,7 +96,7 @@ universal = 1 [bumpversion:part:release] optional_value = placeholder first_value = placeholder -values = +values = placeholder a diff --git a/src/cobra/util/util.py b/src/cobra/util/util.py index 4d217c496..fcab631c8 100644 --- a/src/cobra/util/util.py +++ b/src/cobra/util/util.py @@ -3,7 +3,7 @@ import textwrap from typing import Any -from depinfo import print_dependencies +from depinfo.application import DisplayApplication def format_long_string(string: str, max_length: int = 50) -> str: @@ -59,4 +59,4 @@ def __getitem__(self, item: Any) -> Any: def show_versions() -> None: """Print dependency information.""" - print_dependencies("cobra") + DisplayApplication.run("cobra") diff --git a/tests/test_util/test_util.py b/tests/test_util/test_util.py index 52db25fec..0f36d4e4a 100644 --- a/tests/test_util/test_util.py +++ b/tests/test_util/test_util.py @@ -39,11 +39,9 @@ def test_show_versions(capsys) -> None: show_versions() captured = capsys.readouterr() lines = captured.out.split("\n") - assert lines[1].startswith("System Information") - assert lines[2].startswith("==================") - assert lines[3].startswith("OS") - assert lines[4].startswith("OS-release") - assert lines[5].startswith("Python") - - assert lines[7].startswith("Package Versions") - assert lines[8].startswith("================") + assert lines[1].startswith("Package Information") + assert lines[2].startswith("------------------") + assert lines[3].startswith("cobra") + + assert lines[5].startswith("Dependency Information") + assert lines[6].startswith("------------------")