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

Release 3.0.1 Release Candidate 4 #164

Closed
wants to merge 240 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
324c951
Bump black from 22.12.0 to 24.3.0
dependabot[bot] Mar 20, 2024
c660227
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 8, 2024
cf09bc6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2024
39f0344
Bump idna from 3.6 to 3.7
dependabot[bot] Apr 12, 2024
625c3b7
Added missing table column in data format summary docs
jacobcook1995 Apr 15, 2024
9f54e71
Merge pull request #118 from ImperialCollegeLondon/dependabot/pip/bla…
jacobcook1995 Apr 15, 2024
fb64fca
Merge pull request #119 from ImperialCollegeLondon/dependabot/pip/idn…
jacobcook1995 Apr 15, 2024
c223f37
Updated mypy version so that it matches with the one used by CI
jacobcook1995 Apr 15, 2024
09763c9
Renamed some variables in field to shut mypy up
jacobcook1995 Apr 15, 2024
e82626c
Merge branch 'develop' into pre-commit-ci-update-config
jacobcook1995 Apr 15, 2024
3d674ab
Merge pull request #117 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 Apr 15, 2024
ebd8c85
Added pyupgrade to the pre-commit steps
jacobcook1995 Apr 15, 2024
426b016
Changed CI to make 3.10 the minimum python version
jacobcook1995 Apr 15, 2024
5d00785
Changed read the docs to use python 3.10
jacobcook1995 Apr 15, 2024
a377b37
Updated minimum python version in pyproject
jacobcook1995 Apr 15, 2024
07fcf10
Updated to use 3.10 python syntax
jacobcook1995 Apr 15, 2024
006a80e
Started importing annotations from __future__ so that Resources can b…
jacobcook1995 Apr 15, 2024
59d38ea
Merge pull request #121 from ImperialCollegeLondon/drop_3.9_support
jacobcook1995 Apr 15, 2024
6ee48c8
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 15, 2024
669ecb6
Merge pull request #122 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 Apr 16, 2024
5a821bc
Added step to remove whitespace padding from summary field names and …
jacobcook1995 Apr 19, 2024
1ebd5e2
Converted whitespace checking function to a utility function
jacobcook1995 Apr 19, 2024
8ae9a24
Added a test for whitespace removing function
jacobcook1995 Apr 19, 2024
36f954d
Merge pull request #129 from ImperialCollegeLondon/bugfix/summary_whi…
jacobcook1995 Apr 19, 2024
138cb21
Added note to say that Unknown should be used for missing permit numbers
jacobcook1995 Apr 22, 2024
32e336a
Added note to docs about Summary sheet naming
jacobcook1995 Apr 22, 2024
2162711
Added note to docs about Locations sheet naming
jacobcook1995 Apr 22, 2024
9b6834d
Added note to docs on valid data worksheet names
jacobcook1995 Apr 22, 2024
ea9aab7
Removed unnecessary creation of link anchor
jacobcook1995 Apr 22, 2024
004ab68
Merge pull request #130 from ImperialCollegeLondon/bug_fix/sheet_name…
jacobcook1995 Apr 22, 2024
900cebb
Merge branch 'develop' into bug_fix/permit_number_problem
jacobcook1995 Apr 23, 2024
48dfc80
Updated shapely version to 2.0
jacobcook1995 Apr 23, 2024
08df072
Removed logging line from test as it is no longer emitted by later sh…
jacobcook1995 Apr 23, 2024
c45156b
Merge pull request #132 from ImperialCollegeLondon/bugfix/shapely_wei…
jacobcook1995 Apr 24, 2024
86e4d6c
Merge branch 'develop' into bug_fix/permit_number_problem
jacobcook1995 Apr 24, 2024
cf59e64
Fixed small typo that flake8 suddenly decided it didn't like
jacobcook1995 Apr 24, 2024
b68e564
Switch the template link to point to the main branch
jacobcook1995 Apr 25, 2024
9bb59eb
Added link to template in data manager docs
jacobcook1995 Apr 25, 2024
da9e8fe
Updated template to use new NCBITaxa sheet format
jacobcook1995 Apr 25, 2024
d7a8cff
Updated a bunch of outdated links
jacobcook1995 Apr 26, 2024
4bc1881
Added mkdocs table-reader plugin
jacobcook1995 Apr 26, 2024
3d722dc
Added example file with most of the example summary data
jacobcook1995 Apr 26, 2024
bcfd18d
Merge pull request #131 from ImperialCollegeLondon/bug_fix/permit_num…
jacobcook1995 Apr 29, 2024
a51cd8a
Fixed NCBI taxa docs so that multiple paragraph bullet point renders …
jacobcook1995 Apr 29, 2024
21d453a
Added location and taxa information to Example dataset
jacobcook1995 Apr 29, 2024
8c9121c
Switched to adding Location and Taxa documentation examples from the …
jacobcook1995 Apr 29, 2024
864c66c
Added a hook printing hello world on docs pre build
jacobcook1995 Apr 29, 2024
cc1a968
Align --show-resources flag across commands
davidorme Apr 29, 2024
09ff407
Merge branch 'develop' into release/3.0.1
davidorme Apr 29, 2024
3612671
Updated docs and usage
davidorme Apr 29, 2024
e95bcc4
Fleshed out docstrings in hooks.py
jacobcook1995 Apr 29, 2024
4ec151e
Merge pull request #134 from ImperialCollegeLondon/release/3.0.1
davidorme Apr 29, 2024
20736d4
Extent setting in metadata borked
davidorme Apr 29, 2024
e9e543e
Added basic code to generate command line usage text files as part of…
jacobcook1995 Apr 29, 2024
e8a80b0
Modified hook to avoid printing of shell output
jacobcook1995 Apr 29, 2024
22cd192
Updated format for command line usage output
jacobcook1995 Apr 29, 2024
d3264ba
Fixing issues in XML generation
davidorme Apr 29, 2024
20fe9a2
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 29, 2024
38fc63c
Add project wide XML elements to Resources
davidorme Apr 30, 2024
1315172
Merge pull request #135 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 May 1, 2024
8a043ff
Added information to the docstrings explaining the prebuild command l…
jacobcook1995 May 1, 2024
9d8ee07
Test to see if this fixes hook not working on ubuntu
jacobcook1995 May 1, 2024
651af45
Explicitly set shell as tru in the hope that that fixes the problem o…
jacobcook1995 May 1, 2024
153b431
Add jinja XML template
davidorme May 1, 2024
dc6ec9f
Add jinja to requirements
davidorme May 1, 2024
78955e4
Retire old XLST-filled template
davidorme May 1, 2024
cbdda9f
Replace lxml based gemini generation with jinja templating
davidorme May 1, 2024
4ed71c4
Removing lxml from project
davidorme May 1, 2024
dc3f168
Minor code tweaks
davidorme May 1, 2024
b50834a
Adding XML docs
davidorme May 1, 2024
01c9d6e
Fixing up tests
davidorme May 1, 2024
6fbd43d
Added XML template to pyfakefs
davidorme May 1, 2024
6f5b72b
Switched to using stdout option so that hopefully the mkdocs hooks wo…
jacobcook1995 May 1, 2024
b54c3bb
Updated overviews to link to the example file
jacobcook1995 May 1, 2024
30d104c
Added bin/bash to shell script in the hopes that fixes the ubuntu pro…
jacobcook1995 May 1, 2024
68e616b
Merge branch 'develop' into feature/example_file, also took the oppur…
jacobcook1995 May 1, 2024
e409e7a
Updating scripts
davidorme May 1, 2024
692cb24
Merge branch '112-fix-xml-distribution-flow' into 127-customising-the…
davidorme May 1, 2024
d41dcbe
Partial conversion of dataset_description code from hardcoded to popu…
davidorme May 1, 2024
4bcf3de
Switched to using bash to run script to hopefully solve ubuntu problem
jacobcook1995 May 2, 2024
5ab87a6
Adding more context, cleaning function, updating template
davidorme May 2, 2024
77ccd13
Make html template configurable
davidorme May 2, 2024
1c77a33
Added example datasheets to the example file
jacobcook1995 May 2, 2024
ad25a3d
Fixing up external file descriptions
davidorme May 2, 2024
28b8855
Replacing old html function and now redundant table_description
davidorme May 2, 2024
e29d908
Added --id-to-stdout flag to create_deposit
davidorme May 3, 2024
05e2449
Merge branch 'develop' into 112-fix-xml-distribution-flow
davidorme May 3, 2024
fd90a9f
Fixing importlib usage to avoid mysterious context manager usage
davidorme May 3, 2024
84509ca
More docs, reducing duplicated details, minimum 2 DP in XML extents
davidorme May 3, 2024
c690b9a
Doc fix
davidorme May 3, 2024
770b3f8
Merge pull request #136 from ImperialCollegeLondon/112-fix-xml-distri…
davidorme May 3, 2024
a1c6f9c
Merge branch 'develop' into 127-customising-the-zenodo-html
davidorme May 3, 2024
40297f0
Added docs on HTML templates
davidorme May 3, 2024
55d7ce4
Fixing broken test fakefs and path handling
davidorme May 3, 2024
f43879a
Fixing broken test fakefs and path handling
davidorme May 3, 2024
9ca1b57
Adding environment variable setting of config path
davidorme May 3, 2024
3e12e0c
Merge branch 'develop' into 137-issues-with-command-line-workflow
davidorme May 3, 2024
b5d7a44
Merge branch '127-customising-the-zenodo-html' into 137-issues-with-c…
davidorme May 3, 2024
8461193
Bump tqdm from 4.66.2 to 4.66.3
dependabot[bot] May 3, 2024
f521bc8
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 6, 2024
e5541a7
Bump jinja2 from 3.1.3 to 3.1.4
dependabot[bot] May 6, 2024
f56be71
Merge pull request #139 from ImperialCollegeLondon/dependabot/pip/tqd…
jacobcook1995 May 8, 2024
fbdf8cd
Merge pull request #140 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 May 8, 2024
6310691
Merge pull request #141 from ImperialCollegeLondon/dependabot/pip/jin…
jacobcook1995 May 8, 2024
d38d151
Merge branch 'develop' into feature/example_file
jacobcook1995 May 8, 2024
d9bb12f
Merge pull request #138 from ImperialCollegeLondon/127-customising-th…
davidorme May 8, 2024
6950dfc
Working on publish_dataset function. moving zenodo.py off os.path and…
davidorme May 8, 2024
343e616
Adding publish dateset entrypoint
davidorme May 8, 2024
ff03ed6
Merge branch 'develop' into 137-issues-with-command-line-workflow
davidorme May 8, 2024
d4ef14f
Better error handling and messaging in publish dataset
davidorme May 8, 2024
cd6573e
Documentation updates on publish_datset
davidorme May 13, 2024
ad3236d
Regenerate updated CLI docs
davidorme May 13, 2024
d8e9fa1
Adding docs on resources env var and removing outdated subcommand ali…
davidorme May 13, 2024
de5b6a1
Updating argument types to Path - this is still a bit inconsistent
davidorme May 13, 2024
214b217
Fixing tests and adding test for use of environment variable setting …
davidorme May 13, 2024
793df0b
Attempt at generating the tables using read_excel
jacobcook1995 May 13, 2024
73a7fcb
Switched to just pretending there are no headers
jacobcook1995 May 13, 2024
26eb70c
Merge pull request #142 from ImperialCollegeLondon/137-issues-with-co…
davidorme May 13, 2024
7e9f86a
Added steps to display summary data from example file
jacobcook1995 May 14, 2024
392b889
Updated Example dataset so that it should pass validation
jacobcook1995 May 14, 2024
3179ccb
Merge branch 'develop' into feature/example_file
jacobcook1995 May 14, 2024
52b685e
Added Example dataset as a fixture to be tested
jacobcook1995 May 14, 2024
ca9c6ad
Updated database building docs to talk about file paths rather than d…
jacobcook1995 May 14, 2024
40183aa
Updated truncated NCBI database to fix the validation errors
jacobcook1995 May 14, 2024
296c8f6
Updated taxonomy to so that GBIF part of example file passes validation
jacobcook1995 May 15, 2024
2edd3de
Added details to docs of new ignore id example
jacobcook1995 May 15, 2024
139417d
Added a warning to GBIF database download function about missing dele…
jacobcook1995 May 15, 2024
79fc21e
Test of way of failing if docs result in file changes
jacobcook1995 May 15, 2024
fc9ca19
Simplified check for file changes from docs build
jacobcook1995 May 15, 2024
f27f334
Commiting updated command line usage doc so that doc build process pa…
jacobcook1995 May 15, 2024
c820164
Added docs page for strange problems
jacobcook1995 May 16, 2024
2028029
Systematised how we display table columns in the summary docs page
jacobcook1995 May 16, 2024
615f82f
Added worksheet details to example file and fixed all the validation …
jacobcook1995 May 16, 2024
d48ac52
Adjusted number of columns so that all of the external files show in …
jacobcook1995 May 16, 2024
9c3f912
Fixing data worksheet validation flow in summary
davidorme May 16, 2024
cdb65e6
Fixing tests
davidorme May 16, 2024
bcd3415
Begone pytest-flake8 and never darken our doors again
davidorme May 16, 2024
85ee774
Added hook to reformat dates
jacobcook1995 May 17, 2024
e7948bf
Added hook to delete Summary.csv once the docs are built
jacobcook1995 May 17, 2024
834089a
Removed no longer necessary hooks and added ruff
jacobcook1995 May 17, 2024
8dfd947
Added ruff to poetry, and removed black, isort, flake8
jacobcook1995 May 17, 2024
455ab9b
Removed setup.cfg and moved relevant stuff into pyproject.toml
jacobcook1995 May 17, 2024
c4cce2c
Changed settings to make ruff the default formatter
jacobcook1995 May 17, 2024
1b6789c
Reformatting with ruff
jacobcook1995 May 17, 2024
8a59cd4
Fixed the things that I broke for pytest
jacobcook1995 May 17, 2024
9aa4e3e
Ruff reformating of test files
jacobcook1995 May 17, 2024
9733b6e
Remove mypy from pytest and test no dataworksheets now throws an error
davidorme May 17, 2024
8329b6c
Merge pull request #146 from ImperialCollegeLondon/feature/switch_to_…
jacobcook1995 May 20, 2024
cb637d0
Merge branch 'develop' into feature/example_file
jacobcook1995 May 20, 2024
705f337
Switched from blob to raw links for Example and Template file downloads
jacobcook1995 May 20, 2024
d6b1e53
Fixed slightly strange indenting in ncbi_taxa.md
jacobcook1995 May 20, 2024
dd6063c
Increased indent of ncbi bullet points to make it clearer that the in…
jacobcook1995 May 20, 2024
a741d00
Updated to mkdocs-table-reader-plugin to version 2.2.2
jacobcook1995 May 20, 2024
18712cd
Removed now unnecessary names argument from the summary docs
jacobcook1995 May 20, 2024
ea77c01
Merge pull request #145 from ImperialCollegeLondon/feature/example_file
jacobcook1995 May 20, 2024
1d03b2f
Switched example file download links to point to develop
jacobcook1995 May 20, 2024
8987b9c
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 20, 2024
f6162b1
---
dependabot[bot] May 21, 2024
ab6496b
Merge branch 'develop' into 143-validation-passes-with-no-worksheets
davidorme May 21, 2024
44f95ea
Pinning requests ^2.32.0 in pyproject.toml, removing pytest-glake8 an…
davidorme May 21, 2024
8e1b29e
Removing --mypy from pytest invocation
davidorme May 21, 2024
ec2221e
Merge pull request #149 from ImperialCollegeLondon/dependabot/pip/req…
davidorme May 21, 2024
1505e47
Merge branch 'develop' into 143-validation-passes-with-no-worksheets
davidorme May 21, 2024
296a167
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 21, 2024
dfea1af
Merge pull request #144 from ImperialCollegeLondon/143-validation-pas…
davidorme May 21, 2024
7e8c64b
Merge pull request #148 from ImperialCollegeLondon/pre-commit-ci-upda…
davidorme May 21, 2024
ae2355a
Split the gazetteer docs into two seperate pages
jacobcook1995 May 22, 2024
8b6626c
Added TODOs for everything we want in gazetteer generation guide
jacobcook1995 May 22, 2024
25ec212
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] May 27, 2024
6752f51
Merge pull request #150 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 May 28, 2024
a968e27
Added basic intro and guide for software use
jacobcook1995 May 28, 2024
7918d0e
Added example python script demonstrating how to build a gazetteer
jacobcook1995 May 29, 2024
fc8f8af
Updated gazetteer creation guide to have details of programatic creation
jacobcook1995 May 29, 2024
99d32c6
Made ruff the default formatter for python rather than ALL languages
jacobcook1995 May 29, 2024
bdaa222
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 3, 2024
4756d59
Merge pull request #151 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 Jun 4, 2024
5112681
Renamed plot as it is a confusing variable name
jacobcook1995 Jun 4, 2024
df6e898
Wrote gazetteer generation example script in R
jacobcook1995 Jun 4, 2024
7cbee1f
Added a section linking to R gazetteer creation script
jacobcook1995 Jun 4, 2024
0c72f26
Corrected mispelled file name
jacobcook1995 Jun 4, 2024
330b3b1
Updating requests to non-yanked version
davidorme Jun 5, 2024
c8a8be3
Remove QA on push
davidorme Jun 5, 2024
644be3f
Fixed deprecated setting in launch.json
jacobcook1995 Jun 6, 2024
bb4d571
Removed outdated VSCode settings
jacobcook1995 Jun 6, 2024
d05b2dc
Added python 3.12 testing to QA step
jacobcook1995 Jun 6, 2024
6e309fa
Ran poetry update to see if this fixed problems with the runner
jacobcook1995 Jun 6, 2024
3272339
Updated pyfakefs to a version that supports python 3.12
jacobcook1995 Jun 6, 2024
6e8b2ab
Trying restricting the pyfakefs version to fix it breaking on mac
jacobcook1995 Jun 6, 2024
d369958
Trying to restrict the pyfakefs version to 5.3 to see if this resolve…
jacobcook1995 Jun 6, 2024
a928477
Merge branch 'feature/add_3.12' of github.com:ImperialCollegeLondon/s…
jacobcook1995 Jun 6, 2024
39d06f4
Revert pyfakefs to >5.3 as the macos problem doesn't seem to be versi…
jacobcook1995 Jun 6, 2024
0858b09
Added option to try to auto-fix ruff problems
jacobcook1995 Jun 6, 2024
d2262d1
Added ruff specific linting options
jacobcook1995 Jun 6, 2024
3309075
added changes required by ruff
jacobcook1995 Jun 6, 2024
48c5252
Merge pull request #153 from ImperialCollegeLondon/feature/add_ruff_o…
jacobcook1995 Jun 7, 2024
13d43a2
Merge branch 'develop' into feature/add_3.12
jacobcook1995 Jun 7, 2024
220e60b
Merge branch 'develop' into feature/gazetteer_docs
jacobcook1995 Jun 7, 2024
a8f5231
Fixing stupid brittle relative output paths in tests
davidorme Jun 7, 2024
5b44779
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 10, 2024
9324649
Merge pull request #155 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 Jun 11, 2024
9f75096
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 17, 2024
9297883
Bump urllib3 from 2.2.1 to 2.2.2
dependabot[bot] Jun 17, 2024
41d01a5
Merge pull request #156 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 Jun 18, 2024
6ffdd41
Merge pull request #157 from ImperialCollegeLondon/dependabot/pip/url…
jacobcook1995 Jun 18, 2024
006ae49
Merge pull request #154 from ImperialCollegeLondon/feature/add_3.12
davidorme Jun 20, 2024
eae9e13
Add publishing workflow and make CI workflow reusable
davidorme Jun 20, 2024
1123fa8
Merge pull request #159 from ImperialCollegeLondon/158-add-trusted-pu…
davidorme Jun 20, 2024
f4b327a
Bump release candidate number
davidorme Jun 20, 2024
ceece8f
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 1, 2024
4c11e28
Bumped version for prerelease
jacobcook1995 Jul 2, 2024
7dd27e2
Merge pull request #160 from ImperialCollegeLondon/pre-commit-ci-upda…
jacobcook1995 Jul 2, 2024
a522c72
API change in creating new versions of existing records
davidorme Jul 3, 2024
4611407
Fixing typo and update command line docs
davidorme Jul 3, 2024
3bb5f79
Fix up new_version to new-version in CLI, draft update to error repor…
davidorme Jul 3, 2024
6c75a2b
Updating error reporting layout
davidorme Jul 3, 2024
dc10e33
Adding live and sandbox override switches
davidorme Jul 3, 2024
e9b8ac3
Removing requirement for zenodo API URLS from resources - hard coded
davidorme Jul 3, 2024
621273b
Updating usage docs
davidorme Jul 3, 2024
a1fdc5f
Shorter lines in CLI docstrings to avoid cropping in docs
davidorme Jul 3, 2024
1f90b51
Forgot to rebuild docs
davidorme Jul 3, 2024
cc4781d
docs hook broke mkdocs serve by changing the working directory - usin…
davidorme Jul 4, 2024
dcbc975
Expanding the using_safedata_validator docs
davidorme Jul 4, 2024
b455a7a
Script updates
davidorme Jul 4, 2024
e6b9550
Better handling of zenodo errors
davidorme Jul 4, 2024
302c952
Updates from @jacobcook1995 reviews
davidorme Jul 4, 2024
76ca3a1
Merge branch 'develop' into feature/gazetteer_docs
jacobcook1995 Jul 5, 2024
b665d91
Changed gazetteer creation example R script to write out using sf pac…
jacobcook1995 Jul 5, 2024
f62b57f
Removed reference to an R package that is no longer used in the example
jacobcook1995 Jul 5, 2024
a5d804e
Added recommendations for packages to load geojson files in R
jacobcook1995 Jul 5, 2024
f6155b0
Pointed example file download to main
jacobcook1995 Jul 5, 2024
c8bf84a
Updating publish workflow to handle file updates and deprecations
davidorme Jul 5, 2024
9e56bf1
Whole bunch of documentation updates and a typo bug fix
davidorme Jul 5, 2024
830bbe6
Bump certifi from 2024.6.2 to 2024.7.4
dependabot[bot] Jul 6, 2024
103960d
Merge pull request #163 from ImperialCollegeLondon/dependabot/pip/cer…
jacobcook1995 Jul 8, 2024
9f8e392
Merge pull request #162 from ImperialCollegeLondon/161-cleaner-error-…
davidorme Jul 8, 2024
67ea4d1
Merge pull request #147 from ImperialCollegeLondon/feature/point_exam…
davidorme Jul 8, 2024
03ba7ce
Merge branch 'develop' into feature/gazetteer_docs
davidorme Jul 8, 2024
cefdd10
Merge pull request #152 from ImperialCollegeLondon/feature/gazetteer_…
davidorme Jul 8, 2024
8db4491
Merge branch 'develop' into release/3.0.1
davidorme Jul 8, 2024
3f29bea
Broken link, odd API doc issue with private members now not shown in …
davidorme Jul 8, 2024
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
49 changes: 32 additions & 17 deletions .github/workflows/ci.yml → .github/workflows/sdv_ci.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
name: Test and build

on: [push, pull_request, release]
# When does this run - new, reopened or updated PRs and when the workflow is called by
# another workflow, such as the publishing actions.
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_call:


jobs:
# qa:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: "3.9"
# - uses: pre-commit/[email protected]

qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]


test:
# needs: qa
needs: qa
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.9" , "3.10", "3.11" ]
python-version: [ "3.10", "3.11", "3.12" ]

steps:
- uses: actions/checkout@v4
Expand All @@ -39,21 +47,21 @@ jobs:
- name: Run tests
run: poetry run pytest --cov-report xml

- name: Upload coverage reports to Codecov
id: codecov
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9)

- name: Upload coverage to Codecov
if: (matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10')
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

docs_build:
# needs: qa
needs: qa
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"

- name: Install Poetry
uses: abatilo/[email protected]
Expand All @@ -64,4 +72,11 @@ jobs:
run: poetry install

- name: Build docs using mkdocs
run: poetry run mkdocs build --strict
run: poetry run mkdocs build --strict

- name: Check for file modifications due to docs build
run: |
if git status | grep -q "modified"; then
echo "Docs build process has resulted in file changes."
exit 1
fi
103 changes: 103 additions & 0 deletions .github/workflows/sdv_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Publishing

on:
release:
types: [published]

jobs:
# First, run the standard test suite - for this to work correctly, the workflow needs
# to inherit the organisation secrets used to authenticate to CodeCov.
# https://github.com/actions/runner/issues/1413
test:
uses: ./.github/workflows/sdv_ci.yaml
secrets: inherit

# Next, build the package wheel and source releases and add them to the release assets
build-wheel:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Build the package - this could use `poetry build` directly but pyproject.toml
# already has the build-system configured to use poetry so `pip` should pick that
# up automatically.
- name: Build sdist
run: |
python -m pip install --upgrade build
python -m build

# Upload the build outputs as job artifacts - these will be two files with x.y.z
# version numbers:
# - pyrealm-x.y.z-py3-none-any.whl
# - pyrealm-x.y.z.tar.gz
- uses: actions/upload-artifact@v4
with:
path: dist/safedata_validator*

# Add the built files to the release assets, alongside the repo archives
# automatically added by GitHub. These files should then match exactly to the
# published files on PyPI.
- uses: softprops/action-gh-release@v1
with:
files: dist/safedata_validator*

# Now attempt to publish the package to the TestPyPI site, where the pyrealm project
# has been configured to allow trusted publishing from this repo and workflow.
#
# The skip-existing option allows the publication step to pass even when the release
# files already exists on PyPI. That suggests something has gone wrong with the
# release or the build file staging and the release should not be allowed to continue
# to publish on PyPI.

publish-TestPyPI:
needs: build-wheel
name: Publish safedata_validator to TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
# Download the built package files from the job artifacts
- name: Download sdist artifact
uses: actions/download-artifact@v4
with:
name: artifact
path: dist

# Information step to show the contents of the job artifacts
- name: Display structure of downloaded files
run: ls -R dist

# Use trusted publishing to release the files downloaded into dist to TestPyPI
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# skip-existing: true

# The final job in the workflow is to publish to the real PyPI as long as the release
# name does not contain the tag 'test-pypi-only'
publish-PyPI:
if: ${{ ! contains(github.event.release.name, 'test-pypi-only')}}
needs: publish-TestPyPI
name: Publish safedata_validator to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
# Download the built package files from the job artifacts
- name: Download sdist artifact
uses: actions/download-artifact@v4
with:
name: artifact
path: dist

# Information step to show the contents of the job artifacts
- name: Display structure of downloaded files
run: ls -R dist

# Use trusted publishing to release the files downloaded into dist to PyPI
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
27 changes: 11 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.0
hooks:
- id: isort
additional_dependencies: [toml]
- repo: https://github.com/psf/black
rev: "22.8.0"
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.10.1
hooks:
- id: mypy
additional_dependencies:
- types-simplejson
- types-python-dateutil
- types-requests
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
rev: v0.41.0
hooks:
- id: markdownlint
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.9"
python: "3.10"
jobs:
post_create_environment:
# Install poetry
Expand All @@ -25,4 +25,5 @@ build:

mkdocs:
configuration: mkdocs.yml
fail_on_warning: true

6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Python: Current File with Args",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
Expand All @@ -27,7 +27,7 @@
},
{
"name": "_safedata_validate_cli debug",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
Expand Down
14 changes: 8 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"python.linting.flake8Enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff"
},
"editor.rulers": [
88
],
Expand All @@ -13,9 +12,12 @@
"-s",
"test",
// --no-cov needed so that breakpoints work: https://github.com/microsoft/vscode-python/issues/693
"--no-cov"
"--no-cov",
],
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Build a local GBIF database.
positional arguments:
outfile Filename to use for database file.

optional arguments:
options:
-h, --help show this help message and exit
-t TIMESTAMP, --timestamp TIMESTAMP
The time stamp of a database archive version to use.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Build a local NCBI database.
positional arguments:
outfile Filename to use for database file.

optional arguments:
options:
-h, --help show this help message and exit
-t TIMESTAMP, --timestamp TIMESTAMP
The time stamp of a database archive version to use.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ positional arguments:
zenodo_json Path to a Zenodo metadata file
dataset_json Path to a dataset metadata file

optional arguments:
options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ This subcommand simply shows the details of the resources being used and can
be used to simply display the Zenodo and metadata server details of the
default or specified resources file.

optional arguments:
options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cl_prompt $ safedata_metadata -h
usage: safedata_metadata [-h] [-r RESOURCES] [-q] ...
usage: safedata_metadata [-h] [-r RESOURCES] [-s] [-q] ...

Post updated information to a safedata server instance.

Expand All @@ -16,11 +16,11 @@ positional arguments:
Post dataset metadata to a safedata server
update_resources
Update the gazetteer data on safedata server
show_resources
Show the current resources details

optional arguments:
options:
-h, --help show this help message and exit
-r RESOURCES, --resources RESOURCES
Path to a safedata_validator resource configuration file
-s, --show-resources
Validate and display the selected resources and exit
-q, --quiet Suppress normal information messages.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ CSV being used. The server then validates the file contents.
The resource file being used sets both the metadata server instance IP address and
provides the paths to the files to be uploaded.

optional arguments:
options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cl_prompt $ safedata_validate -h
usage: safedata_validate [-h] [-r RESOURCES] [--validate_doi]
usage: safedata_validate [-h] [-r RESOURCES] [-s] [--validate_doi]
[--chunk_size CHUNK_SIZE] [-l LOG] [-j JSON]
[--version]
filename
[filename]

Validate a dataset using a command line interface.

Expand Down Expand Up @@ -30,12 +30,14 @@ Validate a dataset using a command line interface.
stderr but can be redirected to a file using the `--log` option.

positional arguments:
filename Path to the Excel file to be validated.
filename Path to the Excel file to be validated

optional arguments:
options:
-h, --help show this help message and exit
-r RESOURCES, --resources RESOURCES
A path to a resources configuration file
-s, --show-resources
Validate and display the selected resources and exit
--validate_doi
Check the validity of any publication DOIs, provided by the
user. Requires a web connection.
Expand Down
Loading
Loading