Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: flag to setup bench with developer mode enabled #1494

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

ankush
Copy link
Member

@ankush ankush commented Nov 2, 2023

Dev dependencies are not installed if developer_mode is not enabled.
When creating a new bench it's not possible to modify this config
upfront, so offer a flag to do it instead.

Note:

  • Disabled by default.
  • Very few people need this, those who write and run tests locally primarily.
  • You mostly should not do this in CI, do bench setup requirements --dev explicitly instead.
λ bench init testdev --dev
Setting Up Environment
$ python3 -m venv env
$ /home/ankush/benches/develop/testdev/env/bin/python -m pip install --quiet --upgrade pip
$ /home/ankush/benches/develop/testdev/env/bin/python -m pip install --quiet wheel
Getting frappe
$ git clone https://github.com/frappe/frappe.git  --depth 1 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 3268, done.
remote: Counting objects: 100% (3268/3268), done.
remote: Compressing objects: 100% (2878/2878), done.
remote: Total 3268 (delta 427), reused 1707 (delta 277), pack-reused 0
Receiving objects: 100% (3268/3268), 17.93 MiB | 6.18 MiB/s, done.
Resolving deltas: 100% (427/427), done.
Installing frappe
$ /home/ankush/benches/develop/testdev/env/bin/python -m pip install --quiet --upgrade -e /home/ankush/benches/develop/testdev/apps/frappe
$ /home/ankush/benches/develop/testdev/env/bin/python -m pip install --quiet --upgrade coverage~=6.5.0 Faker~=18.10.1 pyngrok~=6.0.0 unittest-xml-reporting~=3.2.0 watchdog~=3.0.0 hypothesis~=6.77.0 responses==0.23.1 freezegun~=1.2.2
... (output clipped)

Docs: https://frappeframework.com/docs/user/en/bench/resources/bench-commands-cheatsheet

Dev dependencies are not installed if developer_mode is not enabled.
When creating a new bench it's not possible to modify this config
upfront, so offer a flag to do it instead.

Note:
- Disabled by default.
- Very few people need this, those who write and run tests locally primarily.
- You mostly should not do this in CI, do `bench setup requirements --dev` explicitly instead.
Copy link

sonarqubecloud bot commented Nov 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ankush ankush merged commit 255c930 into develop Nov 2, 2023
13 checks passed
@ankush ankush deleted the dev_bench branch November 2, 2023 14:15
Copy link

github-actions bot commented Nov 2, 2023

🎉 This PR is included in version 5.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant