TomographicImaging / eqt

A number of templates and tools to develop Qt GUI's with Python effectively.
Other
2 stars 3 forks source link

How to access the changelog locally? #99

Closed paskino closed 7 months ago

paskino commented 9 months ago

https://github.com/TomographicImaging/eqt/blob/main/CONTRIBUTING.md#changelog describes a command which fails with my git version 2.39.1.windows.1 complaining as

git config --global alias.changelog2 'for-each-ref --sort=-*authordate --format="# %(contents:subject)%0a%(contents:body)" refs/tags'
usage: git config [<options>]

Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file
    --worktree            use per-worktree config file
    -f, --file <file>     use given config file
    --blob <blob-id>      read config from given blob object

Action
    --get                 get value: name [value-pattern]
    --get-all             get all values: key [value-pattern]
    --get-regexp          get values for regexp: name-regex [value-pattern]
    --get-urlmatch        get value specific for the URL: section[.var] URL
    --replace-all         replace all matching variables: name value [value-pattern]
    --add                 add a new variable: name value
    --unset               remove a variable: name [value-pattern]
    --unset-all           remove all matches: name [value-pattern]
    --rename-section      rename section: old-name new-name
    --remove-section      remove a section: name
    -l, --list            list all
    --fixed-value         use string equality when comparing values to 'value-pattern'
    -e, --edit            open an editor
    --get-color           find the color configured: slot [default]
    --get-colorbool       find the color setting: slot [stdout-is-tty]

Type
    -t, --type <type>     value is given this type
    --bool                value is "true" or "false"
    --int                 value is decimal number
    --bool-or-int         value is --bool or --int
    --bool-or-str         value is --bool or string
    --path                value is a path (file or directory name)
    --expiry-date         value is an expiry date

Other
    -z, --null            terminate values with NUL byte
    --name-only           show variable names only
    --includes            respect include directives on lookup
    --show-origin         show origin of config (file, standard input, blob, command line)
    --show-scope          show scope of config (worktree, local, global, system, command)
    --default <value>     with --get, use default value when missing entry

Also, I had earlier created the changelog alias, which luckily works. In this case I cannot access the changelog from the latest tag, which is what we most often are interested in. How do we achieve it?

I tried with adding an annotated tag and then git changelog but it didn't contain any changelog information

git changelog

# temporary_tag

# Version 0.7.1
- add code linting (#79)
  + add `pre-commit` config
  + automated lint
    * fix `git-blame` attribution
lauramurgatroyd commented 9 months ago

It also fails for me - git version 2.31.0.windows.1

casperdcl commented 8 months ago

I think this is because windows and linux treat quotes the opposite way.

Linux:

git config --global alias.changelog 'for-each-ref --sort=-*authordate --format="# %(contents:subject)%0a%(contents:body)" refs/tags'

Windows:

git config --global alias.changelog "for-each-ref --sort=-*authordate --format='# %(contents:subject)%0a%(contents:body)' refs/tags"
lauramurgatroyd commented 8 months ago

Hi, the windows command now doesn't fail for me. However, it only prints the change log that has been generated for the released versions. How do I see the change log for what has been committed to master since the last release?

casperdcl commented 8 months ago

How do I see the change log for what has been committed to master since the last release?

Changelogs must be manually created in annotated tags, so there is no such thing as "change log since the last (tagged) release".

If you're about to tag a new release and wondering what to write in the changelog (tag annotation), you could always check the commit messages since the last tag. On bash:

git log --pretty='format:%d%n%s%n%b%n' $(git tag --sort=v:refname | tail -n1)..HEAD
lauramurgatroyd commented 8 months ago

I suggest we reinstate the changelog file, so it's easier to see the changes since the last release. It is difficult for me to understand what has been done since last release, especially as there have been a few merges that weren't squashed. Also, as I am on windows I can't run the command you suggested.

casperdcl commented 8 months ago

maybe https://github.com/TomographicImaging/eqt/compare/v0.7.1...main?

Note that a changelog file kinda defeats the purpose of using Git.

DanicaSTFC commented 8 months ago

After a meeting with @casperdcl @DanicaSTFC @paskino @lauramurgatroyd, we established that

DanicaSTFC commented 8 months ago

@casperdcl do you think it would be possible to have the manual change log for next Thursday (7th Dec)? this would help our new release of EQT. Thanks!