Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-environment
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Franck Bret
swh-environment
Commits
f9991bc8
Commit
f9991bc8
authored
3 years ago
by
David Douard
Browse files
Options
Downloads
Patches
Plain Diff
Remove most of the README content and point to the Developer setup page
as well as the Docker environment web page.
parent
d2dac157
No related branches found
Branches containing commit
Tags
debian/upstream/0.22.2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+8
-77
8 additions, 77 deletions
README.md
with
8 additions
and
77 deletions
README.md
+
8
−
77
View file @
f9991bc8
...
...
@@ -4,85 +4,16 @@ Software Heritage Python development environment
This repository contains the scaffolding to initialize and keep a local
development environment for the Software Heritage Python stack. In particular,
it contains pointers to the Git repositories of all Software Heritage Python
modules. The repositories are managed using
[
myrepos
][
1
]
(see the .mrconfig
file), and the
`mr`
command.
[
1
]:
http://myrepos.branchable.com/
The provided mr config will also install a
[
pre-commit
][
2
]
hook in cloned
repositories, so the
`pre-commit`
tool must be available as well.
[
2
]:
https://pre-commit.com/
In Debian, the "mr" command is shipped in the "mr" package.
Unfortunately, "pre-commit" itself is not available in Debian for now.
However, we strongly suggest you use a
[
virtualenv
][
3
]
to manage your SWH
development environment. You can create it using virtualenv, or you can
use a virtualenv wrapper tool like
[
virtualenvwrapper
][
4
]
or
[
pipenv
][
5
]
(or
any other similar tool). In Debian, both these tools are available as
"virtualenvwrapper" and "pipenv".
[
3
]:
https://virtualenv.pypa.io/
[
4
]:
https://virtualenvwrapper.readthedocs.io/
[
5
]:
https://pipenv.readthedocs.io/
In the example below we are using virtualenv directly:
```
lang=shell
git clone https://forge.softwareheritage.org/source/swh-environment.git
cd swh-environment
python3 -m venv .venv
. .venv/bin/activate
pip install pre-commit
```
then you can use the following helper for both initial code checkout and
subsequent updates:
```
lang=shell
bin/update
```
Note that the first time you run
`bin/update`
it will add the
`swh-environment/.mrconfig`
file to your
`~/.mrtrust`
(we use this to be able
to setup pre-commit hooks upon repository checkouts) and install "pre-commit"
as git precommit hook in each git repository. See
`MR(1)`
for more information
about trusted
`mr`
repositories.
You can also checkout/update repositories by hand using
`mr up`
.
See
`.mrconfig`
for the actual list of repositories.
Upgrade from makefile-based hooks
---------------------------------
Git pre commit hooks used to be makefile-based scripts. Running
`mr update`
will automatically replace these by the
`pre-commit`
tool,
Initialize a new Python package repository
------------------------------------------
1.
create the remote Git repository on the forge
2.
add it to
`.mrconfig`
(e.g. using mr register)
3.
mr update
this will clone the (empty) repository locally
4.
bin/init-py-repo REPO_NAME
this will fill the repository with the template for SWH Python packages, and
make an initial commit
5.
cd REPO_NAME ; git push
modules.
Please refer to the
[
Developer setup
](
https://docs.softwareheritage.org/devel/developer-setup.html
)
for a step-by-step documentation on how to use this repository to install a
Software Heritage developer environment.
Docker based test environment
-----------------------------
Check the README file in the docker/ directory.
Please check the
[
Developer docker environment
](
https://docs.softwareheritage.org/devel/getting-started/using-docker.html
)
page.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment