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

Add support for merging codeprints.json files #4

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
626ceb3
Fix import
mre Feb 18, 2021
975b7fb
Add subcommand for merge
mre Feb 18, 2021
214a2f9
impl Default for Year (generating empty timelines)
mre Feb 18, 2021
5ad51fc
Split up parser into ParseState and core Parser
mre Feb 18, 2021
1fa6d45
Work on merge setup
mre Feb 18, 2021
c48f9bb
Execute `run` by default if there are no additional arguments
mre Feb 18, 2021
38a27da
Update docs
mre Feb 18, 2021
1695eee
Work on merger
mre Feb 18, 2021
598df77
Remove unused TryFrom
mre Feb 18, 2021
0777aa3
Show full year
mre Feb 19, 2021
1b3610f
handle start and end date in output
mre Mar 3, 2021
6149ac9
Fix test
mre Mar 8, 2021
24d6f57
work on merge
mre Mar 8, 2021
6cf9f12
WIP: merge multiple timeslines
woolfg Mar 8, 2021
babfe92
fix merge 2 test
mre Mar 10, 2021
2085384
Fix clippy warnings
mre Mar 10, 2021
1443239
Add hash to timeline
mre Mar 10, 2021
d01be81
fix lints
mre Mar 10, 2021
a48ee27
Less clones
mre Mar 10, 2021
ee203c1
Remove unused import
mre Mar 10, 2021
fa390bc
fix merge call
mre Mar 10, 2021
2a553a2
Fix import
mre Feb 18, 2021
250b815
Add subcommand for merge
mre Feb 18, 2021
27adefe
impl Default for Year (generating empty timelines)
mre Feb 18, 2021
42ca666
Split up parser into ParseState and core Parser
mre Feb 18, 2021
19840f2
Work on merge setup
mre Feb 18, 2021
fac6c44
Execute `run` by default if there are no additional arguments
mre Feb 18, 2021
a239c07
Update docs
mre Feb 18, 2021
a7a68b9
Work on merger
mre Feb 18, 2021
b013988
Remove unused TryFrom
mre Feb 18, 2021
ea60627
Show full year
mre Feb 19, 2021
a5fb023
handle start and end date in output
mre Mar 3, 2021
622c4c6
Fix test
mre Mar 8, 2021
615c0bf
work on merge
mre Mar 8, 2021
37de103
WIP: merge multiple timeslines
woolfg Mar 8, 2021
cfc6076
fix merge 2 test
mre Mar 10, 2021
7cb3063
Fix clippy warnings
mre Mar 10, 2021
fc822a1
Add hash to timeline
mre Mar 10, 2021
452a2e3
fix lints
mre Mar 10, 2021
05af9d2
Less clones
mre Mar 10, 2021
5cc6726
Remove unused import
mre Mar 10, 2021
74fe53a
fix merge call
mre Mar 10, 2021
ca4cac5
txt for help option
woolfg Mar 11, 2021
86202e4
test for intesity computation #5 -> failing
woolfg Mar 11, 2021
5b15954
Merge branch 'merge' of github.com:codeprintsdev/analyzer into merge
mre Mar 15, 2021
6653dca
Add timestamp
mre Mar 15, 2021
231ef0e
formatting
mre Mar 15, 2021
07054b3
changed output of merge to merged_codeprints_*.json
mre Mar 15, 2021
e80175c
formatting
mre Mar 15, 2021
6f4f175
corrected fixture after fixing the api
woolfg Mar 16, 2021
6c51be2
fix typo in intensity string
mre Mar 18, 2021
cdd23c8
Merge remote-tracking branch 'origin/master' into merge
mre Apr 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ serde_json = "1.0.62"
chrono = "0.4.19"
quantiles = "0.7.1"
structopt = "0.3.21"
glob = "0.3.0"
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ RUN apt-get update \
COPY --from=builder /analyzer/target/release/codeprints-analyzer /usr/local/bin/codeprints-analyzer
WORKDIR /repo
ENTRYPOINT [ "codeprints-analyzer" ]
# The standard command parses the commits of a repository
CMD ["run"]
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ codeprints-analyzer
You can set the start- and end-date of the output.

```
docker run -v `pwd`:/repo codeprints/analyzer --after "2020-12-24" --before "2021-02-10"
docker run -v `pwd`:/repo codeprints/analyzer run --after "2020-12-24" --before "2021-02-10"
```

The syntax is exactly the same that `git` also uses.
Expand All @@ -65,14 +65,27 @@ If you work in a bigger team, you might want to filter the contributions by
author. Here is how:

```
docker run -v `pwd`:/repo codeprints/analyzer --author "Matthias" --author "Octocat"
docker run -v `pwd`:/repo codeprints/analyzer run --author "Matthias" --author "Octocat"
```

To get a list of all author names, run `git shortlog --summary --numbered --email`.

(You can also filter by committers. The difference is subtle, but in contrast to authors, these are the
contributors who pushed/committed a patch to the repository.)

## Merging multiple codeprints output files

Do you have multiple repositories that you want to analyze?
No problem! Just run the tool in every repository folder.
After that, copy the files into a single folder and run the following command:

```
docker run -v `pwd`:/repo codeprints/analyzer merge
```

This will merge all codeprints\_\*.json files in the `repo` directory into one file.
(It will accumulate all contribution counts for each day.)

## More options

To get an exhaustive list of options, run
Expand Down
Loading