Skip to content

Commit 2c6a319

Browse files
committed
Merge branch 'main' into mirror
2 parents bb91f8d + 80adfd1 commit 2c6a319

18 files changed

Lines changed: 8012 additions & 286 deletions

.github/workflows/test-package.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
runs-on: [ubuntu-latest, windows-latest, macos-latest]
18-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
18+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', ' 3.14']
1919

2020
runs-on: ${{matrix.runs-on}}
2121

@@ -28,7 +28,7 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
python -m pip install pytest toml
31+
python -m pip install pytest toml nbval striplog
3232
python -m pip install .
3333
- name: Update system path
3434
run: |
@@ -39,4 +39,6 @@ jobs:
3939
run: |
4040
echo $GITHUB_PATH
4141
echo $PATH
42-
python -m pytest -v
42+
python -m pytest
43+
python -m doctest README.md
44+
python -m pytest -v --nbval notebooks/Plot_locations_and_create_strip_log.ipynb

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ stages:
77
stage: test
88
parallel:
99
matrix:
10-
- PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13"]
10+
- PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1111
script:
1212
- python -m pip install .
1313
- python -m pip install pytest nbval

changelog.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
Changelog
22
=========
33

4+
1.2.0 (2026-03-18)
5+
------------------
6+
- Add support for Standard dicionary v4.2
7+
- Add support for Python 3.14
8+
- Update pyproject.toml to PEP621 format
9+
- Replace bespoke CSV parsing code with CSV module. This allows escaped double
10+
quotes to be handle correctly (affects Rules 4 & 5). (Issue #135)
11+
- Raise exception if GROUP lines are missing (Issues #133 & #137)
12+
- Fix SyntaxWarning in Python 3.14 about return statement inside 'finally' block
13+
(Issue #139)
14+
- Add feature to choose subset of groups/tables to read from file (Issue #143)
15+
- Address various warnings related to future changes and deprecations in Python
16+
17+
418
1.1.0 (2025-06-03)
519
------------------
620
- Fix minor issues in v4.1 and v4.1.1 standard dictionaries and include latest
@@ -48,7 +62,6 @@ Changelog
4862

4963
0.5.0 (2024-01-27)
5064
------------------
51-
5265
- Remove support for Python version 3.7
5366
- Add support for Pandas version 2.x and drop support for version 1.x.
5467
- Add functionality to log internal messages

docs/index.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Group](https://gitlab.com/ags-data-format-wg)
2929
## Project Scope
3030
For many years the industry has had two checker applications that don't always produce the same results. This has caused clients to specify that AGS files must pass both checkers before the data is submitted to them, resulting in additional work for clients, contractors and software producers.
3131

32-
The Project has one goal. To produce an AGS Validator library that can be used by any developer to include AGS validation routine in their application. By Producing a single code stream that can be incorporated into any application the industry will now know if a file is valid.
32+
The Project has one goal. To produce an AGS Validator library that can be used by any developer to include AGS validation routine in their application. By producing a single code stream that can be incorporated into any application the industry will now know if a file is valid.
3333

3434
The project has also created an EXE file with a simple interface that allows users to validate files. More information on this project can be found in the Related Projects section of this Wiki. This library will not visualize or fix AGS data but we welcome developers to start their own related project.
3535

@@ -38,28 +38,33 @@ The project has also created an EXE file with a simple interface that allows use
3838
May 4th 2021 - AGS Validator EXE Beta launched
3939
This release is for testing by the development team and the AGS committee members. We believe that it finds all the errors in AGS 4.0.3, 4.0.4 and 4.1 files with the known issue list below.
4040

41-
Line numbers are not included in all error messages
41+
September 4th, 2024 - v1.0.0
42+
This package has been very stable with no breaking changes to the API since its first release on PyPI. However, finalizing all the validation rules took a lot of testing and refining, so this is the
43+
first version that we recommend for validating files in production.
44+
45+
For more details on releases see the _changelog.txt_ file in the Git repo.
4246

4347
## Adding Test AGS Files
44-
The project has launched with 55 AGS files that have deliberate errors in them. Each file has a corresponding .check file with it that defines the errors that are in the file.
48+
The project has 80+ AGS files that have deliberate errors in them. The errors in each file are defined in its TRAN_REM field.
4549

46-
Every AGS file in the /tests/test_files folder is checked before a release is made to ensure that any modifications don't break any checks or introduce new problems.
50+
Every test file is checked before a release is made to ensure that any modifications don't break any checks or introduce new problems.
4751

4852
If you have an AGS file where the validator either incorrectly identifies an error or does not highlight a known error then we would like to know about it so we can fix any problems and include this file in the checking routine.
4953

50-
To report problems please open an issue, describe the error and attach the file. The Contributor Team will then review the file, create the .check file and include it in the main Repository.
54+
To report problems please open an issue, describe the error and attach the file. The Contributor Team will then review and address the issue.
5155

5256
## Credits
5357
The AGS Python Library is created and maintained by a range of enthusiastic international volunteers (like you)
5458

5559
Beta Release 0.0.1 4th May 2021
60+
Stable Release 1.0.0 4th September 2024
5661

57-
The initial beta release was made possible due to the considerable work completed by Asitha Senanayake with support and testing by Roger Chandler and Tony Daly.
62+
This software was made possible due to the considerable work completed by Asitha Senanayake with support and testing by Roger Chandler, Tony Daly, Neil Chadwick.
5863

59-
We welcome push requests from any AGS developer within the bounds of the project, so get coding and create a push request to join the contribution team and see your name add to this Credits Page for the next release.
64+
We welcome merge requests from any AGS developer within the bounds of the project, so get coding and create a merge request to join the contribution team and see your name add to this Credits Page for the next release.
6065

6166
## Development Environment
62-
This project is built in Ubuntu 20.04 and packaged using `poetry` (python-poetry.org). Unit testing is done using `pytest` with the `toml` library as a dependency.
67+
This project is built in Ubuntu 22.04 and packaged using `poetry` (python-poetry.org). Unit testing is done using `pytest` with the `toml` library as a dependency.
6368

6469
Instructions on how to install `poetry` can be found at https://python-poetry.org/docs/.
6570
This package does not come with _setup.py_ and _requirements.txt_ files. Instead, all dependency information is provided in the _pyproject.toml_ and _poetry.lock_ files.
@@ -69,10 +74,6 @@ A development environment can be setup by running `poetry install` from within t
6974
If you want only the dependencies installed, then run `poetry install --no-root` instead.
7075
Unit tests can be run by running `python -m pytest` from within the root directory of the git repo.
7176

72-
Dev directory is structured as shown below:
73-
74-
![dev_directory_structure](uploads/0ec81e34b20fea36995dcc9342720181/dev_directory_structure.png)
75-
7677
## Get Involved
7778
If you are reading this then you are already involved! Thank you for being part of this amazing project. If you share our passion for this project and would like to be involved then we are looking for people to help in any of the roles below. Just introduce yourself to the team via
7879

@@ -82,13 +83,12 @@ Managers (Primary role is to merge pull requests from contributors)
8283
Controllers (Primary role is governance and PR)
8384

8485
## Related Projects
85-
The AGS library is an excellent tool for any developers to add AGS validation capabilities to their application but is not user friendly for users.<br><br>
86-
To help users validate AGS files using this library the following tools should be reviewed. Please see the links below for the status of each of these projects.<br><br>
87-
- [AGS Validator EXE](https://gitlab.com/ags-data-format-wg/ags-checker-desktop-app) (Released by AGS)
88-
- [AGS Excel Add-In](https://gitlab.com/RogerChandler/ags-validator-excel-add-in) (Developed by Roger Chandler)
89-
- [AGS Validator Web Interface and API](https://github.com/BritishGeologicalSurvey/AGS-Validator-FastAPI-Web-App ) (Developed by BGS)
90-
91-
92-
Use the navigation menu on the left and the search to find what you want.
93-
86+
This library is an excellent tool for developers to add AGS validation capabilities to their application and for end users who like to work with AGS files programmatically using Python.
87+
However, if you are an end user who wants to validate AGS files without having to write code, then you can check out the following tools.
88+
89+
- [AGS4 CLI](https://ags-data-format-wg.gitlab.io/ags-python-library/usage/#command-line-interface) (Developed by Asitha Senanayake)
90+
- [AGS Validator EXE](https://gitlab.com/ags-data-format-wg/ags-checker-desktop-app) (Released by AGS)
91+
- [AGS Excel Add-In](https://www.geotechnicaldata.com/ags-data-toolkit-for-excel) (Developed by Roger Chandler)
92+
- [AGS Validator Web Interface and API](https://github.com/BritishGeologicalSurvey/AGS-Validator-FastAPI-Web-App ) (Developed by BGS)
93+
- [Web application (Digital Geotechnical)](https://dg-ags-validator.ew.r.appspot.com) (Developed by Neil Chadwick)
9494

docs/usage.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ Tables converted to numeric using the ```AGS4.convert_to_numeric()``` function s
8383

8484
We have created an example Jupyter Notebook which imports an AGS file, plots boreholes on a map and creates a Striplog.
8585

86-
[See here](./notebooks/Plot_locations_and_create_strip_log.ipynb)
86+
[See here](https://gitlab.com/ags-data-format-wg/ags-python-library/-/tree/main/notebooks)
8787

8888
### Command Line Interface
8989

90-
A command-line interface (CLI) to access the core functionality of the library
91-
is available since version 0.2.0. It is automatically installed together with the
92-
library and can be accessed by typing ```ags4_cli``` in a terminal/shell. If you
93-
want the CLI to be available globally (i.e. not limited to a single virtual
94-
environment), then you can install it using ```pipx```.
90+
An easy-to-use and expressive command-line interface (CLI) to access the core
91+
functionality of the library is bundled with the library. It can be accessed by
92+
typing ```ags4_cli``` in a terminal/shell. If you want the CLI to be available
93+
globally (i.e. not limited to a single virtual environment), then you can
94+
install it using ```pipx``` or ```uv tool```.
9595

9696
You can do the following operations via the CLI:
9797
1. Check/validate AGS4 files
@@ -123,7 +123,7 @@ tables, headings = load_test_data()
123123
gui = show(**tables)
124124
```
125125

126-
<img src="./media/pandasgui_screenshot.png" width=800>
126+
<img src="https://gitlab.com/ags-data-format-wg/ags-python-library/-/blob/main/docs/media/pandasgui_screenshot.png" width=800>
127127

128128
Any edits made in the GUI can be saved and exported back to an AGS4 file as follows:
129129

@@ -147,7 +147,9 @@ Senanayake et al., (2022). python-ags4: A Python library to read, write, and val
147147

148148
This library has been used to create
149149

150+
- [Windows/Linux/MacOS Command-Line Utility (included with the library)](https://ags-data-format-wg.gitlab.io/ags-python-library/usage/#command-line-interface)
150151
- Windows Desktop Application - https://gitlab.com/ags-data-format-wg/ags-checker-desktop-app
151152
- Web application and API (pyagsapi) - https://github.com/BritishGeologicalSurvey/pyagsapi
152153
- Deployed as https://agsapi.bgs.ac.uk/
153154
- Excel Add On - https://gitlab.com/RogerChandler/ags-validator-excel-add-in
155+
- Web application (Digital Geotechnical) - https://dg-ags-validator.ew.r.appspot.com/

0 commit comments

Comments
 (0)