Skip to content

Commit 6306f43

Browse files
authored
Merge pull request #44 from gnikit/feature/modernise-setup
Feature/modernise setup
2 parents 0057f62 + dc59da7 commit 6306f43

24 files changed

+139
-141
lines changed

.coveragerc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[run]
22
dynamic_context = test_function
3-
omit = fortls/__init__.py
3+
omit =
4+
fortls/__init__.py
5+
fortls/version.py
46

57
[report]
68
exclude_lines =

.github/workflows/docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ jobs:
55
docs:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v1
9-
- uses: ammaraskar/sphinx-action@master
8+
- uses: actions/checkout@v2
9+
- uses: sphinx-toolbox/sphinx-action@master
1010
with:
11+
pre-build-command: "pip install .[docs]"
1112
docs-folder: "docs/"
1213
- name: Deploy
1314
uses: peaceiris/actions-gh-pages@v3

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
architecture: x64
2323

2424
- name: Setup
25-
run: pip install -r test_requirements.txt
25+
run: pip install .[dev]
2626

2727
- name: Unittests
2828
run: pytest -v
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Coverage report
4343
run: |
44-
pip install -r test_requirements.txt
44+
pip install .[dev]
4545
pytest --cov=fortls --cov-report=xml
4646
4747
- name: Upload coverage to Codecov

.github/workflows/python-publish.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v2
21-
22-
# # This is a temporary workaround until GitHub Actions start natively
23-
# # supporting signed commits like they should
24-
# - name: Import GPG key
25-
# id: import_gpg
26-
# uses: crazy-max/ghaction-import-gpg@v4
27-
# with:
28-
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
29-
# passphrase: ${{ secrets.PASSPHRASE }}
30-
# git_user_signingkey: true
31-
# git_commit_gpgsign: true
32-
3321
- name: Set up Python
3422
uses: actions/setup-python@v2
3523
with:
@@ -40,37 +28,6 @@ jobs:
4028
python -m pip install --upgrade pip
4129
pip install build
4230
43-
# see: https://github.community/t/how-to-get-just-the-tag-name/16241/7
44-
- name: Get the version
45-
id: get_version
46-
shell: bash
47-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
48-
49-
- name: Set global variables
50-
shell: bash
51-
run: |
52-
echo "VERSION=${{ steps.get_version.outputs.VERSION }}" >> $GITHUB_ENV
53-
54-
- name: Set __version__
55-
shell: bash
56-
run: sed -i "s@\".*\"@\"${VERSION}\"@g" "fortls/_version.py"
57-
58-
# Disabled the workflow because it messes up with the Releases on GitHub
59-
# releases that use tags through force-push are marked as drafts
60-
# will have to manually update the versions in _version.py
61-
# - name: Commit the new version to dev
62-
# shell: bash
63-
# run: |
64-
# git config --global user.name 'gnikit'
65-
# git config --global user.email '[email protected]'
66-
# git fetch origin
67-
# git switch dev
68-
# git commit -S fortls/_version.py -m "Auto-Update version" -v
69-
# git push
70-
# git tag -f "${VERSION}"
71-
# git push --delete origin "${VERSION}"
72-
# git push origin "${VERSION}"
73-
7431
- name: Build package
7532
run: python -m build
7633

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
.vscode
33
*.egg-info
44
dist/
5+
build/
56
docs/_build/
67
docs/fortls_changes.md
8+
fortls/_version.py
79

810
.idea
911

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# CHANGELONG
22

3+
## 2.2.0
4+
5+
### Added
6+
7+
- Added semantic versioning with `setuptools_scm`
8+
([gnikit/fortls#34](https://github.com/gnikit/fortls/issues/34))
9+
10+
### Changed
11+
12+
- Changes from `setup.py` to `setup.toml` and `pyproject.toml`
13+
([gnikit/fortls#33](https://github.com/gnikit/fortls/issues/33))
14+
- Changed documentation CI to up to date action
15+
- Formatted Python imports with `isort`
16+
317
## 2.1.2
418

519
### Fixed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ potentially subject to change.
7373
pip install fortls
7474
```
7575

76+
>**Warning**: it is not recommended having `fortls` and `fortran-language-server`
77+
>simultaneously installed, since they use the same binary name. If you are having trouble
78+
>getting `fortls` to work try uninstalling `fortran-language-server` and reinstalling `fortls`.
79+
>
80+
>```sh
81+
>pip uninstall fortran-language-server
82+
>pip install fortls --upgrade
83+
>```
84+
85+
7686
## Settings
7787
7888
`fortls` can be configured through both the command line e.g.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
sys.path.insert(0, os.path.abspath(".."))
1717

18-
from fortls._version import __version__ # noqa: E402
18+
from fortls import __version__ # noqa: E402
1919

2020
# Generate the agglomerated changes (from the CHANGELOG) between fortls
2121
# and the fortran-language-server project

docs/fortls.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ fortls.regex\_patterns module
7676
:undoc-members:
7777
:show-inheritance:
7878

79+
fortls.version module
80+
---------------------
81+
82+
.. automodule:: fortls.version
83+
:members:
84+
:undoc-members:
85+
:show-inheritance:
86+
7987
Module contents
8088
---------------
8189

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
fortls
6+
fortls -- Fortran Language Server
77
==================================
88

99
.. toctree::

0 commit comments

Comments
 (0)