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

[Bug] add_flat_template() doesnot work anymore... #224

Closed
2 tasks done
statnmap opened this issue Jun 30, 2023 · 1 comment
Closed
2 tasks done

[Bug] add_flat_template() doesnot work anymore... #224

statnmap opened this issue Jun 30, 2023 · 1 comment
Assignees

Comments

@statnmap
Copy link
Member

statnmap commented Jun 30, 2023

As dev, I'd like to be able to open new flat files with my first function name, even before I started DESCRIPTION

Validation

  • If I create a new flat file, before creating the DESCRIPTION file, then fusen::add_flat_template() should be able to work. It should account for the name of the current directory to be tested as package name
  • Similarly, if I use fusen::add_flat_template(pkg = ".") when DESCRIPTION file does not yet exist

Tech

  • Allow "." as package name

  • Fix all affected unit tests

  • Problem encountered

> fusen::add_flat_template(pkg = ".", template = "add", flat_name = "my_new_flat")
Erreur dans fusen::add_flat_template(pkg = ".", template = "add", flat_name = "my_new_flat") : 
  Please rename your project/directory with: `` as a package name should only contain letters, numbers and dots.
> fusen::add_additional()
Erreur dans add_flat_template(template = "additional", pkg = pkg, dev_dir = dev_dir, :
Please rename your project/directory with: `` as a package name should only contain letters, numbers and dots.
@statnmap statnmap self-assigned this Jun 30, 2023
statnmap added a commit that referenced this issue Jun 30, 2023
tags: fix, test

- Add user test to verify that a classical user workflow works as expected
- Fix problem with `add_flat_template()` where current project was not recognised as proper package name
- Add a vector of values to be used to test all templates so that unit tests are up-to-date with new templates

issue #224
statnmap added a commit that referenced this issue Aug 11, 2023
- Remove inside call of pkgload::load_all() in the "full" template when testing rendering the file

issue #224
statnmap added a commit that referenced this issue Aug 16, 2023
- C:\Users\x can not work as parsed like \U0000 character; winslash needs to be changed to /

issue #224
@statnmap
Copy link
Member Author

Fixed in #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant