Skip to content

Commit

Permalink
merging project changes
Browse files Browse the repository at this point in the history
  • Loading branch information
digrapsas committed Jun 18, 2024
2 parents 972a64c + b32e084 commit cd9c3c6
Show file tree
Hide file tree
Showing 35 changed files with 1,373 additions and 775 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[run]
omit =
fortls/__init__.py
fortls/debug.py
fortls/version.py
fortls/schema.py
concurrency = multiprocessing
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sphinx-toolbox/sphinx-action@master
- uses: actions/setup-python@v5
with:
pre-build-command: "pip install .[docs]"
docs-folder: "docs/"
python-version: "3.11"
- name: Build docs
run: |
pip install -e .[dev,docs]
make -C docs html
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/master'
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docs_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sphinx-toolbox/sphinx-action@master
- uses: actions/setup-python@v5
with:
pre-build-command: "pip install .[docs]"
docs-folder: "docs/"
python-version: "3.11"
- name: Build docs
run: |
pip install -e .[dev,docs]
make -C docs html
- name: Deploy Preview
uses: rossjrw/[email protected]
with:
source-dir: docs/_build/html
preview-branch: gh-pages
custom-url: fortls.fortran-lang.org
28 changes: 4 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -24,9 +24,6 @@ jobs:
- name: Setup
run: pip install .[dev]

- name: Unittests
run: pytest --doctest-modules

- name: Lint
run: black --diff --check --verbose .

Expand All @@ -35,28 +32,11 @@ jobs:
python3 -m fortls.schema
git diff --exit-code ./fortls/fortls.schema.json
coverage:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8","3.10"]
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Coverage report
run: |
pip install .[dev]
pytest --doctest-modules
shell: bash
- name: Unittests
run: pytest --doctest-modules -n auto

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v4.4.1
with:
fail_ci_if_error: true
verbose: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=2000']
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
rev: v3.15.2
hooks:
- id: pyupgrade
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.4.2
hooks:
- id: black
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

## Unreleased

## 3.1.1

### Fixed

- Fixed bug with nested preprocessor blocks erroneously evaluating as active
([#404](https://github.com/fortran-lang/fortls/issues/404))

## 3.1.0

### Fixed

- Fixed bug where parser would crash when trying to retrieve an invalid line no.
([#398](https://github.com/fortran-lang/fortls/issues/398))
- Fixed bug with string quotes not being escaped when looking for parenthesis
([#250](https://github.com/fortran-lang/fortls/issues/250))
- Fixed bug with line continuations in lexical tokens
([#235](https://github.com/fortran-lang/fortls/issues/235))

## 3.0.0

### Added
Expand Down Expand Up @@ -35,9 +53,17 @@
- Changed automatic detection of fixed/free-form of files to ignore
preprocessor lines.
([#302](https://github.com/fortran-lang/fortls/pull/302))
- Moved project setup from `setup.cfg` to `pyproject.toml`
([#384](https://github.com/fortran-lang/fortls/pull/384))
- Bumped `setuptools` version to `>=61.0.0`
([#384](https://github.com/fortran-lang/fortls/pull/384))

### Fixed

- Fixed end of scope errors raised by trailing semicolon in native parser
([#265](https://github.com/fortran-lang/fortls/issues/265))
- Fixed bug where parent scope for includes in AST could be `None`
([#329](https://github.com/fortran-lang/fortls/issues/329))
- Fixed preprocessor bug with `if` and `elif` conditionals
([#322](https://github.com/fortran-lang/fortls/issues/322))
- Fixed bug where type fields or methods were not detected if spaces were
Expand Down
72 changes: 38 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
![Codecov](https://img.shields.io/codecov/c/github/fortran-lang/fortls?style=flat-square)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
![GitHub Repo stars](https://img.shields.io/github/stars/fortran-lang/fortls?color=yellow&style=flat-square)
[![DOI](https://zenodo.org/badge/412392321.svg?style=flat-square)](https://zenodo.org/badge/latestdoi/412392321)

<!-- [<img alt="https://github.com/sponsors/gnikit" src="https://img.shields.io/static/v1?style=social&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color&link=%3Curl%3E" height="30" />](https://github.com/sponsors/gnikit)
[<img alt="https://paypal.me/inikit" src="https://img.shields.io/static/v1?style=social&label=Donate&message=%E2%9D%A4&logo=Paypal&color&link=%3Curl%3E" height="30" />](https://paypal.me/inikit) -->
Expand Down Expand Up @@ -65,36 +66,10 @@ and [Emacs](https://fortls.fortran-lang.org/editor_integration.html#emacs).

- Signature help and hover does not handle elegantly overloaded functions i.e. interfaces

## `fortls` vs `fortran-language-server`

This project was originally based on `fortran-language-server` LSP implementation, but the two projects have since diverged.

`fortls` (this project) is now developed independently of the upstream `hansec/fortran-language-server` project and contains numerous new features and bug fixes
the original `fortran-language-server` does not.

For a complete and detailed list of the differences between the two Language Servers
see the Documentation section: [Unique fortls features (not in fortran-language-server)](https://fortls.fortran-lang.org/fortls_changes.html)

The name of executable for this project has been chosen to remain `fortls`
to allow for integration with pre-existing plugins and workflows, but it could
change in the future.

## Future plans
## Documentation

`fortls` has reached a point where it is feature complete and stable enough to be used in many modern Fortran projects without any issues.
It does however still have fundamental limitations,
namely its ability to understand all Fortran syntax and semantics that has been used throughout the 65+ years of the language. **The good news is that we have a plan to address this issue!**

We are excited to announce that we are working on creating a new Fortran Language Server
based on the actively developed [LFortran](https://lfortran.org/) compiler 🎉.
The new Language Server will be able to understand all Fortran syntax, be faster,
and give more accurate autocompletion, hover and diagnostic information. That means we plan on investing any future funding on creating our new language server and ultimately creating a better user experience for everyone.

<!-- Have a look at our roadmap (link) and consider contributing to our efforts (donations and contribution tasks link). -->

### What about `fortls`?

Not to worry, `fortls` will continue to be here. We will keep `fortls` in maintenance mode with bug fixes and new features from volunteer contributors, but otherwise we will be focusing our efforts into making the new LFortran language server a reality.
The full documentation for `fortls` can be found at
[fortls.fortran-lang.org](https://fortls.fortran-lang.org/).

## Installation

Expand Down Expand Up @@ -177,17 +152,46 @@ An example for a Configuration file is given below
| `textDocument/didChange` | Document synchronisation upon changes to the document |
| `textDocument/codeAction` | **Experimental** Generate code |

## Future plans

`fortls` has reached a point where it is feature complete and stable enough to be used in many modern Fortran projects without any issues.
It does however still have fundamental limitations,
namely its ability to understand all Fortran syntax and semantics that has been used throughout the 65+ years of the language. **The good news is that we have a plan to address this issue!**

We are excited to announce that we are working on creating a new Fortran Language Server
based on the actively developed [LFortran](https://lfortran.org/) compiler 🎉.
The new Language Server will be able to understand all Fortran syntax, be faster,
and give more accurate autocompletion, hover and diagnostic information. That means we plan on investing any future funding on creating our new language server and ultimately creating a better user experience for everyone.

<!-- Have a look at our roadmap (link) and consider contributing to our efforts (donations and contribution tasks link). -->

### What about `fortls`?

Not to worry, `fortls` will continue to be here. We will keep `fortls` in active maintenance mode with bug fixes and new features from volunteer contributors, but otherwise we will be focusing our efforts into making the new language server using LFortran's parser a reality.

## `fortls` vs `fortran-language-server`

This project was originally based on `fortran-language-server` LSP implementation, but the two projects have since diverged.

`fortls` (this project) is now developed independently of the upstream `hansec/fortran-language-server` project and contains numerous new features and bug fixes
the original `fortran-language-server` does not.

For a complete and detailed list of the differences between the two Language Servers
see the Documentation section: [Unique fortls features (not in fortran-language-server)](https://fortls.fortran-lang.org/fortls_changes.html)

The name of executable for this project has been chosen to remain `fortls`
to allow for integration with pre-existing plugins and workflows, but it could
change in the future.

## Acknowledgements

This project would not have been possible without the original work of [@hansec](https://github.com/hansec/)
in [`fortran-language-server`](https://github.com/hansec/fortran-language-server)

<!-- ## Support
If you want to support this project you can do it through
## Support

[![Alt](https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-150px.png)](https://paypal.me/inikit)
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/gnikit) -->
You can support Fortran-lang as a whole by donating at
[Fortran-lang - NumFOCUS](https://numfocus.org/donate-for-fortran-lang).

## Bug reports

Expand Down
11 changes: 3 additions & 8 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ There are a few ways you can support the ``fortls`` project.
Financial Support
------------------

.. You can support us financially by becoming a **GitHub Sponsor** or by
.. making a **PayPal Donation**.
You can fiscally support Fortran-lang by donating to the project, see
`Fortran-lang - NumFOCUS`_.

.. note::
We are in the process of restructuring our Sponsorship structure.
In the meantime, please get in contact with ``gnikit`` via email at
``gnikit [@] duck [.] com`` or any other `Administrator of Fortran-lang`_
for instructions to financially back the project.
.. _Fortran-lang - NumFOCUS: https://numfocus.org/donate-for-fortran-lang

.. _Administrator of Fortran-lang: https://github.com/orgs/fortran-lang/teams/admins/members

.. .. grid:: 2
.. :gutter: 0
Expand Down
Loading

0 comments on commit cd9c3c6

Please sign in to comment.